DocuSign.Api.Envelopes.envelopes_get_envelopes

You're seeing just the function envelopes_get_envelopes, go back to DocuSign.Api.Envelopes module for more information.
Link to this function

envelopes_get_envelopes(connection, account_id, opts \\ [])

View Source

Specs

envelopes_get_envelopes(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, DocuSign.Model.EnvelopesInformation.t()} | {:error, Tesla.Env.t()}

Gets status changes for one or more envelopes. Retrieves a list of envelopes that match your request. A large set of optional filters let you filter by date, by envelope ID, or by status codes. Your request must include one or more of the following parameters: `from_date` `envelope_ids` * `transaction_ids` Getting envelope status using `transaction_ids` is useful for offline signing situations where it can be used determine if an envelope was created or not. It can be used for the cases where a network connection was lost, before the envelope status could be returned. To avoid unnecessary database queries, the DocuSign signature platform first checks requests to ensure that the filter set supplied does not result in a zero-size response before querying the database. For example, for a request with a `from_to_status` of `delivered` and a current `status` of `created,sent`, DocuSign will always return an empty list. This is because the request translates to: find the envelopes that were delivered between the `from_date` and `to_date` dates that have a current status of `created` or `sent`. Since an envelope that has been delivered can never have a status of `created` or `sent`, a zero-size response would be generated. In this case, DocuSign does not query the database and returns an empty list immediately. The following table shows the valid current envelope statuses (`status` parameter) for the different status qualifiers (`from_to_status` parameter) in the request. If the status and status qualifiers in the API request do not contain any of the values shown in the Valid Current Statuses column, then an empty list is returned. Client applications should check that the statuses (`status` parameter) they are requesting make sense for a given `from_to_status` parameter value. | Status Qualifier<br>(`from_to_status`) | Effective Status Qualifier | Valid Current Statuses | | :------------------------------------- | :------------------------- | :-------------------------------------------------------------------------- | | any (changed) | StatusChanged | any, created, sent, delivered, signed, completed, declined, voided, deleted | | created | Created | any, created, sent, delivered, signed, completed, declined, voided, deleted | | sent | Sent | any, sent, delivered, signed, completed, declined, voided, deleted | | delivered | StatusChanged | any, delivered, signed, completed, declined, voided, deleted | | signed | StatusChanged | any, signed, completed, declined, voided, deleted | | completed | Completed | any, completed, declined, voided, deleted | | declined | StatusChanged | any, declined, voided, deleted | | timedout<br>always return zero results | StatusChanged | any, voided, deleted | | voided | Voided | any, voided, deleted | | deleted | StatusChanged | any, deleted | ## Extraneous results In some cases, a request for a specific envelope status will include envelopes with additional statuses. For example, in a request with a `from_date` of 2017-01-01, a `to_date` of 2017-01-07 and the status qualifier (`from_to_status`) set to `delivered`, the response set might contain envelopes that were created during that time period, but not delivered during the time period. As a workaround, check the envelope status values in the result set as needed.

Parameters

  • connection (DocuSign.Connection): Connection to server
  • account_id (String.t): The external account number (int) or account ID Guid.
  • opts (KeywordList): [optional] Optional parameters
    • :ac_status (String.t): Specifies the Authoritative Copy Status for the envelopes. The possible values are: Unknown, Original, Transferred, AuthoritativeCopy, AuthoritativeCopyExportPending, AuthoritativeCopyExported, DepositPending, Deposited, DepositedEO, or DepositFailed.
    • :block (String.t): Reserved for DocuSign.
    • :count (String.t): Optional. Number of items to return.
    • :custom_field (String.t): Optional. Specifies a envelope custom field name and value searched for in the envelopes. Format: `custom_envelope_field_name=desired_value` The value portion of the query can use partial strings by adding '%' (percent sign) around the custom field query value. Example 1: If you have an envelope custom field named "Region" and you want to search for all envelopes where the value is "West" you would use set this parameter to `Region=West`. Example 2: To search for envelopes where the `ApplicationID` custom field has the value or partial value of "DocuSign" in the field, set this parameter to `ApplicationId=%DocuSign%` This would match envelopes where the custom field's value is "DocuSign for Salesforce" or "DocuSign envelope".
    • :email (String.t): Limit results to envelopes sent by the account user with this email address. `user_name` must be given as well, and both `email` and `user_name` must refer to an existing account user.
    • :envelope_ids (String.t): Comma separated list of `envelopeId` values.
    • :from_date (String.t): Specifies the date and time to start looking for status changes. This parameter is required unless `envelopeIds` or `transactionIds` are set. Although you can use any date format supported by the .NET system library's [`DateTime.Parse()`][msoft] function, DocuSign recommends using [ISO 8601][] format dates with an explicit time zone offset If you do not provide a time zone offset, the method uses the server's time zone. For example, the following dates and times refer to the same instant: `2017-05-02T01:44Z` `2017-05-01T21:44-04:00` * `2017-05-01T18:44-07:00` [msoft]: https://msdn.microsoft.com/en-us/library/system.datetime.parse(v=vs.110).aspx#StringToParse [ISO 8601]: https://en.wikipedia.org/wiki/ISO_8601
    • :from_to_status (String.t): The status value checked for in the `from_date` to `to_date` time period. Possible values are: Voided, Changed, Created, Deleted, Sent, Delivered, Signed, Completed, Declined, TimedOut and Processing. If `Changed` is specified, then envelopes that changed status during the period will be returned. For example, if `Created` is specified, then envelopes created during the period are found. The default is `Changed`.
    • :start_position (String.t): Reserved for DocuSign.
    • :status (String.t): A comma-separated list of current envelope statuses to included in the response. Possible values are: completed created declined deleted delivered processing sent signed timedout voided The `any` value is equivalent to any status.
    • :to_date (String.t): Specifies the date and time to stop looking for status changes. The default is the current date and time. Although you can use any date format supported by the .NET system library's [`DateTime.Parse()`][msoft] function, DocuSign recommends using [ISO 8601][] format dates with an explicit time zone offset If you do not provide a time zone offset, the method uses the server's time zone. For example, the following dates and times refer to the same instant: `2017-05-02T01:44Z` `2017-05-01T21:44-04:00` * `2017-05-01T18:44-07:00` [msoft]: https://msdn.microsoft.com/en-us/library/system.datetime.parse(v=vs.110).aspx#StringToParse [ISO 8601]: https://en.wikipedia.org/wiki/ISO_8601
    • :transaction_ids (String.t): A comma-separated list of envelope transaction IDs. Transaction IDs are only valid for seven days.
    • :user_name (String.t): Limit results to envelopes sent by the account user with this user name. `email` must be given as well, and both `email` and `user_name` must refer to an existing account user.

Returns

} on success {:error, info} on failure