Filter envelopes by email docusign - laravel

I need retrieving all the envelopes that have been signed or sent to an email.
I was trying to do this using the 'accounts/{account_id}/envelopes' endpoint passing the 'search_text' query param. As in the example in documentation https://developers.docusign.com/esign-rest-api/guides/concepts/envelopes/search
/v2.1/accounts/{account_id}/envelopes?search_text=Tabs
But I'm getting always error 400 - INVALID_REQUEST_PARAMETER. Am I doing this in the wrong way?

I think 4644 is most likely not your account ID. can you check what is your account ID?
Also, add :
&from_date=2019-03-04T00:00:00.000Z&to_date=2019-03-07T00:00:00.000Z

Related

Get Recent Campaign Sends from Mailchimp API

I'm trying to pull the latest sends from all my campaigns in Mailchimp via the 3.0 API. The only way I seem to be able to do this is:
1) Search for a given member by email
/3.0/search-members?query=joe#example.com
2) Get the member ID and request their activity
3.0/lists/{LIST ID}/members/{USER ID}/activity
3) Pull the content of the email in their activity feed:
3.0/campaigns/{CAMPAIGN ID}/content
The problem with this is that I need to know the user's email in advance and then search by each user individually, meaning many wasted of API calls.
Is there an endpoint for campaigns that I can request the last sends for a given date range?
The /campaigns endpoint returns campaigns for a given list and each returned object does include a recipients property.
You may also want to checkout:
/search-campaigns
And:
/reports/{campaign_id}/sent-to

Filter Microsoft Graph List Messages API to only received messages

Goal: I'd like to be able to filter the "List Messages" API to only return emails that are sent to the user rather than any messages that exist anywhere (such as ones sent out by the user).
Right now, if you query this particular API, you get a list of all of the messages in all folders (including Deleted Items and Clutter folders).
I know that I can filter on isDraft eq false to remove the drafts - but I don't know if there's any filter to say don't include messages sent by the user.
What I've Tried: I've looked over the examples and didn't see anything about filtering like this. I've also taken a look at the OData Query Params and dug into the filter param. The problem is I'm not quite sure what I could even filter on. I do see that there is a sender parameter - but given I've connected via OAuth and haven't asked users to provide their email address I'm not sure I have an easy way to filter on that.
Theoretically, I could first do a request to the https://graph.microsoft.com/beta/me/ endpoint to get the userPrincipalName and then add a filter on from/emailAddress/address ne '<userPrincipalName>' when I call the /me/messages endpoint - but that's going to double the number of API calls I'd need to make. Is that the only option I have or is there a better way to go about this?
Thanks for your time :)
There is no filter parameter that will achieve this directly. If you want to filter away sent messages - you'll need to either decode the base64 encoded JWT access token and extract the userPrincipalName or make a call to the /me endpoint and retrieve the userPrincipalName from that. Once you have that, you can add a filter of from/emailAddress/address ne '<userPrincipalName>'.
Please note that if you are filtering on many things and you have an "order by" param that you'll need to include that param in your filter or you'll receive an error about too many filters.

How can I retrieve list members using given a unique_email_id on Mailchimp API v3?

