I am making query for the rest API for getting all envelopes.
Following are documents in UI
When I query using envelop list changes with proper from date and to date and account id
It gives me only 1st and last document as below.
You can use the GetSearchFolders api to retrieve all the envelopes
Example:
The following GET request retrieves all the envelopes in the last 30 days.
GET /v2/accounts/{accountId}/search_folders/all
Other Search Folder Queries.
GET /v2/accounts/{accountId}/search_folders/drafts
GET /v2/accounts/{accountId}/search_folders/awaiting_my_signature
GET /v2/accounts/{accountId}/search_folders/completed
GET /v2/accounts/{accountId}/search_folders/out_for_signature
Related
In the stripe API there is no endpoint to load discounts by Id, so typically when querying the invoices api you append ?expand[]=data.discounts to the request and it populates the details of the discounts in the returned objects. This is the only way I know of to get the discounts from the API.
In the events api you get back lots of different kinds of objects, but for the invoices I would like to also expand the discounts because I do not know how to get them otherwise. I have tried appending the following expand paramaters to the events api and always get back an invalid_request_error from their api telling me that the field I request can not be expanded.
?expand[]=discounts
?expand[]=object.discounts
?expand[]=data.discounts
?expand[]=data.object.discounts
?expand[]=data.data.object.discounts
?expand[]=data.data.discounts
Is it possible to expand the discounts on invoices from the stripe events api?
From synthrider on Stripe Developer Community Discord:
hello! No, events can't be expanded , you'd need to request this from the related API directly
I'm using the docusign api and am having some trouble with a query string param. Basically I'm trying to grab the recipient information of an envelope along with the status of the envelope in a single call.
I am able to grab each of information individually with the following api calls and they both work
1.) Envelope endpoint (has a status field with overall envelope status such as Signed, Voided, Declined, etc...):
https://na2.docusign.net/restapi/v2/accounts/:accountId/envelopes/:docusignEnvelopeId/
2.) Envelope/recipients endpoint (has information regarding recipients)
https://na2.docusign.net/restapi/v2/accounts/:accountId/envelopes/:docusignEnvelopeId/recipients
However, I'm trying to see if I can grab these information all within one API call. According to the docs here for the general envelope endpoint, I think I should be able to with a query param
https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/get#request.
Under the include Optional Query Parameters section, there's a param for "include" which says I can grab recipients from the 1st endpoint. "Specifies additional information about the envelope to return. Enter a comma-separated list, such as tabs,recipients. Valid values are..."
I've been trying to modify the first endpoint with this include param to look something like this...
https://na2.docusign.net/restapi/v2/accounts/:accountId/envelopes/:docusignEnvelopeId?include=recipients
But I have been unable to have recipients show up as well. Was wondering if I'm just typing in the param wrong or if this is not available anymore. Any help would be appreciated!
Thanks :)
The include parameters were added in v2.1 of the eSignature API, so they don't work in v2. Changing your URL to https://na2.docusign.net/restapi/v2.1/accounts/:accountId/envelopes/:docusignEnvelopeId?include=recipients should return the recipient info.
I have created a template in DocuSign with a number of fields. I have also built an application that creates an envelope from that template and sends it using the REST API.
In that process I also would like to prepopulate those fields in the envelope document before sending to the first recipient. For achieving this I have looked at the update method for recipient tabs (https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeRecipientTabs/update)
However when using the update method I need to have the tabId which is unique for each envelope. If I have 20 tabs in a document I have to fetch them all for getting the ID before doing an update. Is there a better way of doing this?
The API must be able to determine the unique tab you wish to update, so a unique ID of some sort is required to do so. Note also tabs are for a specific recipient and you need to specify the page number as well.
The docusign website allows for me to save a document as a template, but I have not been able to find a way to do this programmatically through the API. Is there a simple way to save a document as a template?
Yes, you can create a Template via the API by issuing this request:
POST /v2/accounts/{accountId}/templates
The API documentation contains details about this operation.
UPDATE
Do I understand correctly that your goal is to create a Template that's based upon an existing DocuSign Document, i.e., to mimic the following functionality in the DocuSign web UI?
If that's the case, then I'm not aware of any single API call that can do this. Instead, I believe you'll need to issue a series of API calls, to retrieve info about the existing Document(s) and then create the new Template using that info:
1) Get information about the existing DocuSign Document (envelope): GET /v2/accounts/{accountId}/envelopes/{envelopeId} (docs)
This operation returns recipient info (including tabs for each recipient) as well as envelope data like email subject, email body, reminders, etc. It also returns a documentsUri property that you can use to get the document(s) that belong to the envelope.
2) Get the list of document(s) that the envelope contains by issuing a GET request to the URI specified by the documentsUri from the prior response. (docs)
This operation returns information about each document in the specified envelope, but does not return document contents.
3) For each document listed in the prior API response, issue a GET request to the URI specified by the uri property for the document. (docs)
4) Finally, create a new Template using the data that you received in response to the previous API requests: POST /v2/accounts/{accountId}/templates (docs)
Note: As a final note -- if you're using one of the DocuSign SDKs, it's possible that there might be a function that you can call to implement this scenario, without having to piece together all of these API calls yourself. I'm not familiar enough with the SDKs to say whether or not they provide this type of functionality, but it'd be worth checking for, if you're using an SDK.
When an admin user logs in to my app, I need a list of unsigned envelopes. What is the recommended way to get this list? I am using rest api v2.
You may want to clarify what falls under the category of 'unsigned'. Per below, you can run a query that returns any envelope that has been sent (unopened), and delivered (opened, but still not finished). This does not include envelopes that may have been declined by the signer for example, though you can modify your search query to include this status. Example query
GET: https://demo.docusign.net/restapi/v2/accounts/<removed>/envelopes?from_date=9-15-2015+12:00:00+AM&status=sent,delivered
Sample documentation:
https://docs.docusign.com/esign/restapi/Envelopes/Envelopes/listStatusChanges/