Given a unique_email_id, how can I retrieve all list members matching that ID?
I am attempting to use the search-members endpoint, ala what I do for searching email-addresses:
https://us9.api.mailchimp.com/3.0/search-members?query=chris#chris.com
but instead (given a unique_email_id of 4dce5
https://us9.api.mailchimp.com/3.0/search-members?query=4dce5
and I'm getting no results.
Is there another endpoint I'm missing?
However using the query string ?unique_email_id=X attached to the end
of GET lists/list_id/members will pull up anyone with that specific
EUID.
Indeed this works very well. Example :
GET /3.0/lists/dfc3cf4b38/members?unique_email_id=f4b75a9d78&fields=members.email_address
will return :
{"members":[{"email_address":"my_email#hotmail.com"}]}
I've had a chat with the mailchimp support about this issue. This was there response (part of it because not everything discussed in that chat is relevant to this question):
(09:00:04 AM) Mailchimp support: Thanks for hanging in there, Me. It looks like
the email_unique_id can't be searched via API endpoint like it can be
within the app. Another option to get to your goal is GET to
lists/list_id/members with the query string
?fields=members.email_address,members.unique_email_id which should
pull up all their subscribers' emails and unique ids. At that point,
you can filter through those results for the unique id
(09:00:52 AM) Me: Same goes for the user ID I guess?
(09:02:05 AM) Me: Why can't it be searched? When I list ids as well I might miss information. I don't need the unique_email_id in my response, I need to search for it to retrieve user information without getting duplicates in my result
(09:07:11 AM) Mailchimp support: Ok I understand, one
moment while we test this out for you. Thanks again for your patience!
(09:16:22 AM) Mailchimp support: Hey Me, thanks for waiting. I tested the
endpoint lists/list_id/members?unique_email_id=e8da8fa60a and  I was
able to return just the one subscriber with that field. Search-Members
only functions the way it does in app where you can only search
specific strings like names, email addresses, but not ids as those
aren't visible in app. However using the query string
?unique_email_id=X attached to the end of GET lists/list_id/members
will pull up anyone with that specific EUID.

Where do I find the workflow id of an automation in Mailchimp?

I would like to use Mailchimp Api 3.0 to add a subscriber to an automation workflow, but I can't find where the workflow_id or workflow_email_id are located... this is from the documentation:
POST /automations/{workflow_id}/emails/{workflow_email_id}/queue Add a subscriber to a workflow email
http://developer.mailchimp.com/documentation/mailchimp/reference/automations/emails/queue/
Can anyone tell me to find it? It's probably somewhere really obvious. I mean the list_id is well covered, but I can't find any info about this.
I found this confusing as well. Here is how I got the answer:
Send a GET request to https://us9.api.mailchimp.com/3.0/automations to find the workflow_id
With the workflow_id, send a GET request to https://us9.api.mailchimp.com/3.0/automations/<workflow_id>/emails to find the workflow_email_id. The workflow_email_id will be the "id" in the array that's returned.
From there you can make POST requests to https://us9.api.mailchimp.com/3.0/automations/<workflow_id>/emails/<workflow_email_id>/queue
Keep in mind you might need to subscribe an email address to a list first for the post request to work. To subscribe you can use: https://us9.api.mailchimp.com/3.0/lists/<list_id> with your data:
{
"members": [{
"email_address" : "emailaddress#whatever.com",
"status": "subscribed"
}]
}
The answer is found in the official mailchimp knowledge base: It explains that you simply go into the workflow and read the id from the URL.
Other ways to get id information about anything:
Using the API endpoint, detailed here: http://developer.mailchimp.com/documentation/mailchimp/reference/automations/
You'll see that the Response body parameters return everything about the automations, including the id.
Probably the easier way: use the developer playground https://us1.api.mailchimp.com/playground/?_ga=1.218336095.774374564.1480036371
So, once you set up your lists and automations, go into the playground, and you'll find all the ids you'll need for everything.

Returning custom contact fields via the Google contacts api

I have been unable to return any UserDefined/custom fields for a contact. I'm not even wanting to create or update an existing entry as per Programatically adding "New Custom Field" To Google Contacts using Google contact API
I have followed the guide here https://developers.google.com/google-apps/contacts/v3/reference, but still to no avail.
I've called both
https://www.google.com/m8/feeds/contacts/default/full?alt=json
and
https://www.google.com/m8/feeds/contacts/default/full/DEADBEEF?alt=json
in an attempt to get ALL of the values returned. I thought I might have to call each contact id specifically to get the full details, but that doesn't work either.
DEADBEEF is clearly replaced with a valid contact id in my scenario.
/contacts/default determines that request should return contacts for the current auth'd user, which is myself in this case.
Has anyone managed to return custom values, is this even possible?
Thanks
I found the answer, add the ?v=3.0 to the url string eg
https://www.google.com/m8/feeds/contacts/default/full/DEADBEEF?alt=json&v=3.0
However, you should use the preferred method of adding a GData-Version header.

Resources