/* * Docusign eSignature REST API * * The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. * * OpenAPI spec version: v2.1 * Contact: devcenter@docusign.com * Generated by: https://github.com/swagger-api/swagger-codegen.git */ using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; using DocuSign.eSign.Client; using DocuSign.eSign.Model; namespace DocuSign.eSign.Api { /// /// Represents a collection of functions to interact with the API endpoints /// public interface IEnvelopesApi : IApiAccessor { #region Synchronous Operations /// /// Adds templates to an envelope. /// /// /// Adds templates to the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// DocumentTemplateList ApplyTemplate(string accountId, string envelopeId, DocumentTemplateList documentTemplateList = null, EnvelopesApi.ApplyTemplateOptions options = null); /// /// Adds templates to an envelope. /// /// /// Adds templates to the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse ApplyTemplateWithHttpInfo(string accountId, string envelopeId, DocumentTemplateList documentTemplateList = null, EnvelopesApi.ApplyTemplateOptions options = null); /// /// Adds templates to a document in an envelope. /// /// /// Adds templates to a document in the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Options for modifying the behavior of the function. /// DocumentTemplateList ApplyTemplateToDocument(string accountId, string envelopeId, string documentId, DocumentTemplateList documentTemplateList = null, EnvelopesApi.ApplyTemplateToDocumentOptions options = null); /// /// Adds templates to a document in an envelope. /// /// /// Adds templates to a document in the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse ApplyTemplateToDocumentWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentTemplateList documentTemplateList = null, EnvelopesApi.ApplyTemplateToDocumentOptions options = null); /// /// Initiate a new ChunkedUpload. /// /// /// This method initiates a new chunked upload with the first part of the content. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// ChunkedUploadResponse CreateChunkedUpload(string accountId, ChunkedUploadRequest chunkedUploadRequest = null); /// /// Initiate a new ChunkedUpload. /// /// /// This method initiates a new chunked upload with the first part of the content. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// ApiResponse of ApiResponse CreateChunkedUploadWithHttpInfo(string accountId, ChunkedUploadRequest chunkedUploadRequest = null); /// /// Returns a URL to the authentication view UI. /// /// /// Returns a URL that allows you to embed the authentication view of the DocuSign UI in your applications. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// ViewUrl CreateConsoleView(string accountId, ConsoleViewRequest consoleViewRequest = null); /// /// Returns a URL to the authentication view UI. /// /// /// Returns a URL that allows you to embed the authentication view of the DocuSign UI in your applications. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// ApiResponse of ApiResponse CreateConsoleViewWithHttpInfo(string accountId, ConsoleViewRequest consoleViewRequest = null); /// /// Returns a URL to the envelope correction UI. /// /// /// Returns a URL that allows you to embed the envelope correction view of the DocuSign UI in your applications. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ViewUrl CreateCorrectView(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null); /// /// Returns a URL to the envelope correction UI. /// /// /// Returns a URL that allows you to embed the envelope correction view of the DocuSign UI in your applications. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse CreateCorrectViewWithHttpInfo(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null); /// /// Updates envelope custom fields for an envelope. /// /// /// Updates the envelope custom fields for draft and in-process envelopes. Each custom field used in an envelope must have a unique name. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// CustomFields CreateCustomFields(string accountId, string envelopeId, CustomFields customFields = null); /// /// Updates envelope custom fields for an envelope. /// /// /// Updates the envelope custom fields for draft and in-process envelopes. Each custom field used in an envelope must have a unique name. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse CreateCustomFieldsWithHttpInfo(string accountId, string envelopeId, CustomFields customFields = null); /// /// Creates custom document fields in an existing envelope document. /// /// /// Creates custom document fields in an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// DocumentFieldsInformation CreateDocumentFields(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null); /// /// Creates custom document fields in an existing envelope document. /// /// /// Creates custom document fields in an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// ApiResponse of ApiResponse CreateDocumentFieldsWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null); /// /// Get Responsive HTML Preview for a document in an envelope. /// /// /// Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/) HTML version of a specific document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// DocumentHtmlDefinitions CreateDocumentResponsiveHtmlPreview(string accountId, string envelopeId, string documentId, DocumentHtmlDefinition documentHtmlDefinition = null); /// /// Get Responsive HTML Preview for a document in an envelope. /// /// /// Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/) HTML version of a specific document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// ApiResponse of ApiResponse CreateDocumentResponsiveHtmlPreviewWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentHtmlDefinition documentHtmlDefinition = null); /// /// Adds the tabs to an envelope document /// /// /// Adds tabs to the document specified by `documentId` in the envelope specified by `envelopeId`. In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/envelopes/envelopedocumenttabs/create/#definition__tabs_prefilltabs), your request body might look like this: ``` { \"prefillTabs\": { \"textTabs\": [ { \"value\": \"a prefill text tab\", \"pageNumber\": \"1\", \"documentId\": \"1\", \"xPosition\": 316, \"yPosition\": 97 } ] } } ``` /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Tabs CreateDocumentTabs(string accountId, string envelopeId, string documentId, Tabs tabs = null); /// /// Adds the tabs to an envelope document /// /// /// Adds tabs to the document specified by `documentId` in the envelope specified by `envelopeId`. In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/envelopes/envelopedocumenttabs/create/#definition__tabs_prefilltabs), your request body might look like this: ``` { \"prefillTabs\": { \"textTabs\": [ { \"value\": \"a prefill text tab\", \"pageNumber\": \"1\", \"documentId\": \"1\", \"xPosition\": 316, \"yPosition\": 97 } ] } } ``` /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// ApiResponse of ApiResponse CreateDocumentTabsWithHttpInfo(string accountId, string envelopeId, string documentId, Tabs tabs = null); /// /// Returns a URL to the edit view UI. /// /// /// Returns a URL that allows you to embed the edit view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign editing view. Upon sending completion, the user is returned to the return URL provided by the API application. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ViewUrl CreateEditView(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null); /// /// Returns a URL to the edit view UI. /// /// /// Returns a URL that allows you to embed the edit view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign editing view. Upon sending completion, the user is returned to the return URL provided by the API application. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse CreateEditViewWithHttpInfo(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null); /// /// Adds email setting overrides to an envelope. /// /// /// Adds email override settings, changing the email address to reply to an email address, name, or the BCC for email archive information, for the envelope. Note that adding email settings will only affect email communications that occur after the addition was made. ### Important: The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, use a Carbon Copies or Certified Deliveries Recipient Type. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// EmailSettings CreateEmailSettings(string accountId, string envelopeId, EmailSettings emailSettings = null); /// /// Adds email setting overrides to an envelope. /// /// /// Adds email override settings, changing the email address to reply to an email address, name, or the BCC for email archive information, for the envelope. Note that adding email settings will only affect email communications that occur after the addition was made. ### Important: The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, use a Carbon Copies or Certified Deliveries Recipient Type. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse CreateEmailSettingsWithHttpInfo(string accountId, string envelopeId, EmailSettings emailSettings = null); /// /// Creates an envelope. /// /// /// Creates an envelope. Using this function you can: * Create an envelope and send it. * Create an envelope from an existing template and send it. In either case, you can choose to save the envelope as a draft envelope instead of sending it by setting the request's `status` property to `created` instead of `sent`. ## Sending Envelopes Documents can be included with the Envelopes::create call itself or a template can include documents. Documents can be added by using a multi-part/form request or by using the `documentBase64` field of the [`document` object](#/definitions/document) ### Recipient Types An [`envelopeDefinition` object](#/definitions/envelopeDefinition) is used as the method's body. Envelope recipients can be defined in the envelope or in templates. The `envelopeDefinition` object's `recipients` field is an [`EnvelopeRecipients` resource object](#/definitions/EnvelopeRecipients). It includes arrays of the seven types of recipients defined by DocuSign: Recipient type | Object definition - -- -- -- -- -- -- - | - -- -- -- -- -- -- -- -- agent (can add name and email information for later recipients/signers) | [`agent`](#/definitions/agent) carbon copy (receives a copy of the documents) | [`carbonCopy`](#/definitions/carbonCopy) certified delivery (receives a copy of the documents and must acknowledge receipt) | [`certifiedDelivery`](#/definitions/certifiedDelivery) editor (can change recipients and document fields for later recipients/signers) | [`editor`](#/definitions/editor) in-person signer (\"hosts\" someone who signs in-person) | [`inPersonSigner`](#/definitions/inPersonSigner) intermediary (can add name and email information for some later recipients/signers.) | [`intermediary`](#/definitions/intermediary) signer (signs and/or updates document fields) | [`signer`](#/definitions/signer) Additional information about the different types of recipients is available from the [`EnvelopeRecipients` resource page](../../EnvelopeRecipients) and from the [Developer Center](https://www.docusign.com/developer-center/explore/features/recipients) ### Tabs Tabs (also referred to as `tags` and as `fields` in the web sending user interface), can be defined in the `envelopeDefinition`, in templates, by transforming PDF Form Fields, or by using Composite Templates (see below). Defining tabs: the `inPersonSigner`, and `signer` recipient objects include a `tabs` field. It is an [`EnvelopeTabs` resource object](#/definitions/EnvelopeTabs). It includes arrays of the 24 different tab types available. See the [`EnvelopeTabs` resource](../../EnvelopeTabs) for more information. ## Using Templates Envelopes use specific people or groups as recipients. Templates can specify a role, eg `account_manager.` When a template is used in an envelope, the roles must be replaced with specific people or groups. When you create an envelope using a `templateId`, the different recipient type objects within the [`EnvelopeRecipients` object](#/definitions/EnvelopeRecipients) are used to assign recipients to the template's roles via the `roleName` property. The recipient objects can also override settings that were specified in the template, and set values for tab fields that were defined in the template. ### Message Lock When a template is added or applied to an envelope and the template has a locked email subject and message, that subject and message are used for the envelope and cannot be changed even if another locked template is subsequently added or applied to the envelope. The field `messageLock` is used to lock the email subject and message. If an email subject or message is entered before adding or applying a template with `messageLock` **true**, the email subject and message is overwritten with the locked email subject and message from the template. ## Envelope Status The status of sent envelopes can be determined through the DocuSign webhook system or by polling. Webhooks are highly recommended: they provide your application with the quickest updates when an envelope's status changes. DocuSign limits polling to once every 15 minutes or less frequently. When a webhook is used, DocuSign calls your application, via the URL you provide, with a notification XML message. See the [Webhook recipe](https://www.docusign.com/developer-center/recipes/webhook-status) for examples and live demos of using webhooks. ## Webhook Options The two webhook options, *eventNotification* and *Connect* use the same notification mechanism and message formats. eventNotification is used to create a webhook for a specific envelope sent via the API. Connect webhooks can be used for any envelope sent from an account, from any user, from any client. ### eventNotification Webhooks The Envelopes::create method includes an optional [eventNotification object](#definition-eventNotification) that adds a webhook to the envelope. eventNotification webhooks are available for all DocuSign accounts with API access. ### Connect Webhooks Connect can be used to create a webhook for all envelopes sent by all users in an account, either through the API or via other DocuSign clients (web, mobile, etc). Connect configurations are independent of specific envelopes. A Connect configuration includes a filter that may be used to limit the webhook to specific users, envelope statuses, etc. Connect configurations may be created and managed using the [ConnectConfigurations resource](../../Connect/ConnectConfigurations). Configurations can also be created and managed from the Administration tool accessed by selecting \"Go to Admin\" from the menu next to your picture on the DocuSign web app. See the Integrations/Connect section of the Admin tool. For repeatability, and to minimize support questions, creating Connect configurations via the API is recommended, especially for ISVs. Connect is available for some DocuSign account types. Please contact DocuSign Sales for more information. ## Composite Templates The Composite Templates feature, like [compositing in film production](https://en.wikipedia.org/wiki/Compositing), enables you to *overlay* document, recipient, and tab definitions from multiple sources, including PDF Form Field definitions, templates defined on the server, and more. Each Composite Template consists of optional elements: server templates, inline templates, PDF Metadata templates, and documents. * The Composite Template ID is an optional element used to identify the composite template. It is used as a reference when adding document object information via a multi-part HTTP message. If used, the document content-disposition must include the `compositeTemplateId` to which the document should be added. If `compositeTemplateId` is not specified in the content-disposition, the document is applied based on the `documentId` only. If no document object is specified, the composite template inherits the first document. * Server Templates are server-side templates stored on the DocuSign platform. If supplied, they are overlaid into the envelope in the order of their Sequence value. * Inline Templates provide a container to add documents, recipients, tabs, and custom fields. If inline templates are supplied, they are overlaid into the envelope in the order of their Sequence value. * Document objects are optional structures that provide a container to pass in a document or form. If this object is not included, the composite template inherits the *first* document it finds from a server template or inline template, starting with the lowest sequence value. PDF Form objects are only transformed from the document object. DocuSign does not derive PDF form properties from server templates or inline templates. To instruct DocuSign to transform fields from the PDF form, set `transformPdfFields` to \"true\" for the document. See the Transform PDF Fields section for more information about process. * PDF Metadata Templates provide a container to embed design-time template information into a PDF document. DocuSign uses this information when processing the Envelope. This convention allows the document to carry the signing instructions with it, so that less information needs to be provided at run-time through an inline template or synchronized with an external structure like a server template. PDF Metadata templates are stored in the Metadata layer of a PDF in accordance with Acrobat's XMP specification. DocuSign will only find PDF Metadata templates inside documents passed in the Document object (see below). If supplied, the PDF metadata template will be overlaid into the envelope in the order of its Sequence value. ### Compositing the definitions Each Composite Template adds a new document and templates overlay into the envelope. For each Composite Template these rules are applied: * Templates are overlaid in the order of their Sequence value. * If Document is not passed into the Composite Template's `document` field, the *first* template's document (based on the template's Sequence value) is used. * Last in wins in all cases except for the document (i.e. envelope information, recipient information, secure field information). There is no special casing. For example, if you want higher security on a tab, then that needs to be specified in a later template (by sequence number) then where the tab is included. If you want higher security on a role recipient, then it needs to be in a later template then where that role recipient is specified. * Recipient matching is based on Recipient Role and Routing Order. If there are matches, the recipient information is merged together. A final pass is done on all Composite Templates, after all template overlays have been applied, to collapse recipients with the same email, username and routing order. This prevents having the same recipients at the same routing order. * If you specify in a template that a recipient is locked, once that recipient is overlaid the recipient attributes can no longer be changed. The only items that can be changed for the recipient in this case are the email, username, access code and IDCheckInformationInput. * Tab matching is based on Tab Labels, Tab Types and Documents. If a Tab Label matches but the Document is not supplied, the Tab is overlaid for all the Documents. For example, if you have a simple inline template with only one tab in it with a label and a value, the Signature, Initial, Company, Envelope ID, User Name tabs will only be matched and collapsed if they fall in the exact same X and Y locations. * roleName and tabLabel matching is case sensitive. * The defaultRecipient field enables you to specify which recipient the generated tabs from a PDF form are mapped to. You can also set PDF form generated tabs to a recipient other than the DefaultRecipient by specifying the mapping of the tab label that is created to one of the template recipients. * You can use tabLabel wild carding to map a series of tabs from the PDF form. To use this you must end a tab label with \"\\*\" and then the system matches tabs that start with the label. * If no DefaultRecipient is specified, tabs must be explicitly mapped to recipients in order to be generated from the form. Unmapped form objects will not be generated into their DocuSign equivalents. (In the case of Signature/Initials, the tabs will be disregarded entirely; in the case of pdf text fields, the field data will be flattened on the Envelope document, but there will not be a corresponding DocuSign data tab.) ### Including the Document Content for Composite Templates Document content can be supplied inline, using the `documentBase64` or can be included in a multi-part HTTP message. If a multi-part message is used and there are multiple Composite Templates, the document content-disposition can include the `compositeTemplateId` to which the document should be added. Using the `compositeTemplateId` sets which documents are associated with particular composite templates. An example of this usage is: ``` - -5cd3320a-5aac-4453-b3a4-cbb52a4cba5d Content-Type: application/pdf Content-Disposition: file; filename=\"eula.pdf\"; documentId=1; compositeTemplateId=\"1\" Content-Transfer-Encoding: base64 ``` ### PDF Form Field Transformation Only the following PDF Form FieldTypes will be transformed to DocuSign tabs: CheckBox, DateTime, ListBox, Numeric, Password, Radio, Signature, and Text Field Properties that will be transformed: Read Only, Required, Max Length, Positions, and Initial Data. When transforming a *PDF Form Digital Signature Field,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials Any other PDF Form Digital Signature Field will be transformed to a DocuSign Signature tab When transforming *PDF Form Text Fields,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials DocuSignEnvelopeID or eSignEnvelopeID | EnvelopeID DocuSignCompany or eSignCompany | Company DocuSignDateSigned or eSignDateSigned | Date Signed DocuSignTitle or eSignTitle | Title DocuSignFullName or eSignFullName | Full Name DocuSignSignerAttachmentOptional or eSignSignerAttachmentOptional | Optional Signer Attachment Any other PDF Form Text Field will be transformed to a DocuSign data (text) tab. PDF Form Field Names that include \"DocuSignIgnoreTransform\" or \"eSignIgnoreTransform\" will not be transformed. PDF Form Date fields will be transformed to Date Signed fields if their name includes DocuSignDateSigned or eSignDateSigned. ## Template Email Subject Merge Fields This feature enables you to insert recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's `roleName`, are added to the `emailSubject` when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. * To add a recipient's name in the subject line add the following text in the `emailSubject` when creating the template or when sending an envelope from a template: [[<roleName>_UserName]] Example: `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",` * To add a recipient's email address in the subject line add the following text in the emailSubject when creating the template or when sending an envelope from a template: [[<roleName>_Email]] Example: `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",` In both cases the <roleName> is the recipient's `roleName` in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject. ## Branding an envelope The following rules are used to determine the `brandId` used in an envelope: * If a `brandId` is specified in the envelope/template and that brandId is available to the account, that brand is used in the envelope. * If more than one template is used in an envelope and more than one `brandId` is specified, the first `brandId` specified is used throughout the envelope. * In cases where no brand is specified and the sender belongs to a Group; if there is only one brand associated with the Group, then that brand is used in the envelope. Otherwise, the account's default signing brand is used. * For envelopes that do not meet any of the previous criteria, the account's default signing brand is used for the envelope. ## BCC Email address feature The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, don't use the BCC Email field. Use a Carbon Copy or Certified Delivery Recipient type. ## Merge Recipient Roles for Draft Envelopes When an envelope with multiple templates is sent, the recipients from the templates are merged according to the template roles, and empty recipients are removed. When creating an envelope with multiple templates, but not sending it (keeping it in a created state), duplicate recipients are not merged, which could cause leave duplicate recipients in the envelope. To prevent this, the query parameter `merge_roles_on_draft` should be added when posting a draft envelope (status=created) with multiple templates. Doing this will merge template roles and remove empty recipients. ###### Note: DocuSign recommends that the `merge_roles_on_draft` query parameter be used anytime you are creating an envelope with multiple templates and keeping it in draft (created) status. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Options for modifying the behavior of the function. /// EnvelopeSummary CreateEnvelope(string accountId, EnvelopeDefinition envelopeDefinition = null, EnvelopesApi.CreateEnvelopeOptions options = null); /// /// Creates an envelope. /// /// /// Creates an envelope. Using this function you can: * Create an envelope and send it. * Create an envelope from an existing template and send it. In either case, you can choose to save the envelope as a draft envelope instead of sending it by setting the request's `status` property to `created` instead of `sent`. ## Sending Envelopes Documents can be included with the Envelopes::create call itself or a template can include documents. Documents can be added by using a multi-part/form request or by using the `documentBase64` field of the [`document` object](#/definitions/document) ### Recipient Types An [`envelopeDefinition` object](#/definitions/envelopeDefinition) is used as the method's body. Envelope recipients can be defined in the envelope or in templates. The `envelopeDefinition` object's `recipients` field is an [`EnvelopeRecipients` resource object](#/definitions/EnvelopeRecipients). It includes arrays of the seven types of recipients defined by DocuSign: Recipient type | Object definition - -- -- -- -- -- -- - | - -- -- -- -- -- -- -- -- agent (can add name and email information for later recipients/signers) | [`agent`](#/definitions/agent) carbon copy (receives a copy of the documents) | [`carbonCopy`](#/definitions/carbonCopy) certified delivery (receives a copy of the documents and must acknowledge receipt) | [`certifiedDelivery`](#/definitions/certifiedDelivery) editor (can change recipients and document fields for later recipients/signers) | [`editor`](#/definitions/editor) in-person signer (\"hosts\" someone who signs in-person) | [`inPersonSigner`](#/definitions/inPersonSigner) intermediary (can add name and email information for some later recipients/signers.) | [`intermediary`](#/definitions/intermediary) signer (signs and/or updates document fields) | [`signer`](#/definitions/signer) Additional information about the different types of recipients is available from the [`EnvelopeRecipients` resource page](../../EnvelopeRecipients) and from the [Developer Center](https://www.docusign.com/developer-center/explore/features/recipients) ### Tabs Tabs (also referred to as `tags` and as `fields` in the web sending user interface), can be defined in the `envelopeDefinition`, in templates, by transforming PDF Form Fields, or by using Composite Templates (see below). Defining tabs: the `inPersonSigner`, and `signer` recipient objects include a `tabs` field. It is an [`EnvelopeTabs` resource object](#/definitions/EnvelopeTabs). It includes arrays of the 24 different tab types available. See the [`EnvelopeTabs` resource](../../EnvelopeTabs) for more information. ## Using Templates Envelopes use specific people or groups as recipients. Templates can specify a role, eg `account_manager.` When a template is used in an envelope, the roles must be replaced with specific people or groups. When you create an envelope using a `templateId`, the different recipient type objects within the [`EnvelopeRecipients` object](#/definitions/EnvelopeRecipients) are used to assign recipients to the template's roles via the `roleName` property. The recipient objects can also override settings that were specified in the template, and set values for tab fields that were defined in the template. ### Message Lock When a template is added or applied to an envelope and the template has a locked email subject and message, that subject and message are used for the envelope and cannot be changed even if another locked template is subsequently added or applied to the envelope. The field `messageLock` is used to lock the email subject and message. If an email subject or message is entered before adding or applying a template with `messageLock` **true**, the email subject and message is overwritten with the locked email subject and message from the template. ## Envelope Status The status of sent envelopes can be determined through the DocuSign webhook system or by polling. Webhooks are highly recommended: they provide your application with the quickest updates when an envelope's status changes. DocuSign limits polling to once every 15 minutes or less frequently. When a webhook is used, DocuSign calls your application, via the URL you provide, with a notification XML message. See the [Webhook recipe](https://www.docusign.com/developer-center/recipes/webhook-status) for examples and live demos of using webhooks. ## Webhook Options The two webhook options, *eventNotification* and *Connect* use the same notification mechanism and message formats. eventNotification is used to create a webhook for a specific envelope sent via the API. Connect webhooks can be used for any envelope sent from an account, from any user, from any client. ### eventNotification Webhooks The Envelopes::create method includes an optional [eventNotification object](#definition-eventNotification) that adds a webhook to the envelope. eventNotification webhooks are available for all DocuSign accounts with API access. ### Connect Webhooks Connect can be used to create a webhook for all envelopes sent by all users in an account, either through the API or via other DocuSign clients (web, mobile, etc). Connect configurations are independent of specific envelopes. A Connect configuration includes a filter that may be used to limit the webhook to specific users, envelope statuses, etc. Connect configurations may be created and managed using the [ConnectConfigurations resource](../../Connect/ConnectConfigurations). Configurations can also be created and managed from the Administration tool accessed by selecting \"Go to Admin\" from the menu next to your picture on the DocuSign web app. See the Integrations/Connect section of the Admin tool. For repeatability, and to minimize support questions, creating Connect configurations via the API is recommended, especially for ISVs. Connect is available for some DocuSign account types. Please contact DocuSign Sales for more information. ## Composite Templates The Composite Templates feature, like [compositing in film production](https://en.wikipedia.org/wiki/Compositing), enables you to *overlay* document, recipient, and tab definitions from multiple sources, including PDF Form Field definitions, templates defined on the server, and more. Each Composite Template consists of optional elements: server templates, inline templates, PDF Metadata templates, and documents. * The Composite Template ID is an optional element used to identify the composite template. It is used as a reference when adding document object information via a multi-part HTTP message. If used, the document content-disposition must include the `compositeTemplateId` to which the document should be added. If `compositeTemplateId` is not specified in the content-disposition, the document is applied based on the `documentId` only. If no document object is specified, the composite template inherits the first document. * Server Templates are server-side templates stored on the DocuSign platform. If supplied, they are overlaid into the envelope in the order of their Sequence value. * Inline Templates provide a container to add documents, recipients, tabs, and custom fields. If inline templates are supplied, they are overlaid into the envelope in the order of their Sequence value. * Document objects are optional structures that provide a container to pass in a document or form. If this object is not included, the composite template inherits the *first* document it finds from a server template or inline template, starting with the lowest sequence value. PDF Form objects are only transformed from the document object. DocuSign does not derive PDF form properties from server templates or inline templates. To instruct DocuSign to transform fields from the PDF form, set `transformPdfFields` to \"true\" for the document. See the Transform PDF Fields section for more information about process. * PDF Metadata Templates provide a container to embed design-time template information into a PDF document. DocuSign uses this information when processing the Envelope. This convention allows the document to carry the signing instructions with it, so that less information needs to be provided at run-time through an inline template or synchronized with an external structure like a server template. PDF Metadata templates are stored in the Metadata layer of a PDF in accordance with Acrobat's XMP specification. DocuSign will only find PDF Metadata templates inside documents passed in the Document object (see below). If supplied, the PDF metadata template will be overlaid into the envelope in the order of its Sequence value. ### Compositing the definitions Each Composite Template adds a new document and templates overlay into the envelope. For each Composite Template these rules are applied: * Templates are overlaid in the order of their Sequence value. * If Document is not passed into the Composite Template's `document` field, the *first* template's document (based on the template's Sequence value) is used. * Last in wins in all cases except for the document (i.e. envelope information, recipient information, secure field information). There is no special casing. For example, if you want higher security on a tab, then that needs to be specified in a later template (by sequence number) then where the tab is included. If you want higher security on a role recipient, then it needs to be in a later template then where that role recipient is specified. * Recipient matching is based on Recipient Role and Routing Order. If there are matches, the recipient information is merged together. A final pass is done on all Composite Templates, after all template overlays have been applied, to collapse recipients with the same email, username and routing order. This prevents having the same recipients at the same routing order. * If you specify in a template that a recipient is locked, once that recipient is overlaid the recipient attributes can no longer be changed. The only items that can be changed for the recipient in this case are the email, username, access code and IDCheckInformationInput. * Tab matching is based on Tab Labels, Tab Types and Documents. If a Tab Label matches but the Document is not supplied, the Tab is overlaid for all the Documents. For example, if you have a simple inline template with only one tab in it with a label and a value, the Signature, Initial, Company, Envelope ID, User Name tabs will only be matched and collapsed if they fall in the exact same X and Y locations. * roleName and tabLabel matching is case sensitive. * The defaultRecipient field enables you to specify which recipient the generated tabs from a PDF form are mapped to. You can also set PDF form generated tabs to a recipient other than the DefaultRecipient by specifying the mapping of the tab label that is created to one of the template recipients. * You can use tabLabel wild carding to map a series of tabs from the PDF form. To use this you must end a tab label with \"\\*\" and then the system matches tabs that start with the label. * If no DefaultRecipient is specified, tabs must be explicitly mapped to recipients in order to be generated from the form. Unmapped form objects will not be generated into their DocuSign equivalents. (In the case of Signature/Initials, the tabs will be disregarded entirely; in the case of pdf text fields, the field data will be flattened on the Envelope document, but there will not be a corresponding DocuSign data tab.) ### Including the Document Content for Composite Templates Document content can be supplied inline, using the `documentBase64` or can be included in a multi-part HTTP message. If a multi-part message is used and there are multiple Composite Templates, the document content-disposition can include the `compositeTemplateId` to which the document should be added. Using the `compositeTemplateId` sets which documents are associated with particular composite templates. An example of this usage is: ``` - -5cd3320a-5aac-4453-b3a4-cbb52a4cba5d Content-Type: application/pdf Content-Disposition: file; filename=\"eula.pdf\"; documentId=1; compositeTemplateId=\"1\" Content-Transfer-Encoding: base64 ``` ### PDF Form Field Transformation Only the following PDF Form FieldTypes will be transformed to DocuSign tabs: CheckBox, DateTime, ListBox, Numeric, Password, Radio, Signature, and Text Field Properties that will be transformed: Read Only, Required, Max Length, Positions, and Initial Data. When transforming a *PDF Form Digital Signature Field,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials Any other PDF Form Digital Signature Field will be transformed to a DocuSign Signature tab When transforming *PDF Form Text Fields,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials DocuSignEnvelopeID or eSignEnvelopeID | EnvelopeID DocuSignCompany or eSignCompany | Company DocuSignDateSigned or eSignDateSigned | Date Signed DocuSignTitle or eSignTitle | Title DocuSignFullName or eSignFullName | Full Name DocuSignSignerAttachmentOptional or eSignSignerAttachmentOptional | Optional Signer Attachment Any other PDF Form Text Field will be transformed to a DocuSign data (text) tab. PDF Form Field Names that include \"DocuSignIgnoreTransform\" or \"eSignIgnoreTransform\" will not be transformed. PDF Form Date fields will be transformed to Date Signed fields if their name includes DocuSignDateSigned or eSignDateSigned. ## Template Email Subject Merge Fields This feature enables you to insert recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's `roleName`, are added to the `emailSubject` when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. * To add a recipient's name in the subject line add the following text in the `emailSubject` when creating the template or when sending an envelope from a template: [[<roleName>_UserName]] Example: `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",` * To add a recipient's email address in the subject line add the following text in the emailSubject when creating the template or when sending an envelope from a template: [[<roleName>_Email]] Example: `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",` In both cases the <roleName> is the recipient's `roleName` in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject. ## Branding an envelope The following rules are used to determine the `brandId` used in an envelope: * If a `brandId` is specified in the envelope/template and that brandId is available to the account, that brand is used in the envelope. * If more than one template is used in an envelope and more than one `brandId` is specified, the first `brandId` specified is used throughout the envelope. * In cases where no brand is specified and the sender belongs to a Group; if there is only one brand associated with the Group, then that brand is used in the envelope. Otherwise, the account's default signing brand is used. * For envelopes that do not meet any of the previous criteria, the account's default signing brand is used for the envelope. ## BCC Email address feature The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, don't use the BCC Email field. Use a Carbon Copy or Certified Delivery Recipient type. ## Merge Recipient Roles for Draft Envelopes When an envelope with multiple templates is sent, the recipients from the templates are merged according to the template roles, and empty recipients are removed. When creating an envelope with multiple templates, but not sending it (keeping it in a created state), duplicate recipients are not merged, which could cause leave duplicate recipients in the envelope. To prevent this, the query parameter `merge_roles_on_draft` should be added when posting a draft envelope (status=created) with multiple templates. Doing this will merge template roles and remove empty recipients. ###### Note: DocuSign recommends that the `merge_roles_on_draft` query parameter be used anytime you are creating an envelope with multiple templates and keeping it in draft (created) status. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse CreateEnvelopeWithHttpInfo(string accountId, EnvelopeDefinition envelopeDefinition = null, EnvelopesApi.CreateEnvelopeOptions options = null); /// /// Posts a list of comments for authorized user /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// CommentHistoryResult CreateEnvelopeComments(string accountId, string envelopeId, CommentsPublish commentsPublish = null); /// /// Posts a list of comments for authorized user /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse CreateEnvelopeCommentsWithHttpInfo(string accountId, string envelopeId, CommentsPublish commentsPublish = null); /// /// Provides a URL to start a recipient view of the Envelope UI /// /// /// This method returns a URL for an envelope recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience. For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ViewUrl CreateEnvelopeRecipientPreview(string accountId, string envelopeId, RecipientPreviewRequest recipientPreviewRequest = null); /// /// Provides a URL to start a recipient view of the Envelope UI /// /// /// This method returns a URL for an envelope recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience. For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse CreateEnvelopeRecipientPreviewWithHttpInfo(string accountId, string envelopeId, RecipientPreviewRequest recipientPreviewRequest = null); /// /// Provides a URL to start a shared recipient view of the Envelope UI /// /// /// Returns a URL that enables you to embed the DocuSign UI recipient view of a [shared envelope](https://support.docusign.com/en/guides/ndse-admin-guide-share-envelopes) in your applications. This is the view that a user sees of an envelope that a recipient on the same account has shared with them. Due to screen space issues, do not use an `<iframe>` for embedded operations on mobile devices. For iOS devices, DocuSign recommends using a WebView. ### Revoking the URL You can revoke this URL by making a DELETE HTTP request to the URL with no request body. ### Related topics - [Embedded signing and sending](/docs/esign-rest-api/esign101/concepts/embedding/) - [How to send an envelope via your app](/docs/esign-rest-api/how-to/embedded-sending/) - [How to embed the DocuSign UI in your app](/docs/esign-rest-api/how-to/embed-ui/) /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ViewUrl CreateEnvelopeRecipientSharedView(string accountId, string envelopeId, RecipientViewRequest recipientViewRequest = null); /// /// Provides a URL to start a shared recipient view of the Envelope UI /// /// /// Returns a URL that enables you to embed the DocuSign UI recipient view of a [shared envelope](https://support.docusign.com/en/guides/ndse-admin-guide-share-envelopes) in your applications. This is the view that a user sees of an envelope that a recipient on the same account has shared with them. Due to screen space issues, do not use an `<iframe>` for embedded operations on mobile devices. For iOS devices, DocuSign recommends using a WebView. ### Revoking the URL You can revoke this URL by making a DELETE HTTP request to the URL with no request body. ### Related topics - [Embedded signing and sending](/docs/esign-rest-api/esign101/concepts/embedding/) - [How to send an envelope via your app](/docs/esign-rest-api/how-to/embedded-sending/) - [How to embed the DocuSign UI in your app](/docs/esign-rest-api/how-to/embed-ui/) /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse CreateEnvelopeRecipientSharedViewWithHttpInfo(string accountId, string envelopeId, RecipientViewRequest recipientViewRequest = null); /// /// Add envelope transfer rules to an account. /// /// /// This method creates an envelope transfer rule. When you create an envelope transfer rule, you specify the following properties: - `eventType` - `fromGroups` - `toUser` - `toFolder` - `carbonCopyOriginalOwner` - `enabled` **Note:** Only Administrators can create envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// EnvelopeTransferRuleInformation CreateEnvelopeTransferRules(string accountId, EnvelopeTransferRuleRequest envelopeTransferRuleRequest = null); /// /// Add envelope transfer rules to an account. /// /// /// This method creates an envelope transfer rule. When you create an envelope transfer rule, you specify the following properties: - `eventType` - `fromGroups` - `toUser` - `toFolder` - `carbonCopyOriginalOwner` - `enabled` **Note:** Only Administrators can create envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// ApiResponse of ApiResponse CreateEnvelopeTransferRulesWithHttpInfo(string accountId, EnvelopeTransferRuleRequest envelopeTransferRuleRequest = null); /// /// Creates and adds a new workflow step definition for an envelope's workflow /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// WorkflowStep CreateEnvelopeWorkflowStepDefinition(string accountId, string envelopeId, WorkflowStep workflowStep = null); /// /// Creates and adds a new workflow step definition for an envelope's workflow /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse CreateEnvelopeWorkflowStepDefinitionWithHttpInfo(string accountId, string envelopeId, WorkflowStep workflowStep = null); /// /// Submits a batch of historical envelopes for republish to an adhoc config. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// EnvelopePublishTransaction CreateHistoricalEnvelopePublishTransaction(string accountId, ConnectHistoricalEnvelopeRepublish connectHistoricalEnvelopeRepublish = null); /// /// Submits a batch of historical envelopes for republish to an adhoc config. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// ApiResponse of ApiResponse CreateHistoricalEnvelopePublishTransactionWithHttpInfo(string accountId, ConnectHistoricalEnvelopeRepublish connectHistoricalEnvelopeRepublish = null); /// /// Lock an envelope. /// /// /// Locks the specified envelope, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the envelope. ###### Note: Users must have envelope locking capability enabled to use this function (userSetting `canLockEnvelopes` must be set to true for the user). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// LockInformation CreateLock(string accountId, string envelopeId, LockRequest lockRequest = null); /// /// Lock an envelope. /// /// /// Locks the specified envelope, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the envelope. ###### Note: Users must have envelope locking capability enabled to use this function (userSetting `canLockEnvelopes` must be set to true for the user). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse CreateLockWithHttpInfo(string accountId, string envelopeId, LockRequest lockRequest = null); /// /// Adds one or more recipients to an envelope. /// /// /// Adds one or more recipients to an envelope. For an in process envelope, one that has been sent and has not been completed or voided, an email is sent to a new recipient when they are reached in the routing order. If the new recipient's routing order is before or the same as the envelope's next recipient, an email is only sent if the optional `resend_envelope` query string is set to **true**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Recipients CreateRecipient(string accountId, string envelopeId, Recipients recipients = null, EnvelopesApi.CreateRecipientOptions options = null); /// /// Adds one or more recipients to an envelope. /// /// /// Adds one or more recipients to an envelope. For an in process envelope, one that has been sent and has not been completed or voided, an email is sent to a new recipient when they are reached in the routing order. If the new recipient's routing order is before or the same as the envelope's next recipient, an email is only sent if the optional `resend_envelope` query string is set to **true**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse CreateRecipientWithHttpInfo(string accountId, string envelopeId, Recipients recipients = null, EnvelopesApi.CreateRecipientOptions options = null); /// /// Provides a link to access the Identity manual review related to a recipient. /// /// /// This method returns the URL of the page that allows a sender to [manually review](https://support.docusign.com/en/guides/ndse-user-guide-send-documents-with-id-verification) the ID of a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// ViewUrl CreateRecipientManualReviewView(string accountId, string envelopeId, string recipientId); /// /// Provides a link to access the Identity manual review related to a recipient. /// /// /// This method returns the URL of the page that allows a sender to [manually review](https://support.docusign.com/en/guides/ndse-user-guide-send-documents-with-id-verification) the ID of a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// ApiResponse of ApiResponse CreateRecipientManualReviewViewWithHttpInfo(string accountId, string envelopeId, string recipientId); /// /// Returns a link to access to the identity events stored in the proof service related to this recipient. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// IdEvidenceViewLink CreateRecipientProofFileLink(string accountId, string envelopeId, string recipientId); /// /// Returns a link to access to the identity events stored in the proof service related to this recipient. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// ApiResponse of ApiResponse CreateRecipientProofFileLinkWithHttpInfo(string accountId, string envelopeId, string recipientId); /// /// Returns a resource token to get access to the identity events stored in the proof service related to this recipient. /// /// /// Creates a resource token for a sender. This token allows a sender to return identification data for a recipient using the [ID Evidence API](/docs/idevidence-api/). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// IdEvidenceResourceToken CreateRecipientProofFileResourceToken(string accountId, string envelopeId, string recipientId, EnvelopesApi.CreateRecipientProofFileResourceTokenOptions options = null); /// /// Returns a resource token to get access to the identity events stored in the proof service related to this recipient. /// /// /// Creates a resource token for a sender. This token allows a sender to return identification data for a recipient using the [ID Evidence API](/docs/idevidence-api/). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse CreateRecipientProofFileResourceTokenWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.CreateRecipientProofFileResourceTokenOptions options = null); /// /// Returns a URL to the recipient view UI. /// /// /// Returns a URL that allows you to embed the recipient view of the DocuSign UI in your applications. This call cannot be used to view draft envelopes, since those envelopes have not been sent. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. An entry is added into the Security Level section of the DocuSign Certificate of Completion that reflects the `securityDomain` and `authenticationMethod` properties used to verify the user identity. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ViewUrl CreateRecipientView(string accountId, string envelopeId, RecipientViewRequest recipientViewRequest = null); /// /// Returns a URL to the recipient view UI. /// /// /// Returns a URL that allows you to embed the recipient view of the DocuSign UI in your applications. This call cannot be used to view draft envelopes, since those envelopes have not been sent. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. An entry is added into the Security Level section of the DocuSign Certificate of Completion that reflects the `securityDomain` and `authenticationMethod` properties used to verify the user identity. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse CreateRecipientViewWithHttpInfo(string accountId, string envelopeId, RecipientViewRequest recipientViewRequest = null); /// /// Get Responsive HTML Preview for all documents in an envelope. /// /// /// Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents in an envelope. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// DocumentHtmlDefinitions CreateResponsiveHtmlPreview(string accountId, string envelopeId, DocumentHtmlDefinition documentHtmlDefinition = null); /// /// Get Responsive HTML Preview for all documents in an envelope. /// /// /// Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents in an envelope. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse CreateResponsiveHtmlPreviewWithHttpInfo(string accountId, string envelopeId, DocumentHtmlDefinition documentHtmlDefinition = null); /// /// Returns a URL to the sender view UI. /// /// /// Returns a URL that allows you to embed the sender view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign sending view. Upon sending completion, the user is returned to the return URL provided by the API application. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ViewUrl CreateSenderView(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null); /// /// Returns a URL to the sender view UI. /// /// /// Returns a URL that allows you to embed the sender view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign sending view. Upon sending completion, the user is returned to the return URL provided by the API application. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse CreateSenderViewWithHttpInfo(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null); /// /// Adds tabs for a recipient. /// /// /// Adds one or more tabs for a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Tabs CreateTabs(string accountId, string envelopeId, string recipientId, Tabs tabs = null); /// /// Adds tabs for a recipient. /// /// /// Adds one or more tabs for a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// ApiResponse of ApiResponse CreateTabsWithHttpInfo(string accountId, string envelopeId, string recipientId, Tabs tabs = null); /// /// Creates and adds a new workflow step definition for a template's workflow /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// WorkflowStep CreateTemplateWorkflowStepDefinition(string accountId, string templateId, WorkflowStep workflowStep = null); /// /// Creates and adds a new workflow step definition for a template's workflow /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// ApiResponse of ApiResponse CreateTemplateWorkflowStepDefinitionWithHttpInfo(string accountId, string templateId, WorkflowStep workflowStep = null); /// /// Delete one or more attachments from a DRAFT envelope. /// /// /// Deletes one or more attachments from a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// EnvelopeAttachmentsResult DeleteAttachments(string accountId, string envelopeId, EnvelopeAttachmentsRequest envelopeAttachmentsRequest = null); /// /// Delete one or more attachments from a DRAFT envelope. /// /// /// Deletes one or more attachments from a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse DeleteAttachmentsWithHttpInfo(string accountId, string envelopeId, EnvelopeAttachmentsRequest envelopeAttachmentsRequest = null); /// /// Delete an existing ChunkedUpload. /// /// /// Deletes a chunked upload that has been committed but not yet consumed. This method cannot be used to delete the following types of chunked uploads, which the system deletes automatically: - Chunked uploads that have been consumed by use in another API call. - Expired chunked uploads. **Note:** If you are aware of a chunked upload that can be discarded, the best practice is to explicitly delete it. If you wait for the system to automatically delete it after it expires, the chunked upload will continue to count against your quota. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// ChunkedUploadResponse DeleteChunkedUpload(string accountId, string chunkedUploadId); /// /// Delete an existing ChunkedUpload. /// /// /// Deletes a chunked upload that has been committed but not yet consumed. This method cannot be used to delete the following types of chunked uploads, which the system deletes automatically: - Chunked uploads that have been consumed by use in another API call. - Expired chunked uploads. **Note:** If you are aware of a chunked upload that can be discarded, the best practice is to explicitly delete it. If you wait for the system to automatically delete it after it expires, the chunked upload will continue to count against your quota. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// ApiResponse of ApiResponse DeleteChunkedUploadWithHttpInfo(string accountId, string chunkedUploadId); /// /// Deletes envelope custom fields for draft and in-process envelopes. /// /// /// Deletes envelope custom fields for draft and in-process envelopes. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// CustomFields DeleteCustomFields(string accountId, string envelopeId, CustomFields customFields = null); /// /// Deletes envelope custom fields for draft and in-process envelopes. /// /// /// Deletes envelope custom fields for draft and in-process envelopes. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse DeleteCustomFieldsWithHttpInfo(string accountId, string envelopeId, CustomFields customFields = null); /// /// Deletes custom document fields from an existing envelope document. /// /// /// Deletes custom document fields from an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// DocumentFieldsInformation DeleteDocumentFields(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null); /// /// Deletes custom document fields from an existing envelope document. /// /// /// Deletes custom document fields from an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// ApiResponse of ApiResponse DeleteDocumentFieldsWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null); /// /// Deletes a page from a document in an envelope. /// /// /// Deletes a page from a document in an envelope based on the page number. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// void DeleteDocumentPage(string accountId, string envelopeId, string documentId, string pageNumber); /// /// Deletes a page from a document in an envelope. /// /// /// Deletes a page from a document in an envelope based on the page number. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// ApiResponse of Object(void) ApiResponse DeleteDocumentPageWithHttpInfo(string accountId, string envelopeId, string documentId, string pageNumber); /// /// Deletes tabs from an envelope document /// /// /// Deletes tabs from the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Tabs DeleteDocumentTabs(string accountId, string envelopeId, string documentId, Tabs tabs = null); /// /// Deletes tabs from an envelope document /// /// /// Deletes tabs from the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// ApiResponse of ApiResponse DeleteDocumentTabsWithHttpInfo(string accountId, string envelopeId, string documentId, Tabs tabs = null); /// /// Deletes documents from a draft envelope. /// /// /// Deletes one or more documents from an existing draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// EnvelopeDocumentsResult DeleteDocuments(string accountId, string envelopeId, EnvelopeDefinition envelopeDefinition = null); /// /// Deletes documents from a draft envelope. /// /// /// Deletes one or more documents from an existing draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse DeleteDocumentsWithHttpInfo(string accountId, string envelopeId, EnvelopeDefinition envelopeDefinition = null); /// /// Deletes the email setting overrides for an envelope. /// /// /// Deletes all existing email override settings for the envelope. If you want to delete an individual email override setting, use the PUT and set the value to an empty string. Note that deleting email settings will only affect email communications that occur after the deletion and the normal account email settings are used for future email communications. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// EmailSettings DeleteEmailSettings(string accountId, string envelopeId); /// /// Deletes the email setting overrides for an envelope. /// /// /// Deletes all existing email override settings for the envelope. If you want to delete an individual email override setting, use the PUT and set the value to an empty string. Note that deleting email settings will only affect email communications that occur after the deletion and the normal account email settings are used for future email communications. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of ApiResponse DeleteEmailSettingsWithHttpInfo(string accountId, string envelopeId); /// /// Revokes the correction view URL to the Envelope UI /// /// /// Revokes the correction view URL to the Envelope UI. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// void DeleteEnvelopeCorrectView(string accountId, string envelopeId, CorrectViewRequest correctViewRequest = null); /// /// Revokes the correction view URL to the Envelope UI /// /// /// Revokes the correction view URL to the Envelope UI. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of Object(void) ApiResponse DeleteEnvelopeCorrectViewWithHttpInfo(string accountId, string envelopeId, CorrectViewRequest correctViewRequest = null); /// /// Deletes the delayed routing rules for the specified envelope workflow step. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// void DeleteEnvelopeDelayedRoutingDefinition(string accountId, string envelopeId, string workflowStepId); /// /// Deletes the delayed routing rules for the specified envelope workflow step. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// ApiResponse of Object(void) ApiResponse DeleteEnvelopeDelayedRoutingDefinitionWithHttpInfo(string accountId, string envelopeId, string workflowStepId); /// /// Deletes the scheduled sending rules for the envelope's workflow. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// void DeleteEnvelopeScheduledSendingDefinition(string accountId, string envelopeId); /// /// Deletes the scheduled sending rules for the envelope's workflow. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of Object(void) ApiResponse DeleteEnvelopeScheduledSendingDefinitionWithHttpInfo(string accountId, string envelopeId); /// /// Delete envelope transfer rules for an account. /// /// /// This method deletes an envelope transfer rule. **Note:** Only Administrators can delete envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// void DeleteEnvelopeTransferRules(string accountId, string envelopeTransferRuleId); /// /// Delete envelope transfer rules for an account. /// /// /// This method deletes an envelope transfer rule. **Note:** Only Administrators can delete envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// ApiResponse of Object(void) ApiResponse DeleteEnvelopeTransferRulesWithHttpInfo(string accountId, string envelopeTransferRuleId); /// /// Delete the workflow definition for an envelope. /// /// /// Deletes the specified envelope's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// void DeleteEnvelopeWorkflowDefinition(string accountId, string envelopeId); /// /// Delete the workflow definition for an envelope. /// /// /// Deletes the specified envelope's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of Object(void) ApiResponse DeleteEnvelopeWorkflowDefinitionWithHttpInfo(string accountId, string envelopeId); /// /// Deletes the envelope workflow step definition for an envelope's workflow by step id. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// void DeleteEnvelopeWorkflowStepDefinition(string accountId, string envelopeId, string workflowStepId); /// /// Deletes the envelope workflow step definition for an envelope's workflow by step id. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// ApiResponse of Object(void) ApiResponse DeleteEnvelopeWorkflowStepDefinitionWithHttpInfo(string accountId, string envelopeId, string workflowStepId); /// /// Deletes an envelope lock. /// /// /// Deletes the lock from the specified envelope. The `X-DocuSign-Edit` header must be included in the request. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// LockInformation DeleteLock(string accountId, string envelopeId); /// /// Deletes an envelope lock. /// /// /// Deletes the lock from the specified envelope. The `X-DocuSign-Edit` header must be included in the request. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of ApiResponse DeleteLockWithHttpInfo(string accountId, string envelopeId); /// /// Deletes a recipient from an envelope. /// /// /// Deletes the specified recipient file from the specified envelope. This cannot be used if the envelope has been sent. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Recipients DeleteRecipient(string accountId, string envelopeId, string recipientId); /// /// Deletes a recipient from an envelope. /// /// /// Deletes the specified recipient file from the specified envelope. This cannot be used if the envelope has been sent. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// ApiResponse of ApiResponse DeleteRecipientWithHttpInfo(string accountId, string envelopeId, string recipientId); /// /// Deletes recipients from an envelope. /// /// /// Deletes one or more recipients from a draft or sent envelope. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients. If the envelope is `In Process`, meaning that it has been sent and has not been completed or voided, recipients that have completed their actions cannot be deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Recipients DeleteRecipients(string accountId, string envelopeId, Recipients recipients = null); /// /// Deletes recipients from an envelope. /// /// /// Deletes one or more recipients from a draft or sent envelope. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients. If the envelope is `In Process`, meaning that it has been sent and has not been completed or voided, recipients that have completed their actions cannot be deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse DeleteRecipientsWithHttpInfo(string accountId, string envelopeId, Recipients recipients = null); /// /// Deletes the tabs associated with a recipient. /// /// /// Deletes one or more tabs associated with a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Tabs DeleteTabs(string accountId, string envelopeId, string recipientId, Tabs tabs = null); /// /// Deletes the tabs associated with a recipient. /// /// /// Deletes one or more tabs associated with a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// ApiResponse of ApiResponse DeleteTabsWithHttpInfo(string accountId, string envelopeId, string recipientId, Tabs tabs = null); /// /// Deletes the delayed routing rules for the specified template workflow step. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// void DeleteTemplateDelayedRoutingDefinition(string accountId, string templateId, string workflowStepId); /// /// Deletes the delayed routing rules for the specified template workflow step. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// ApiResponse of Object(void) ApiResponse DeleteTemplateDelayedRoutingDefinitionWithHttpInfo(string accountId, string templateId, string workflowStepId); /// /// Deletes the scheduled sending rules for the template's workflow. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// void DeleteTemplateScheduledSendingDefinition(string accountId, string templateId); /// /// Deletes the scheduled sending rules for the template's workflow. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// ApiResponse of Object(void) ApiResponse DeleteTemplateScheduledSendingDefinitionWithHttpInfo(string accountId, string templateId); /// /// Delete the workflow definition for a template. /// /// /// Deletes the specified template's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// void DeleteTemplateWorkflowDefinition(string accountId, string templateId); /// /// Delete the workflow definition for a template. /// /// /// Deletes the specified template's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// ApiResponse of Object(void) ApiResponse DeleteTemplateWorkflowDefinitionWithHttpInfo(string accountId, string templateId); /// /// Deletes the workflow step definition for an template's workflow by step id. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// void DeleteTemplateWorkflowStepDefinition(string accountId, string templateId, string workflowStepId); /// /// Deletes the workflow step definition for an template's workflow by step id. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// ApiResponse of Object(void) ApiResponse DeleteTemplateWorkflowStepDefinitionWithHttpInfo(string accountId, string templateId, string workflowStepId); /// /// Deletes a template from a document in an existing envelope. /// /// /// Deletes the specified template from a document in an existing envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The ID of the template being accessed. /// void DeleteTemplatesFromDocument(string accountId, string envelopeId, string documentId, string templateId); /// /// Deletes a template from a document in an existing envelope. /// /// /// Deletes the specified template from a document in an existing envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The ID of the template being accessed. /// ApiResponse of Object(void) ApiResponse DeleteTemplatesFromDocumentWithHttpInfo(string accountId, string envelopeId, string documentId, string templateId); /// /// Retrieves an attachment from the envelope. /// /// /// Retrieves an attachment from an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// System.IO.Stream GetAttachment(string accountId, string envelopeId, string attachmentId); /// /// Retrieves an attachment from the envelope. /// /// /// Retrieves an attachment from an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// ApiResponse of ApiResponse GetAttachmentWithHttpInfo(string accountId, string envelopeId, string attachmentId); /// /// Returns a list of attachments associated with the specified envelope /// /// /// Returns a list of attachments associated with a specified envelope /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// EnvelopeAttachmentsResult GetAttachments(string accountId, string envelopeId); /// /// Returns a list of attachments associated with the specified envelope /// /// /// Returns a list of attachments associated with a specified envelope /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of ApiResponse GetAttachmentsWithHttpInfo(string accountId, string envelopeId); /// /// Retrieves the current metadata of a ChunkedUpload. /// /// /// Returns the details (but not the content) about a chunked upload. **Note:** You cannot obtain details about a chunked upload that has expired, been deleted, or consumed by other actions. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Options for modifying the behavior of the function. /// ChunkedUploadResponse GetChunkedUpload(string accountId, string chunkedUploadId, EnvelopesApi.GetChunkedUploadOptions options = null); /// /// Retrieves the current metadata of a ChunkedUpload. /// /// /// Returns the details (but not the content) about a chunked upload. **Note:** You cannot obtain details about a chunked upload that has expired, been deleted, or consumed by other actions. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse GetChunkedUploadWithHttpInfo(string accountId, string chunkedUploadId, EnvelopesApi.GetChunkedUploadOptions options = null); /// /// Gets comment transcript for envelope and user /// /// /// Retrieves a PDF file containing all of the comments that senders and recipients have added to the documents in an envelope. The response body of this method is the PDF file as a byte stream. **Note:** Comments are disabled by default. To use the comments feature, an account administrator must enable comments on the account (in the `accountSettingsInformation` object, set the `enableSigningExtensionComments` property to **true**). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// System.IO.Stream GetCommentsTranscript(string accountId, string envelopeId, EnvelopesApi.GetCommentsTranscriptOptions options = null); /// /// Gets comment transcript for envelope and user /// /// /// Retrieves a PDF file containing all of the comments that senders and recipients have added to the documents in an envelope. The response body of this method is the PDF file as a byte stream. **Note:** Comments are disabled by default. To use the comments feature, an account administrator must enable comments on the account (in the `accountSettingsInformation` object, set the `enableSigningExtensionComments` property to **true**). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse GetCommentsTranscriptWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.GetCommentsTranscriptOptions options = null); /// /// Reserved: Gets the Electronic Record and Signature Disclosure associated with the account. /// /// /// Reserved: Retrieves the Electronic Record and Signature Disclosure, with HTML formatting, associated with the account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. /// Options for modifying the behavior of the function. /// ConsumerDisclosure GetConsumerDisclosure(string accountId, string envelopeId, string recipientId, string langCode, EnvelopesApi.GetConsumerDisclosureOptions options = null); /// /// Reserved: Gets the Electronic Record and Signature Disclosure associated with the account. /// /// /// Reserved: Retrieves the Electronic Record and Signature Disclosure, with HTML formatting, associated with the account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse GetConsumerDisclosureWithHttpInfo(string accountId, string envelopeId, string recipientId, string langCode, EnvelopesApi.GetConsumerDisclosureOptions options = null); /// /// Gets the Electronic Record and Signature Disclosure associated with the account. /// /// /// Retrieves the Electronic Record and Signature Disclosure, with html formatting, associated with the account. You can use an optional query string to set the language for the disclosure. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// ConsumerDisclosure GetConsumerDisclosureDefault(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetConsumerDisclosureDefaultOptions options = null); /// /// Gets the Electronic Record and Signature Disclosure associated with the account. /// /// /// Retrieves the Electronic Record and Signature Disclosure, with html formatting, associated with the account. You can use an optional query string to set the language for the disclosure. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse GetConsumerDisclosureDefaultWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetConsumerDisclosureDefaultOptions options = null); /// /// Gets a document from an envelope. /// /// /// Retrieves the specified document from the envelope. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. You can also use this method to retrieve a PDF containing the combined content of all documents and the certificate. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. To retrieve the combined content replace the `{documentId}` parameter in the endpoint with `combined`. /accounts/{accountId}/envelopes/{envelopeId}/documents/combined /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// System.IO.Stream GetDocument(string accountId, string envelopeId, string documentId, EnvelopesApi.GetDocumentOptions options = null); /// /// Gets a document from an envelope. /// /// /// Retrieves the specified document from the envelope. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. You can also use this method to retrieve a PDF containing the combined content of all documents and the certificate. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. To retrieve the combined content replace the `{documentId}` parameter in the endpoint with `combined`. /accounts/{accountId}/envelopes/{envelopeId}/documents/combined /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse GetDocumentWithHttpInfo(string accountId, string envelopeId, string documentId, EnvelopesApi.GetDocumentOptions options = null); /// /// Gets a page image from an envelope for display. /// /// /// Retrieves a page image for display from the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Options for modifying the behavior of the function. /// System.IO.Stream GetDocumentPageImage(string accountId, string envelopeId, string documentId, string pageNumber, EnvelopesApi.GetDocumentPageImageOptions options = null); /// /// Gets a page image from an envelope for display. /// /// /// Retrieves a page image for display from the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse GetDocumentPageImageWithHttpInfo(string accountId, string envelopeId, string documentId, string pageNumber, EnvelopesApi.GetDocumentPageImageOptions options = null); /// /// Returns tabs on the document. /// /// /// Returns the tabs on the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Tabs GetDocumentTabs(string accountId, string envelopeId, string documentId, EnvelopesApi.GetDocumentTabsOptions options = null); /// /// Returns tabs on the document. /// /// /// Returns the tabs on the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse GetDocumentTabsWithHttpInfo(string accountId, string envelopeId, string documentId, EnvelopesApi.GetDocumentTabsOptions options = null); /// /// Gets the email setting overrides for an envelope. /// /// /// Retrieves the email override settings for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// EmailSettings GetEmailSettings(string accountId, string envelopeId); /// /// Gets the email setting overrides for an envelope. /// /// /// Retrieves the email override settings for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of ApiResponse GetEmailSettingsWithHttpInfo(string accountId, string envelopeId); /// /// Gets the status of a envelope. /// /// /// Retrieves the overall status for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Envelope GetEnvelope(string accountId, string envelopeId, EnvelopesApi.GetEnvelopeOptions options = null); /// /// Gets the status of a envelope. /// /// /// Retrieves the overall status for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse GetEnvelopeWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.GetEnvelopeOptions options = null); /// /// Returns the delayed routing rules for an envelope's workflow step definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// DelayedRouting GetEnvelopeDelayedRoutingDefinition(string accountId, string envelopeId, string workflowStepId); /// /// Returns the delayed routing rules for an envelope's workflow step definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// ApiResponse of ApiResponse GetEnvelopeDelayedRoutingDefinitionWithHttpInfo(string accountId, string envelopeId, string workflowStepId); /// /// Returns formfields for an envelope /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// DocGenFormFieldResponse GetEnvelopeDocGenFormFields(string accountId, string envelopeId); /// /// Returns formfields for an envelope /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of ApiResponse GetEnvelopeDocGenFormFieldsWithHttpInfo(string accountId, string envelopeId); /// /// Get the Original HTML Definition used to generate the Responsive HTML for a given document. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// DocumentHtmlDefinitionOriginals GetEnvelopeDocumentHtmlDefinitions(string accountId, string envelopeId, string documentId); /// /// Get the Original HTML Definition used to generate the Responsive HTML for a given document. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// ApiResponse of ApiResponse GetEnvelopeDocumentHtmlDefinitionsWithHttpInfo(string accountId, string envelopeId, string documentId); /// /// Get the Original HTML Definition used to generate the Responsive HTML for the envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// DocumentHtmlDefinitionOriginals GetEnvelopeHtmlDefinitions(string accountId, string envelopeId); /// /// Get the Original HTML Definition used to generate the Responsive HTML for the envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of ApiResponse GetEnvelopeHtmlDefinitionsWithHttpInfo(string accountId, string envelopeId); /// /// Returns the scheduled sending rules for an envelope's workflow definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ScheduledSending GetEnvelopeScheduledSendingDefinition(string accountId, string envelopeId); /// /// Returns the scheduled sending rules for an envelope's workflow definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of ApiResponse GetEnvelopeScheduledSendingDefinitionWithHttpInfo(string accountId, string envelopeId); /// /// Returns a list of envelope transfer rules in the specified account. /// /// /// This method retrieves a list of envelope transfer rules associated with an account. **Note:** Only Administrators can create and use envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// Options for modifying the behavior of the function. /// EnvelopeTransferRuleInformation GetEnvelopeTransferRules(string accountId, EnvelopesApi.GetEnvelopeTransferRulesOptions options = null); /// /// Returns a list of envelope transfer rules in the specified account. /// /// /// This method retrieves a list of envelope transfer rules associated with an account. **Note:** Only Administrators can create and use envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse GetEnvelopeTransferRulesWithHttpInfo(string accountId, EnvelopesApi.GetEnvelopeTransferRulesOptions options = null); /// /// Returns the workflow definition for an envelope. /// /// /// Returns an envelope's workflow definition if the envelope specified by `envelopeId` has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Workflow GetEnvelopeWorkflowDefinition(string accountId, string envelopeId); /// /// Returns the workflow definition for an envelope. /// /// /// Returns an envelope's workflow definition if the envelope specified by `envelopeId` has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of ApiResponse GetEnvelopeWorkflowDefinitionWithHttpInfo(string accountId, string envelopeId); /// /// Returns the workflow step definition for an envelope by step id. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// WorkflowStep GetEnvelopeWorkflowStepDefinition(string accountId, string envelopeId, string workflowStepId); /// /// Returns the workflow step definition for an envelope by step id. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// ApiResponse of ApiResponse GetEnvelopeWorkflowStepDefinitionWithHttpInfo(string accountId, string envelopeId, string workflowStepId); /// /// Returns envelope form data for an existing envelope. /// /// /// This method downloads the envelope and tab data (also called form data) from any in-process, completed, or canceled envelope that you sent or that is shared with you. Recipients who are also full administrators on an account can view form data for any envelopes that another user on the account has sent to them. **Note:** To use this feature, the Sending Setting \"Allow sender to download form data\" must be enabled for the account. ### Related topics - [How to get envelope tab values](/docs/esign-rest-api/how-to/get-envelope-tab-values/) /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// EnvelopeFormData GetFormData(string accountId, string envelopeId); /// /// Returns envelope form data for an existing envelope. /// /// /// This method downloads the envelope and tab data (also called form data) from any in-process, completed, or canceled envelope that you sent or that is shared with you. Recipients who are also full administrators on an account can view form data for any envelopes that another user on the account has sent to them. **Note:** To use this feature, the Sending Setting \"Allow sender to download form data\" must be enabled for the account. ### Related topics - [How to get envelope tab values](/docs/esign-rest-api/how-to/get-envelope-tab-values/) /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of ApiResponse GetFormDataWithHttpInfo(string accountId, string envelopeId); /// /// Gets envelope lock information. /// /// /// Retrieves general information about the envelope lock. If the call is made by the locked by user and the request has the same integrator key as original, then the `X-DocuSign-Edit` header and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// LockInformation GetLock(string accountId, string envelopeId); /// /// Gets envelope lock information. /// /// /// Retrieves general information about the envelope lock. If the call is made by the locked by user and the request has the same integrator key as original, then the `X-DocuSign-Edit` header and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of ApiResponse GetLockWithHttpInfo(string accountId, string envelopeId); /// /// Gets envelope notification information. /// /// /// Retrieves the envelope notification, reminders and expirations, information for an existing envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Notification GetNotificationSettings(string accountId, string envelopeId); /// /// Gets envelope notification information. /// /// /// Retrieves the envelope notification, reminders and expirations, information for an existing envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of ApiResponse GetNotificationSettingsWithHttpInfo(string accountId, string envelopeId); /// /// Returns tabs on the specified page. /// /// /// Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Tabs GetPageTabs(string accountId, string envelopeId, string documentId, string pageNumber); /// /// Returns tabs on the specified page. /// /// /// Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// ApiResponse of ApiResponse GetPageTabsWithHttpInfo(string accountId, string envelopeId, string documentId, string pageNumber); /// /// Returns document page image(s) based on input. /// /// /// Returns images of the pages in a document for display based on the parameters that you specify. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// PageImages GetPages(string accountId, string envelopeId, string documentId, EnvelopesApi.GetPagesOptions options = null); /// /// Returns document page image(s) based on input. /// /// /// Returns images of the pages in a document for display based on the parameters that you specify. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse GetPagesWithHttpInfo(string accountId, string envelopeId, string documentId, EnvelopesApi.GetPagesOptions options = null); /// /// Returns document visibility for the recipients /// /// /// This method returns information about document visibility for a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// DocumentVisibilityList GetRecipientDocumentVisibility(string accountId, string envelopeId, string recipientId); /// /// Returns document visibility for the recipients /// /// /// This method returns information about document visibility for a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// ApiResponse of ApiResponse GetRecipientDocumentVisibilityWithHttpInfo(string accountId, string envelopeId, string recipientId); /// /// Gets the initials image for a user. /// /// /// Retrieves the initials image for the specified user. The image is returned in the same format as it was uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user id and the user must be a member of the account. The `signatureIdOrName` paramter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only contain chromed images. If getting the non-chromed image fails, try getting the chromed image. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// System.IO.Stream GetRecipientInitialsImage(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetRecipientInitialsImageOptions options = null); /// /// Gets the initials image for a user. /// /// /// Retrieves the initials image for the specified user. The image is returned in the same format as it was uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user id and the user must be a member of the account. The `signatureIdOrName` paramter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only contain chromed images. If getting the non-chromed image fails, try getting the chromed image. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse GetRecipientInitialsImageWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetRecipientInitialsImageOptions options = null); /// /// Gets signature information for a signer or sign-in-person recipient. /// /// /// Retrieves signature information for a signer or sign-in-person recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// UserSignature GetRecipientSignature(string accountId, string envelopeId, string recipientId); /// /// Gets signature information for a signer or sign-in-person recipient. /// /// /// Retrieves signature information for a signer or sign-in-person recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// ApiResponse of ApiResponse GetRecipientSignatureWithHttpInfo(string accountId, string envelopeId, string recipientId); /// /// Retrieve signature image information for a signer/sign-in-person recipient. /// /// /// Retrieves the specified user signature image. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureIdOrName` parameter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that don't properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// System.IO.Stream GetRecipientSignatureImage(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetRecipientSignatureImageOptions options = null); /// /// Retrieve signature image information for a signer/sign-in-person recipient. /// /// /// Retrieves the specified user signature image. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureIdOrName` parameter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that don't properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse GetRecipientSignatureImageWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetRecipientSignatureImageOptions options = null); /// /// Get encrypted tabs for envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// void GetTabsBlob(string accountId, string envelopeId); /// /// Get encrypted tabs for envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of Object(void) ApiResponse GetTabsBlobWithHttpInfo(string accountId, string envelopeId); /// /// Returns the delayed routing rules for a template's workflow step definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// DelayedRouting GetTemplateDelayedRoutingDefinition(string accountId, string templateId, string workflowStepId); /// /// Returns the delayed routing rules for a template's workflow step definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// ApiResponse of ApiResponse GetTemplateDelayedRoutingDefinitionWithHttpInfo(string accountId, string templateId, string workflowStepId); /// /// Returns document visibility for the recipients /// /// /// This method returns information about document visibility for a template recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// The ID of the recipient being accessed. /// DocumentVisibilityList GetTemplateRecipientDocumentVisibility(string accountId, string templateId, string recipientId); /// /// Returns document visibility for the recipients /// /// /// This method returns information about document visibility for a template recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// The ID of the recipient being accessed. /// ApiResponse of ApiResponse GetTemplateRecipientDocumentVisibilityWithHttpInfo(string accountId, string templateId, string recipientId); /// /// Returns the scheduled sending rules for a template's workflow definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// ScheduledSending GetTemplateScheduledSendingDefinition(string accountId, string templateId); /// /// Returns the scheduled sending rules for a template's workflow definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// ApiResponse of ApiResponse GetTemplateScheduledSendingDefinitionWithHttpInfo(string accountId, string templateId); /// /// Returns the workflow definition for a template. /// /// /// Returns template's workflow definition if the template specified by `templateId` has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Workflow GetTemplateWorkflowDefinition(string accountId, string templateId); /// /// Returns the workflow definition for a template. /// /// /// Returns template's workflow definition if the template specified by `templateId` has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// ApiResponse of ApiResponse GetTemplateWorkflowDefinitionWithHttpInfo(string accountId, string templateId); /// /// Returns the workflow step definition for a template by step id. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// WorkflowStep GetTemplateWorkflowStepDefinition(string accountId, string templateId, string workflowStepId); /// /// Returns the workflow step definition for a template by step id. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// ApiResponse of ApiResponse GetTemplateWorkflowStepDefinitionWithHttpInfo(string accountId, string templateId, string workflowStepId); /// /// Gets the envelope audit events for an envelope. /// /// /// Gets the envelope audit events for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// EnvelopeAuditEventResponse ListAuditEvents(string accountId, string envelopeId, EnvelopesApi.ListAuditEventsOptions options = null); /// /// Gets the envelope audit events for an envelope. /// /// /// Gets the envelope audit events for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse ListAuditEventsWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.ListAuditEventsOptions options = null); /// /// Gets the custom field information for the specified envelope. /// /// /// Retrieves the custom field information for the specified envelope. You can use these fields in the envelopes for your account to record information about the envelope, help search for envelopes, and track information. The envelope custom fields are shown in the Envelope Settings section when a user is creating an envelope in the DocuSign member console. The envelope custom fields are not seen by the envelope recipients. There are two types of envelope custom fields, text, and list. A text custom field lets the sender enter the value for the field. With a list custom field, the sender selects the value of the field from a pre-made list. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// CustomFieldsEnvelope ListCustomFields(string accountId, string envelopeId); /// /// Gets the custom field information for the specified envelope. /// /// /// Retrieves the custom field information for the specified envelope. You can use these fields in the envelopes for your account to record information about the envelope, help search for envelopes, and track information. The envelope custom fields are shown in the Envelope Settings section when a user is creating an envelope in the DocuSign member console. The envelope custom fields are not seen by the envelope recipients. There are two types of envelope custom fields, text, and list. A text custom field lets the sender enter the value for the field. With a list custom field, the sender selects the value of the field from a pre-made list. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of ApiResponse ListCustomFieldsWithHttpInfo(string accountId, string envelopeId); /// /// Gets the custom document fields from an existing envelope document. /// /// /// Retrieves the custom document field information from an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// DocumentFieldsInformation ListDocumentFields(string accountId, string envelopeId, string documentId); /// /// Gets the custom document fields from an existing envelope document. /// /// /// Retrieves the custom document field information from an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// ApiResponse of ApiResponse ListDocumentFieldsWithHttpInfo(string accountId, string envelopeId, string documentId); /// /// Gets a list of envelope documents. /// /// /// Retrieves a list of documents associated with the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// EnvelopeDocumentsResult ListDocuments(string accountId, string envelopeId, EnvelopesApi.ListDocumentsOptions options = null); /// /// Gets a list of envelope documents. /// /// /// Retrieves a list of documents associated with the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse ListDocumentsWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.ListDocumentsOptions options = null); /// /// Gets the status of recipients for an envelope. /// /// /// Retrieves the status of all recipients in a single envelope and identifies the current recipient in the routing list. The `currentRoutingOrder` property of the response contains the `routingOrder` value of the current recipient indicating that the envelope has been sent to the recipient, but the recipient has not completed their actions. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Recipients ListRecipients(string accountId, string envelopeId, EnvelopesApi.ListRecipientsOptions options = null); /// /// Gets the status of recipients for an envelope. /// /// /// Retrieves the status of all recipients in a single envelope and identifies the current recipient in the routing list. The `currentRoutingOrder` property of the response contains the `routingOrder` value of the current recipient indicating that the envelope has been sent to the recipient, but the recipient has not completed their actions. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse ListRecipientsWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.ListRecipientsOptions options = null); /// /// Gets the envelope status for the specified envelopes. /// /// /// Retrieves the envelope status for the specified envelopes. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Options for modifying the behavior of the function. /// EnvelopesInformation ListStatus(string accountId, EnvelopeIdsRequest envelopeIdsRequest = null, EnvelopesApi.ListStatusOptions options = null); /// /// Gets the envelope status for the specified envelopes. /// /// /// Retrieves the envelope status for the specified envelopes. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse ListStatusWithHttpInfo(string accountId, EnvelopeIdsRequest envelopeIdsRequest = null, EnvelopesApi.ListStatusOptions options = null); /// /// Gets status changes for one or more envelopes. /// /// /// Retrieves envelope status changes for all envelopes. You can modify the information returned by adding query strings to limit the request to check between certain dates and times, or for certain envelopes, or for certain status codes. It is recommended that you use one or more of the query strings in order to limit the size of the response. ### Important: Unless you are requesting the status for specific envelopes (using the `envelopeIds` or `transactionIds` properties), you must add a set the `from_date` property in the request. Getting envelope status using `transactionIds` is useful for offline signing situations where it can be used determine if an envelope was created or not, for the cases where a network connection was lost, before the envelope status could be returned. ### Request Envelope Status Notes ### The REST API GET /envelopes call uses certain filters to find results. In some cases requests are check for \"any status change\" instead of the just the single status requested. In these cases, more envelopes might be returned by the request than otherwise would be. For example, for a request with the begin date is set to Jan 1st, an end date set to Jan 7th and the status qualifier (`from_to_status`) set to `Delivered` &mdash; the response set might contain envelopes that were created during that time period, but not delivered during the time period. To avoid unnecessary database queries, the DocuSign system checks requests to ensure that the added filters will not result in a zero-size response before acting on the request. The following table shows the valid envelope statuses (in the Valid Current Statuses column) for the status qualifiers 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. For example, a request with a status qualifier (from_to_status) of `Delivered` and a status of \"`Created`,`Sent`\", DocuSign will always return an empty list. This is because the request essentially translates to: find the envelopes that were delivered between the begin and end dates that have a current status of `Created` or `Sent`, and 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 run the request, but just returns the empty list. Client applications should check that the statuses they are requesting make sense for a given status qualifier. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// Options for modifying the behavior of the function. /// EnvelopesInformation ListStatusChanges(string accountId, EnvelopesApi.ListStatusChangesOptions options = null); /// /// Gets status changes for one or more envelopes. /// /// /// Retrieves envelope status changes for all envelopes. You can modify the information returned by adding query strings to limit the request to check between certain dates and times, or for certain envelopes, or for certain status codes. It is recommended that you use one or more of the query strings in order to limit the size of the response. ### Important: Unless you are requesting the status for specific envelopes (using the `envelopeIds` or `transactionIds` properties), you must add a set the `from_date` property in the request. Getting envelope status using `transactionIds` is useful for offline signing situations where it can be used determine if an envelope was created or not, for the cases where a network connection was lost, before the envelope status could be returned. ### Request Envelope Status Notes ### The REST API GET /envelopes call uses certain filters to find results. In some cases requests are check for \"any status change\" instead of the just the single status requested. In these cases, more envelopes might be returned by the request than otherwise would be. For example, for a request with the begin date is set to Jan 1st, an end date set to Jan 7th and the status qualifier (`from_to_status`) set to `Delivered` &mdash; the response set might contain envelopes that were created during that time period, but not delivered during the time period. To avoid unnecessary database queries, the DocuSign system checks requests to ensure that the added filters will not result in a zero-size response before acting on the request. The following table shows the valid envelope statuses (in the Valid Current Statuses column) for the status qualifiers 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. For example, a request with a status qualifier (from_to_status) of `Delivered` and a status of \"`Created`,`Sent`\", DocuSign will always return an empty list. This is because the request essentially translates to: find the envelopes that were delivered between the begin and end dates that have a current status of `Created` or `Sent`, and 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 run the request, but just returns the empty list. Client applications should check that the statuses they are requesting make sense for a given status qualifier. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse ListStatusChangesWithHttpInfo(string accountId, EnvelopesApi.ListStatusChangesOptions options = null); /// /// Gets the tabs information for a signer or sign-in-person recipient in an envelope. /// /// /// Retrieves information about the tabs associated with a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Tabs ListTabs(string accountId, string envelopeId, string recipientId, EnvelopesApi.ListTabsOptions options = null); /// /// Gets the tabs information for a signer or sign-in-person recipient in an envelope. /// /// /// Retrieves information about the tabs associated with a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse ListTabsWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.ListTabsOptions options = null); /// /// Get List of Templates used in an Envelope /// /// /// This returns a list of the server-side templates, their name and ID, used in an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// TemplateInformation ListTemplates(string accountId, string envelopeId, EnvelopesApi.ListTemplatesOptions options = null); /// /// Get List of Templates used in an Envelope /// /// /// This returns a list of the server-side templates, their name and ID, used in an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse ListTemplatesWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.ListTemplatesOptions options = null); /// /// Gets the templates associated with a document in an existing envelope. /// /// /// Retrieves the templates associated with a document in the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// TemplateInformation ListTemplatesForDocument(string accountId, string envelopeId, string documentId, EnvelopesApi.ListTemplatesForDocumentOptions options = null); /// /// Gets the templates associated with a document in an existing envelope. /// /// /// Retrieves the templates associated with a document in the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse ListTemplatesForDocumentWithHttpInfo(string accountId, string envelopeId, string documentId, EnvelopesApi.ListTemplatesForDocumentOptions options = null); /// /// Add an attachment to a DRAFT or IN-PROCESS envelope. /// /// /// Adds an attachment to a draft or in-process envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// EnvelopeAttachmentsResult PutAttachment(string accountId, string envelopeId, string attachmentId, Attachment attachment = null); /// /// Add an attachment to a DRAFT or IN-PROCESS envelope. /// /// /// Adds an attachment to a draft or in-process envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// ApiResponse of ApiResponse PutAttachmentWithHttpInfo(string accountId, string envelopeId, string attachmentId, Attachment attachment = null); /// /// Add one or more attachments to a DRAFT or IN-PROCESS envelope. /// /// /// Adds one or more attachments to a draft or in-process envelope. Envelope attachments are files that an application can include in an envelope. They are not converted to PDF. Envelope attachments are available only through the API. There is no user interface in the DocuSign web application for them. For a list of supported file formats, see [Supported File Formats](https://support.docusign.com/guides/ndse-user-guide-supported-file-formats). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// EnvelopeAttachmentsResult PutAttachments(string accountId, string envelopeId, EnvelopeAttachmentsRequest envelopeAttachmentsRequest = null); /// /// Add one or more attachments to a DRAFT or IN-PROCESS envelope. /// /// /// Adds one or more attachments to a draft or in-process envelope. Envelope attachments are files that an application can include in an envelope. They are not converted to PDF. Envelope attachments are available only through the API. There is no user interface in the DocuSign web application for them. For a list of supported file formats, see [Supported File Formats](https://support.docusign.com/guides/ndse-user-guide-supported-file-formats). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse PutAttachmentsWithHttpInfo(string accountId, string envelopeId, EnvelopeAttachmentsRequest envelopeAttachmentsRequest = null); /// /// Rotates page image from an envelope for display. /// /// /// Rotates page image from an envelope for display. The page image can be rotated to the left or right. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// (optional) /// void RotateDocumentPage(string accountId, string envelopeId, string documentId, string pageNumber, PageRequest pageRequest = null); /// /// Rotates page image from an envelope for display. /// /// /// Rotates page image from an envelope for display. The page image can be rotated to the left or right. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// (optional) /// ApiResponse of Object(void) ApiResponse RotateDocumentPageWithHttpInfo(string accountId, string envelopeId, string documentId, string pageNumber, PageRequest pageRequest = null); /// /// Send Draft Envelope/Void Envelope/Move/Purge Envelope/Modify draft /// /// /// The Put Envelopes endpoint provides the following functionality: * Sends the specified single draft envelope. Add {\"status\":\"sent\"} to the request body to send the envelope. * Voids the specified in-process envelope. Add {\"status\":\"voided\", \"voidedReason\":\"The reason for voiding the envelope\"} to the request body to void the envelope. * Replaces the current email subject and message for a draft envelope. Add {\"emailSubject\":\"subject\", \"emailBlurb\":\"message\"} to the request body to modify the subject and message. * Place the envelope documents and envelope metadata in a purge queue so that this information is removed from the DocuSign system. Add {\"purgeState\":\"purge type\"} to the request body. *Additional information on purging documents* The purge request can only be used for completed envelopes that are not marked as the authoritative copy. The requesting user must have permission to purge documents and must be the sender (the requesting user can act as the sender using Send On Behalf Of). ###### Note: If you have set the Document Retention policy on your account, envelope documents are automatically placed in the purge queue and the warning emails are sent at the end of the retention period. ###### Note: You can set the Document Retention policy in the Classic DocuSign Experience by specifying the number of days to retain documents. ###### Note: Setting a Document Retention policy is the same as setting a schedule for purging documents. When the purge request is initiated the envelope documents, or documents and envelope metadata, are placed in a purge queue for deletion in 14 days. A warning email notification is sent to the sender and recipients associated with the envelope, notifying them that the envelope documents will be deleted in 14 days and providing a link to the documents. A second email is sent 7 days later with the same message. At the end of the 14-day period, the envelope documents are deleted from the system. If `purgeState=\"documents_queued\"` is used in the request, then only the documents are deleted and any corresponding attachments and tabs remain in the DocuSign system. If `purgeState= \"documents_and_metadata_queued\"` is used in the request, then the documents, attachments, and tabs are deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// EnvelopeUpdateSummary Update(string accountId, string envelopeId, Envelope envelope = null, EnvelopesApi.UpdateOptions options = null); /// /// Send Draft Envelope/Void Envelope/Move/Purge Envelope/Modify draft /// /// /// The Put Envelopes endpoint provides the following functionality: * Sends the specified single draft envelope. Add {\"status\":\"sent\"} to the request body to send the envelope. * Voids the specified in-process envelope. Add {\"status\":\"voided\", \"voidedReason\":\"The reason for voiding the envelope\"} to the request body to void the envelope. * Replaces the current email subject and message for a draft envelope. Add {\"emailSubject\":\"subject\", \"emailBlurb\":\"message\"} to the request body to modify the subject and message. * Place the envelope documents and envelope metadata in a purge queue so that this information is removed from the DocuSign system. Add {\"purgeState\":\"purge type\"} to the request body. *Additional information on purging documents* The purge request can only be used for completed envelopes that are not marked as the authoritative copy. The requesting user must have permission to purge documents and must be the sender (the requesting user can act as the sender using Send On Behalf Of). ###### Note: If you have set the Document Retention policy on your account, envelope documents are automatically placed in the purge queue and the warning emails are sent at the end of the retention period. ###### Note: You can set the Document Retention policy in the Classic DocuSign Experience by specifying the number of days to retain documents. ###### Note: Setting a Document Retention policy is the same as setting a schedule for purging documents. When the purge request is initiated the envelope documents, or documents and envelope metadata, are placed in a purge queue for deletion in 14 days. A warning email notification is sent to the sender and recipients associated with the envelope, notifying them that the envelope documents will be deleted in 14 days and providing a link to the documents. A second email is sent 7 days later with the same message. At the end of the 14-day period, the envelope documents are deleted from the system. If `purgeState=\"documents_queued\"` is used in the request, then only the documents are deleted and any corresponding attachments and tabs remain in the DocuSign system. If `purgeState= \"documents_and_metadata_queued\"` is used in the request, then the documents, attachments, and tabs are deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse UpdateWithHttpInfo(string accountId, string envelopeId, Envelope envelope = null, EnvelopesApi.UpdateOptions options = null); /// /// Integrity-Check and Commit a ChunkedUpload, readying it for use elsewhere. /// /// /// This method checks the integrity of a chunked upload and then commits it. When this request is successful, the chunked upload is then ready to be referenced in other API calls. If the request is unsuccessful, ensure that you have uploaded all of the parts by using the Update method. **Note:** After you commit a chunked upload, it no longer accepts additional parts. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Options for modifying the behavior of the function. /// ChunkedUploadResponse UpdateChunkedUpload(string accountId, string chunkedUploadId, EnvelopesApi.UpdateChunkedUploadOptions options = null); /// /// Integrity-Check and Commit a ChunkedUpload, readying it for use elsewhere. /// /// /// This method checks the integrity of a chunked upload and then commits it. When this request is successful, the chunked upload is then ready to be referenced in other API calls. If the request is unsuccessful, ensure that you have uploaded all of the parts by using the Update method. **Note:** After you commit a chunked upload, it no longer accepts additional parts. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse UpdateChunkedUploadWithHttpInfo(string accountId, string chunkedUploadId, EnvelopesApi.UpdateChunkedUploadOptions options = null); /// /// Add a chunk, a chunk 'part', to an existing ChunkedUpload. /// /// /// Adds a chunk or part to an existing chunked upload. After you use the Create method to initiate a new chunked upload and upload the first part, use this method to upload subsequent parts. For simplicity, DocuSign recommends that you upload the parts in their sequential order ( 1,2, 3, 4, etc.). The Create method adds the first part and assigns it the `sequence` value `0`. As a result, DocuSign recommends that you start with a `sequence` value of `1` when you use this method, and continue uploading parts contiguously until you have uploaded the entirety of the original content to DocuSign. Example: ``` PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/1 PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/2 PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/3 ``` **Note:** You cannot replace a part that DocuSign has already received, or add parts to a chunked upload that is already successfully committed. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// /// (optional) /// ChunkedUploadResponse UpdateChunkedUploadPart(string accountId, string chunkedUploadId, string chunkedUploadPartSeq, ChunkedUploadRequest chunkedUploadRequest = null); /// /// Add a chunk, a chunk 'part', to an existing ChunkedUpload. /// /// /// Adds a chunk or part to an existing chunked upload. After you use the Create method to initiate a new chunked upload and upload the first part, use this method to upload subsequent parts. For simplicity, DocuSign recommends that you upload the parts in their sequential order ( 1,2, 3, 4, etc.). The Create method adds the first part and assigns it the `sequence` value `0`. As a result, DocuSign recommends that you start with a `sequence` value of `1` when you use this method, and continue uploading parts contiguously until you have uploaded the entirety of the original content to DocuSign. Example: ``` PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/1 PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/2 PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/3 ``` **Note:** You cannot replace a part that DocuSign has already received, or add parts to a chunked upload that is already successfully committed. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// /// (optional) /// ApiResponse of ApiResponse UpdateChunkedUploadPartWithHttpInfo(string accountId, string chunkedUploadId, string chunkedUploadPartSeq, ChunkedUploadRequest chunkedUploadRequest = null); /// /// Updates envelope custom fields in an envelope. /// /// /// Updates the envelope custom fields in draft and in-process envelopes. Each custom field used in an envelope must have a unique name. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// CustomFields UpdateCustomFields(string accountId, string envelopeId, CustomFields customFields = null); /// /// Updates envelope custom fields in an envelope. /// /// /// Updates the envelope custom fields in draft and in-process envelopes. Each custom field used in an envelope must have a unique name. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse UpdateCustomFieldsWithHttpInfo(string accountId, string envelopeId, CustomFields customFields = null); /// /// Adds a document to an existing draft envelope. /// /// /// Adds a document to an existing draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Updated document content. /// EnvelopeDocument UpdateDocument(string accountId, string envelopeId, string documentId, byte[] documentFileBytes); /// /// Adds a document to an existing draft envelope. /// /// /// Adds a document to an existing draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Updated document content. /// ApiResponse of ApiResponse UpdateDocumentWithHttpInfo(string accountId, string envelopeId, string documentId, byte[] documentFileBytes); /// /// Updates existing custom document fields in an existing envelope document. /// /// /// Updates existing custom document fields in an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// DocumentFieldsInformation UpdateDocumentFields(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null); /// /// Updates existing custom document fields in an existing envelope document. /// /// /// Updates existing custom document fields in an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// ApiResponse of ApiResponse UpdateDocumentFieldsWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null); /// /// Updates the tabs for an envelope document /// /// /// Updates tabs in the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Tabs UpdateDocumentTabs(string accountId, string envelopeId, string documentId, Tabs tabs = null); /// /// Updates the tabs for an envelope document /// /// /// Updates tabs in the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// ApiResponse of ApiResponse UpdateDocumentTabsWithHttpInfo(string accountId, string envelopeId, string documentId, Tabs tabs = null); /// /// Adds one or more documents to an existing envelope document. /// /// /// Adds one or more documents to an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// EnvelopeDocumentsResult UpdateDocuments(string accountId, string envelopeId, EnvelopeDefinition envelopeDefinition = null); /// /// Adds one or more documents to an existing envelope document. /// /// /// Adds one or more documents to an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse UpdateDocumentsWithHttpInfo(string accountId, string envelopeId, EnvelopeDefinition envelopeDefinition = null); /// /// Updates the email setting overrides for an envelope. /// /// /// Updates the existing email override settings for the specified envelope. Note that modifying email settings will only affect email communications that occur after the modification was made. This can also be used to delete an individual email override setting by using an empty string for the value to be deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// EmailSettings UpdateEmailSettings(string accountId, string envelopeId, EmailSettings emailSettings = null); /// /// Updates the email setting overrides for an envelope. /// /// /// Updates the existing email override settings for the specified envelope. Note that modifying email settings will only affect email communications that occur after the modification was made. This can also be used to delete an individual email override setting by using an empty string for the value to be deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse UpdateEmailSettingsWithHttpInfo(string accountId, string envelopeId, EmailSettings emailSettings = null); /// /// Updates the delayed routing rules for an envelope's workflow step definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// DelayedRouting UpdateEnvelopeDelayedRoutingDefinition(string accountId, string envelopeId, string workflowStepId, DelayedRouting delayedRouting = null); /// /// Updates the delayed routing rules for an envelope's workflow step definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// ApiResponse of ApiResponse UpdateEnvelopeDelayedRoutingDefinitionWithHttpInfo(string accountId, string envelopeId, string workflowStepId, DelayedRouting delayedRouting = null); /// /// Updates formfields for an envelope /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// DocGenFormFieldResponse UpdateEnvelopeDocGenFormFields(string accountId, string envelopeId, DocGenFormFieldRequest docGenFormFieldRequest = null, EnvelopesApi.UpdateEnvelopeDocGenFormFieldsOptions options = null); /// /// Updates formfields for an envelope /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse UpdateEnvelopeDocGenFormFieldsWithHttpInfo(string accountId, string envelopeId, DocGenFormFieldRequest docGenFormFieldRequest = null, EnvelopesApi.UpdateEnvelopeDocGenFormFieldsOptions options = null); /// /// Updates the scheduled sending rules for an envelope's workflow definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ScheduledSending UpdateEnvelopeScheduledSendingDefinition(string accountId, string envelopeId, ScheduledSending scheduledSending = null); /// /// Updates the scheduled sending rules for an envelope's workflow definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse UpdateEnvelopeScheduledSendingDefinitionWithHttpInfo(string accountId, string envelopeId, ScheduledSending scheduledSending = null); /// /// Update an envelope transfer rule for an account. /// /// /// This method changes the status of an envelope transfer rule. You use this method to change whether or not the rule is enabled. You must include the `envelopeTransferRuleId` both as a query parameter, and in the request body. **Note:** You cannot change any other information about the envelope transfer rule. Only Administrators can update an envelope transfer rule. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// (optional) /// EnvelopeTransferRule UpdateEnvelopeTransferRule(string accountId, string envelopeTransferRuleId, EnvelopeTransferRule envelopeTransferRule = null); /// /// Update an envelope transfer rule for an account. /// /// /// This method changes the status of an envelope transfer rule. You use this method to change whether or not the rule is enabled. You must include the `envelopeTransferRuleId` both as a query parameter, and in the request body. **Note:** You cannot change any other information about the envelope transfer rule. Only Administrators can update an envelope transfer rule. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// (optional) /// ApiResponse of ApiResponse UpdateEnvelopeTransferRuleWithHttpInfo(string accountId, string envelopeTransferRuleId, EnvelopeTransferRule envelopeTransferRule = null); /// /// Update envelope transfer rules for an account. /// /// /// This method changes the status for one or more envelope transfer rules based on the `envelopeTransferRuleId`s in the request body. You use this method to change whether or not the rules are enabled. **Note:** You cannot change any other information about the envelope transfer rule. Only Administrators can update envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// EnvelopeTransferRuleInformation UpdateEnvelopeTransferRules(string accountId, EnvelopeTransferRuleInformation envelopeTransferRuleInformation = null); /// /// Update envelope transfer rules for an account. /// /// /// This method changes the status for one or more envelope transfer rules based on the `envelopeTransferRuleId`s in the request body. You use this method to change whether or not the rules are enabled. **Note:** You cannot change any other information about the envelope transfer rule. Only Administrators can update envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// ApiResponse of ApiResponse UpdateEnvelopeTransferRulesWithHttpInfo(string accountId, EnvelopeTransferRuleInformation envelopeTransferRuleInformation = null); /// /// Updates the envelope workflow definition for an envelope. /// /// /// Updates the specified envelope's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Workflow UpdateEnvelopeWorkflowDefinition(string accountId, string envelopeId, Workflow workflow = null); /// /// Updates the envelope workflow definition for an envelope. /// /// /// Updates the specified envelope's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse UpdateEnvelopeWorkflowDefinitionWithHttpInfo(string accountId, string envelopeId, Workflow workflow = null); /// /// Updates the envelope workflow step definition for an envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// WorkflowStep UpdateEnvelopeWorkflowStepDefinition(string accountId, string envelopeId, string workflowStepId, WorkflowStep workflowStep = null); /// /// Updates the envelope workflow step definition for an envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// ApiResponse of ApiResponse UpdateEnvelopeWorkflowStepDefinitionWithHttpInfo(string accountId, string envelopeId, string workflowStepId, WorkflowStep workflowStep = null); /// /// Updates an envelope lock. /// /// /// Updates the lock duration time or update the `lockedByApp` property information for the specified envelope. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// LockInformation UpdateLock(string accountId, string envelopeId, LockRequest lockRequest = null); /// /// Updates an envelope lock. /// /// /// Updates the lock duration time or update the `lockedByApp` property information for the specified envelope. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse UpdateLockWithHttpInfo(string accountId, string envelopeId, LockRequest lockRequest = null); /// /// Sets envelope notification (Reminders/Expirations) structure for an existing envelope. /// /// /// This method sets the notifications (reminders and expirations) for an existing envelope. The request body sends a structure containing reminders and expirations settings. It also specifies whether to use the settings specified in the request, or the account default notification settings for the envelope. Note that this request only specifies when notifications are sent; it does not initiate sending of email messages. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Notification UpdateNotificationSettings(string accountId, string envelopeId, EnvelopeNotificationRequest envelopeNotificationRequest = null); /// /// Sets envelope notification (Reminders/Expirations) structure for an existing envelope. /// /// /// This method sets the notifications (reminders and expirations) for an existing envelope. The request body sends a structure containing reminders and expirations settings. It also specifies whether to use the settings specified in the request, or the account default notification settings for the envelope. Note that this request only specifies when notifications are sent; it does not initiate sending of email messages. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse UpdateNotificationSettingsWithHttpInfo(string accountId, string envelopeId, EnvelopeNotificationRequest envelopeNotificationRequest = null); /// /// Updates document visibility for the recipients /// /// /// This method updates document visibility for a recipient. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// DocumentVisibilityList UpdateRecipientDocumentVisibility(string accountId, string envelopeId, string recipientId, DocumentVisibilityList documentVisibilityList = null); /// /// Updates document visibility for the recipients /// /// /// This method updates document visibility for a recipient. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// ApiResponse of ApiResponse UpdateRecipientDocumentVisibilityWithHttpInfo(string accountId, string envelopeId, string recipientId, DocumentVisibilityList documentVisibilityList = null); /// /// Sets the initials image for an accountless signer. /// /// /// Updates the initials image for a signer that does not have a DocuSign account. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K. For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// void UpdateRecipientInitialsImage(string accountId, string envelopeId, string recipientId); /// /// Sets the initials image for an accountless signer. /// /// /// Updates the initials image for a signer that does not have a DocuSign account. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K. For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// ApiResponse of Object(void) ApiResponse UpdateRecipientInitialsImageWithHttpInfo(string accountId, string envelopeId, string recipientId); /// /// Sets the signature image for an accountless signer. /// /// /// Updates the signature image for an accountless signer. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K. For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// void UpdateRecipientSignatureImage(string accountId, string envelopeId, string recipientId); /// /// Sets the signature image for an accountless signer. /// /// /// Updates the signature image for an accountless signer. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K. For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// ApiResponse of Object(void) ApiResponse UpdateRecipientSignatureImageWithHttpInfo(string accountId, string envelopeId, string recipientId); /// /// Updates recipients in a draft envelope or corrects recipient information for an in process envelope. /// /// /// Updates recipients in a draft envelope or corrects recipient information for an in process envelope. For draft envelopes, you can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`. Once an envelope has been sent, you can only edit: `email`, `userName`, `signerName`, `routingOrder`, `faxNumber`, and `deliveryMethod`. You can also select to resend an envelope by using the `resend_envelope` option. If you send information for a recipient that does not already exist in a draft envelope, the recipient is added to the envelope (similar to the POST). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// RecipientsUpdateSummary UpdateRecipients(string accountId, string envelopeId, Recipients recipients = null, EnvelopesApi.UpdateRecipientsOptions options = null); /// /// Updates recipients in a draft envelope or corrects recipient information for an in process envelope. /// /// /// Updates recipients in a draft envelope or corrects recipient information for an in process envelope. For draft envelopes, you can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`. Once an envelope has been sent, you can only edit: `email`, `userName`, `signerName`, `routingOrder`, `faxNumber`, and `deliveryMethod`. You can also select to resend an envelope by using the `resend_envelope` option. If you send information for a recipient that does not already exist in a draft envelope, the recipient is added to the envelope (similar to the POST). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// ApiResponse of ApiResponse UpdateRecipientsWithHttpInfo(string accountId, string envelopeId, Recipients recipients = null, EnvelopesApi.UpdateRecipientsOptions options = null); /// /// Updates document visibility for the recipients /// /// /// This method updates document visibility for one or more recipients based on the `recipientId` and `visible` values that you include in the request body. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// DocumentVisibilityList UpdateRecipientsDocumentVisibility(string accountId, string envelopeId, DocumentVisibilityList documentVisibilityList = null); /// /// Updates document visibility for the recipients /// /// /// This method updates document visibility for one or more recipients based on the `recipientId` and `visible` values that you include in the request body. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ApiResponse UpdateRecipientsDocumentVisibilityWithHttpInfo(string accountId, string envelopeId, DocumentVisibilityList documentVisibilityList = null); /// /// Updates the tabs for a recipient. /// /// /// Updates one or more tabs for a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Tabs UpdateTabs(string accountId, string envelopeId, string recipientId, Tabs tabs = null); /// /// Updates the tabs for a recipient. /// /// /// Updates one or more tabs for a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// ApiResponse of ApiResponse UpdateTabsWithHttpInfo(string accountId, string envelopeId, string recipientId, Tabs tabs = null); /// /// Update encrypted tabs for envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// void UpdateTabsBlob(string accountId, string envelopeId); /// /// Update encrypted tabs for envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of Object(void) ApiResponse UpdateTabsBlobWithHttpInfo(string accountId, string envelopeId); /// /// Updates the delayed routing rules for a template's workflow step definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// (optional) /// DelayedRouting UpdateTemplateDelayedRoutingDefinition(string accountId, string templateId, string workflowStepId, DelayedRouting delayedRouting = null); /// /// Updates the delayed routing rules for a template's workflow step definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// (optional) /// ApiResponse of ApiResponse UpdateTemplateDelayedRoutingDefinitionWithHttpInfo(string accountId, string templateId, string workflowStepId, DelayedRouting delayedRouting = null); /// /// Updates document visibility for the recipients /// /// /// This method updates the document visibility for a template recipient. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// The ID of the recipient being accessed. /// (optional) /// TemplateDocumentVisibilityList UpdateTemplateRecipientDocumentVisibility(string accountId, string templateId, string recipientId, TemplateDocumentVisibilityList templateDocumentVisibilityList = null); /// /// Updates document visibility for the recipients /// /// /// This method updates the document visibility for a template recipient. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// The ID of the recipient being accessed. /// (optional) /// ApiResponse of ApiResponse UpdateTemplateRecipientDocumentVisibilityWithHttpInfo(string accountId, string templateId, string recipientId, TemplateDocumentVisibilityList templateDocumentVisibilityList = null); /// /// Updates document visibility for the recipients /// /// /// This method updates document visibility for one or more template recipients based on the `recipientId` and `visible` values that you include in the request body. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// TemplateDocumentVisibilityList UpdateTemplateRecipientsDocumentVisibility(string accountId, string templateId, TemplateDocumentVisibilityList templateDocumentVisibilityList = null); /// /// Updates document visibility for the recipients /// /// /// This method updates document visibility for one or more template recipients based on the `recipientId` and `visible` values that you include in the request body. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// ApiResponse of ApiResponse UpdateTemplateRecipientsDocumentVisibilityWithHttpInfo(string accountId, string templateId, TemplateDocumentVisibilityList templateDocumentVisibilityList = null); /// /// Updates the scheduled sending rules for a template's workflow definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// ScheduledSending UpdateTemplateScheduledSendingDefinition(string accountId, string templateId, ScheduledSending scheduledSending = null); /// /// Updates the scheduled sending rules for a template's workflow definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// ApiResponse of ApiResponse UpdateTemplateScheduledSendingDefinitionWithHttpInfo(string accountId, string templateId, ScheduledSending scheduledSending = null); /// /// Updates the workflow definition for a template. /// /// /// Updates the specified template's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Workflow UpdateTemplateWorkflowDefinition(string accountId, string templateId, Workflow workflow = null); /// /// Updates the workflow definition for a template. /// /// /// Updates the specified template's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// ApiResponse of ApiResponse UpdateTemplateWorkflowDefinitionWithHttpInfo(string accountId, string templateId, Workflow workflow = null); /// /// Updates the template workflow step definition for an envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// (optional) /// WorkflowStep UpdateTemplateWorkflowStepDefinition(string accountId, string templateId, string workflowStepId, WorkflowStep workflowStep = null); /// /// Updates the template workflow step definition for an envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// (optional) /// ApiResponse of ApiResponse UpdateTemplateWorkflowStepDefinitionWithHttpInfo(string accountId, string templateId, string workflowStepId, WorkflowStep workflowStep = null); #endregion Synchronous Operations #region Asynchronous Operations /// /// Adds templates to an envelope. /// /// /// Adds templates to the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of DocumentTemplateList System.Threading.Tasks.Task ApplyTemplateAsync(string accountId, string envelopeId, DocumentTemplateList documentTemplateList = null, EnvelopesApi.ApplyTemplateOptions options = null); /// /// Adds templates to an envelope. /// /// /// Adds templates to the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of ApiResponse (DocumentTemplateList) System.Threading.Tasks.Task> ApplyTemplateAsyncWithHttpInfo(string accountId, string envelopeId, DocumentTemplateList documentTemplateList = null, EnvelopesApi.ApplyTemplateOptions options = null); /// /// Adds templates to a document in an envelope. /// /// /// Adds templates to a document in the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of DocumentTemplateList System.Threading.Tasks.Task ApplyTemplateToDocumentAsync(string accountId, string envelopeId, string documentId, DocumentTemplateList documentTemplateList = null, EnvelopesApi.ApplyTemplateToDocumentOptions options = null); /// /// Adds templates to a document in an envelope. /// /// /// Adds templates to a document in the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of ApiResponse (DocumentTemplateList) System.Threading.Tasks.Task> ApplyTemplateToDocumentAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentTemplateList documentTemplateList = null, EnvelopesApi.ApplyTemplateToDocumentOptions options = null); /// /// Initiate a new ChunkedUpload. /// /// /// This method initiates a new chunked upload with the first part of the content. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of ChunkedUploadResponse System.Threading.Tasks.Task CreateChunkedUploadAsync(string accountId, ChunkedUploadRequest chunkedUploadRequest = null); /// /// Initiate a new ChunkedUpload. /// /// /// This method initiates a new chunked upload with the first part of the content. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of ApiResponse (ChunkedUploadResponse) System.Threading.Tasks.Task> CreateChunkedUploadAsyncWithHttpInfo(string accountId, ChunkedUploadRequest chunkedUploadRequest = null); /// /// Returns a URL to the authentication view UI. /// /// /// Returns a URL that allows you to embed the authentication view of the DocuSign UI in your applications. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of ViewUrl System.Threading.Tasks.Task CreateConsoleViewAsync(string accountId, ConsoleViewRequest consoleViewRequest = null); /// /// Returns a URL to the authentication view UI. /// /// /// Returns a URL that allows you to embed the authentication view of the DocuSign UI in your applications. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of ApiResponse (ViewUrl) System.Threading.Tasks.Task> CreateConsoleViewAsyncWithHttpInfo(string accountId, ConsoleViewRequest consoleViewRequest = null); /// /// Returns a URL to the envelope correction UI. /// /// /// Returns a URL that allows you to embed the envelope correction view of the DocuSign UI in your applications. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ViewUrl System.Threading.Tasks.Task CreateCorrectViewAsync(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null); /// /// Returns a URL to the envelope correction UI. /// /// /// Returns a URL that allows you to embed the envelope correction view of the DocuSign UI in your applications. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (ViewUrl) System.Threading.Tasks.Task> CreateCorrectViewAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null); /// /// Updates envelope custom fields for an envelope. /// /// /// Updates the envelope custom fields for draft and in-process envelopes. Each custom field used in an envelope must have a unique name. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of CustomFields System.Threading.Tasks.Task CreateCustomFieldsAsync(string accountId, string envelopeId, CustomFields customFields = null); /// /// Updates envelope custom fields for an envelope. /// /// /// Updates the envelope custom fields for draft and in-process envelopes. Each custom field used in an envelope must have a unique name. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (CustomFields) System.Threading.Tasks.Task> CreateCustomFieldsAsyncWithHttpInfo(string accountId, string envelopeId, CustomFields customFields = null); /// /// Creates custom document fields in an existing envelope document. /// /// /// Creates custom document fields in an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of DocumentFieldsInformation System.Threading.Tasks.Task CreateDocumentFieldsAsync(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null); /// /// Creates custom document fields in an existing envelope document. /// /// /// Creates custom document fields in an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of ApiResponse (DocumentFieldsInformation) System.Threading.Tasks.Task> CreateDocumentFieldsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null); /// /// Get Responsive HTML Preview for a document in an envelope. /// /// /// Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/) HTML version of a specific document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of DocumentHtmlDefinitions System.Threading.Tasks.Task CreateDocumentResponsiveHtmlPreviewAsync(string accountId, string envelopeId, string documentId, DocumentHtmlDefinition documentHtmlDefinition = null); /// /// Get Responsive HTML Preview for a document in an envelope. /// /// /// Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/) HTML version of a specific document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of ApiResponse (DocumentHtmlDefinitions) System.Threading.Tasks.Task> CreateDocumentResponsiveHtmlPreviewAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentHtmlDefinition documentHtmlDefinition = null); /// /// Adds the tabs to an envelope document /// /// /// Adds tabs to the document specified by `documentId` in the envelope specified by `envelopeId`. In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/envelopes/envelopedocumenttabs/create/#definition__tabs_prefilltabs), your request body might look like this: ``` { \"prefillTabs\": { \"textTabs\": [ { \"value\": \"a prefill text tab\", \"pageNumber\": \"1\", \"documentId\": \"1\", \"xPosition\": 316, \"yPosition\": 97 } ] } } ``` /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of Tabs System.Threading.Tasks.Task CreateDocumentTabsAsync(string accountId, string envelopeId, string documentId, Tabs tabs = null); /// /// Adds the tabs to an envelope document /// /// /// Adds tabs to the document specified by `documentId` in the envelope specified by `envelopeId`. In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/envelopes/envelopedocumenttabs/create/#definition__tabs_prefilltabs), your request body might look like this: ``` { \"prefillTabs\": { \"textTabs\": [ { \"value\": \"a prefill text tab\", \"pageNumber\": \"1\", \"documentId\": \"1\", \"xPosition\": 316, \"yPosition\": 97 } ] } } ``` /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of ApiResponse (Tabs) System.Threading.Tasks.Task> CreateDocumentTabsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, Tabs tabs = null); /// /// Returns a URL to the edit view UI. /// /// /// Returns a URL that allows you to embed the edit view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign editing view. Upon sending completion, the user is returned to the return URL provided by the API application. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ViewUrl System.Threading.Tasks.Task CreateEditViewAsync(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null); /// /// Returns a URL to the edit view UI. /// /// /// Returns a URL that allows you to embed the edit view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign editing view. Upon sending completion, the user is returned to the return URL provided by the API application. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (ViewUrl) System.Threading.Tasks.Task> CreateEditViewAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null); /// /// Adds email setting overrides to an envelope. /// /// /// Adds email override settings, changing the email address to reply to an email address, name, or the BCC for email archive information, for the envelope. Note that adding email settings will only affect email communications that occur after the addition was made. ### Important: The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, use a Carbon Copies or Certified Deliveries Recipient Type. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of EmailSettings System.Threading.Tasks.Task CreateEmailSettingsAsync(string accountId, string envelopeId, EmailSettings emailSettings = null); /// /// Adds email setting overrides to an envelope. /// /// /// Adds email override settings, changing the email address to reply to an email address, name, or the BCC for email archive information, for the envelope. Note that adding email settings will only affect email communications that occur after the addition was made. ### Important: The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, use a Carbon Copies or Certified Deliveries Recipient Type. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (EmailSettings) System.Threading.Tasks.Task> CreateEmailSettingsAsyncWithHttpInfo(string accountId, string envelopeId, EmailSettings emailSettings = null); /// /// Creates an envelope. /// /// /// Creates an envelope. Using this function you can: * Create an envelope and send it. * Create an envelope from an existing template and send it. In either case, you can choose to save the envelope as a draft envelope instead of sending it by setting the request's `status` property to `created` instead of `sent`. ## Sending Envelopes Documents can be included with the Envelopes::create call itself or a template can include documents. Documents can be added by using a multi-part/form request or by using the `documentBase64` field of the [`document` object](#/definitions/document) ### Recipient Types An [`envelopeDefinition` object](#/definitions/envelopeDefinition) is used as the method's body. Envelope recipients can be defined in the envelope or in templates. The `envelopeDefinition` object's `recipients` field is an [`EnvelopeRecipients` resource object](#/definitions/EnvelopeRecipients). It includes arrays of the seven types of recipients defined by DocuSign: Recipient type | Object definition - -- -- -- -- -- -- - | - -- -- -- -- -- -- -- -- agent (can add name and email information for later recipients/signers) | [`agent`](#/definitions/agent) carbon copy (receives a copy of the documents) | [`carbonCopy`](#/definitions/carbonCopy) certified delivery (receives a copy of the documents and must acknowledge receipt) | [`certifiedDelivery`](#/definitions/certifiedDelivery) editor (can change recipients and document fields for later recipients/signers) | [`editor`](#/definitions/editor) in-person signer (\"hosts\" someone who signs in-person) | [`inPersonSigner`](#/definitions/inPersonSigner) intermediary (can add name and email information for some later recipients/signers.) | [`intermediary`](#/definitions/intermediary) signer (signs and/or updates document fields) | [`signer`](#/definitions/signer) Additional information about the different types of recipients is available from the [`EnvelopeRecipients` resource page](../../EnvelopeRecipients) and from the [Developer Center](https://www.docusign.com/developer-center/explore/features/recipients) ### Tabs Tabs (also referred to as `tags` and as `fields` in the web sending user interface), can be defined in the `envelopeDefinition`, in templates, by transforming PDF Form Fields, or by using Composite Templates (see below). Defining tabs: the `inPersonSigner`, and `signer` recipient objects include a `tabs` field. It is an [`EnvelopeTabs` resource object](#/definitions/EnvelopeTabs). It includes arrays of the 24 different tab types available. See the [`EnvelopeTabs` resource](../../EnvelopeTabs) for more information. ## Using Templates Envelopes use specific people or groups as recipients. Templates can specify a role, eg `account_manager.` When a template is used in an envelope, the roles must be replaced with specific people or groups. When you create an envelope using a `templateId`, the different recipient type objects within the [`EnvelopeRecipients` object](#/definitions/EnvelopeRecipients) are used to assign recipients to the template's roles via the `roleName` property. The recipient objects can also override settings that were specified in the template, and set values for tab fields that were defined in the template. ### Message Lock When a template is added or applied to an envelope and the template has a locked email subject and message, that subject and message are used for the envelope and cannot be changed even if another locked template is subsequently added or applied to the envelope. The field `messageLock` is used to lock the email subject and message. If an email subject or message is entered before adding or applying a template with `messageLock` **true**, the email subject and message is overwritten with the locked email subject and message from the template. ## Envelope Status The status of sent envelopes can be determined through the DocuSign webhook system or by polling. Webhooks are highly recommended: they provide your application with the quickest updates when an envelope's status changes. DocuSign limits polling to once every 15 minutes or less frequently. When a webhook is used, DocuSign calls your application, via the URL you provide, with a notification XML message. See the [Webhook recipe](https://www.docusign.com/developer-center/recipes/webhook-status) for examples and live demos of using webhooks. ## Webhook Options The two webhook options, *eventNotification* and *Connect* use the same notification mechanism and message formats. eventNotification is used to create a webhook for a specific envelope sent via the API. Connect webhooks can be used for any envelope sent from an account, from any user, from any client. ### eventNotification Webhooks The Envelopes::create method includes an optional [eventNotification object](#definition-eventNotification) that adds a webhook to the envelope. eventNotification webhooks are available for all DocuSign accounts with API access. ### Connect Webhooks Connect can be used to create a webhook for all envelopes sent by all users in an account, either through the API or via other DocuSign clients (web, mobile, etc). Connect configurations are independent of specific envelopes. A Connect configuration includes a filter that may be used to limit the webhook to specific users, envelope statuses, etc. Connect configurations may be created and managed using the [ConnectConfigurations resource](../../Connect/ConnectConfigurations). Configurations can also be created and managed from the Administration tool accessed by selecting \"Go to Admin\" from the menu next to your picture on the DocuSign web app. See the Integrations/Connect section of the Admin tool. For repeatability, and to minimize support questions, creating Connect configurations via the API is recommended, especially for ISVs. Connect is available for some DocuSign account types. Please contact DocuSign Sales for more information. ## Composite Templates The Composite Templates feature, like [compositing in film production](https://en.wikipedia.org/wiki/Compositing), enables you to *overlay* document, recipient, and tab definitions from multiple sources, including PDF Form Field definitions, templates defined on the server, and more. Each Composite Template consists of optional elements: server templates, inline templates, PDF Metadata templates, and documents. * The Composite Template ID is an optional element used to identify the composite template. It is used as a reference when adding document object information via a multi-part HTTP message. If used, the document content-disposition must include the `compositeTemplateId` to which the document should be added. If `compositeTemplateId` is not specified in the content-disposition, the document is applied based on the `documentId` only. If no document object is specified, the composite template inherits the first document. * Server Templates are server-side templates stored on the DocuSign platform. If supplied, they are overlaid into the envelope in the order of their Sequence value. * Inline Templates provide a container to add documents, recipients, tabs, and custom fields. If inline templates are supplied, they are overlaid into the envelope in the order of their Sequence value. * Document objects are optional structures that provide a container to pass in a document or form. If this object is not included, the composite template inherits the *first* document it finds from a server template or inline template, starting with the lowest sequence value. PDF Form objects are only transformed from the document object. DocuSign does not derive PDF form properties from server templates or inline templates. To instruct DocuSign to transform fields from the PDF form, set `transformPdfFields` to \"true\" for the document. See the Transform PDF Fields section for more information about process. * PDF Metadata Templates provide a container to embed design-time template information into a PDF document. DocuSign uses this information when processing the Envelope. This convention allows the document to carry the signing instructions with it, so that less information needs to be provided at run-time through an inline template or synchronized with an external structure like a server template. PDF Metadata templates are stored in the Metadata layer of a PDF in accordance with Acrobat's XMP specification. DocuSign will only find PDF Metadata templates inside documents passed in the Document object (see below). If supplied, the PDF metadata template will be overlaid into the envelope in the order of its Sequence value. ### Compositing the definitions Each Composite Template adds a new document and templates overlay into the envelope. For each Composite Template these rules are applied: * Templates are overlaid in the order of their Sequence value. * If Document is not passed into the Composite Template's `document` field, the *first* template's document (based on the template's Sequence value) is used. * Last in wins in all cases except for the document (i.e. envelope information, recipient information, secure field information). There is no special casing. For example, if you want higher security on a tab, then that needs to be specified in a later template (by sequence number) then where the tab is included. If you want higher security on a role recipient, then it needs to be in a later template then where that role recipient is specified. * Recipient matching is based on Recipient Role and Routing Order. If there are matches, the recipient information is merged together. A final pass is done on all Composite Templates, after all template overlays have been applied, to collapse recipients with the same email, username and routing order. This prevents having the same recipients at the same routing order. * If you specify in a template that a recipient is locked, once that recipient is overlaid the recipient attributes can no longer be changed. The only items that can be changed for the recipient in this case are the email, username, access code and IDCheckInformationInput. * Tab matching is based on Tab Labels, Tab Types and Documents. If a Tab Label matches but the Document is not supplied, the Tab is overlaid for all the Documents. For example, if you have a simple inline template with only one tab in it with a label and a value, the Signature, Initial, Company, Envelope ID, User Name tabs will only be matched and collapsed if they fall in the exact same X and Y locations. * roleName and tabLabel matching is case sensitive. * The defaultRecipient field enables you to specify which recipient the generated tabs from a PDF form are mapped to. You can also set PDF form generated tabs to a recipient other than the DefaultRecipient by specifying the mapping of the tab label that is created to one of the template recipients. * You can use tabLabel wild carding to map a series of tabs from the PDF form. To use this you must end a tab label with \"\\*\" and then the system matches tabs that start with the label. * If no DefaultRecipient is specified, tabs must be explicitly mapped to recipients in order to be generated from the form. Unmapped form objects will not be generated into their DocuSign equivalents. (In the case of Signature/Initials, the tabs will be disregarded entirely; in the case of pdf text fields, the field data will be flattened on the Envelope document, but there will not be a corresponding DocuSign data tab.) ### Including the Document Content for Composite Templates Document content can be supplied inline, using the `documentBase64` or can be included in a multi-part HTTP message. If a multi-part message is used and there are multiple Composite Templates, the document content-disposition can include the `compositeTemplateId` to which the document should be added. Using the `compositeTemplateId` sets which documents are associated with particular composite templates. An example of this usage is: ``` - -5cd3320a-5aac-4453-b3a4-cbb52a4cba5d Content-Type: application/pdf Content-Disposition: file; filename=\"eula.pdf\"; documentId=1; compositeTemplateId=\"1\" Content-Transfer-Encoding: base64 ``` ### PDF Form Field Transformation Only the following PDF Form FieldTypes will be transformed to DocuSign tabs: CheckBox, DateTime, ListBox, Numeric, Password, Radio, Signature, and Text Field Properties that will be transformed: Read Only, Required, Max Length, Positions, and Initial Data. When transforming a *PDF Form Digital Signature Field,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials Any other PDF Form Digital Signature Field will be transformed to a DocuSign Signature tab When transforming *PDF Form Text Fields,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials DocuSignEnvelopeID or eSignEnvelopeID | EnvelopeID DocuSignCompany or eSignCompany | Company DocuSignDateSigned or eSignDateSigned | Date Signed DocuSignTitle or eSignTitle | Title DocuSignFullName or eSignFullName | Full Name DocuSignSignerAttachmentOptional or eSignSignerAttachmentOptional | Optional Signer Attachment Any other PDF Form Text Field will be transformed to a DocuSign data (text) tab. PDF Form Field Names that include \"DocuSignIgnoreTransform\" or \"eSignIgnoreTransform\" will not be transformed. PDF Form Date fields will be transformed to Date Signed fields if their name includes DocuSignDateSigned or eSignDateSigned. ## Template Email Subject Merge Fields This feature enables you to insert recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's `roleName`, are added to the `emailSubject` when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. * To add a recipient's name in the subject line add the following text in the `emailSubject` when creating the template or when sending an envelope from a template: [[<roleName>_UserName]] Example: `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",` * To add a recipient's email address in the subject line add the following text in the emailSubject when creating the template or when sending an envelope from a template: [[<roleName>_Email]] Example: `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",` In both cases the <roleName> is the recipient's `roleName` in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject. ## Branding an envelope The following rules are used to determine the `brandId` used in an envelope: * If a `brandId` is specified in the envelope/template and that brandId is available to the account, that brand is used in the envelope. * If more than one template is used in an envelope and more than one `brandId` is specified, the first `brandId` specified is used throughout the envelope. * In cases where no brand is specified and the sender belongs to a Group; if there is only one brand associated with the Group, then that brand is used in the envelope. Otherwise, the account's default signing brand is used. * For envelopes that do not meet any of the previous criteria, the account's default signing brand is used for the envelope. ## BCC Email address feature The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, don't use the BCC Email field. Use a Carbon Copy or Certified Delivery Recipient type. ## Merge Recipient Roles for Draft Envelopes When an envelope with multiple templates is sent, the recipients from the templates are merged according to the template roles, and empty recipients are removed. When creating an envelope with multiple templates, but not sending it (keeping it in a created state), duplicate recipients are not merged, which could cause leave duplicate recipients in the envelope. To prevent this, the query parameter `merge_roles_on_draft` should be added when posting a draft envelope (status=created) with multiple templates. Doing this will merge template roles and remove empty recipients. ###### Note: DocuSign recommends that the `merge_roles_on_draft` query parameter be used anytime you are creating an envelope with multiple templates and keeping it in draft (created) status. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Options for modifying the behavior of the function. /// Task of EnvelopeSummary System.Threading.Tasks.Task CreateEnvelopeAsync(string accountId, EnvelopeDefinition envelopeDefinition = null, EnvelopesApi.CreateEnvelopeOptions options = null); /// /// Creates an envelope. /// /// /// Creates an envelope. Using this function you can: * Create an envelope and send it. * Create an envelope from an existing template and send it. In either case, you can choose to save the envelope as a draft envelope instead of sending it by setting the request's `status` property to `created` instead of `sent`. ## Sending Envelopes Documents can be included with the Envelopes::create call itself or a template can include documents. Documents can be added by using a multi-part/form request or by using the `documentBase64` field of the [`document` object](#/definitions/document) ### Recipient Types An [`envelopeDefinition` object](#/definitions/envelopeDefinition) is used as the method's body. Envelope recipients can be defined in the envelope or in templates. The `envelopeDefinition` object's `recipients` field is an [`EnvelopeRecipients` resource object](#/definitions/EnvelopeRecipients). It includes arrays of the seven types of recipients defined by DocuSign: Recipient type | Object definition - -- -- -- -- -- -- - | - -- -- -- -- -- -- -- -- agent (can add name and email information for later recipients/signers) | [`agent`](#/definitions/agent) carbon copy (receives a copy of the documents) | [`carbonCopy`](#/definitions/carbonCopy) certified delivery (receives a copy of the documents and must acknowledge receipt) | [`certifiedDelivery`](#/definitions/certifiedDelivery) editor (can change recipients and document fields for later recipients/signers) | [`editor`](#/definitions/editor) in-person signer (\"hosts\" someone who signs in-person) | [`inPersonSigner`](#/definitions/inPersonSigner) intermediary (can add name and email information for some later recipients/signers.) | [`intermediary`](#/definitions/intermediary) signer (signs and/or updates document fields) | [`signer`](#/definitions/signer) Additional information about the different types of recipients is available from the [`EnvelopeRecipients` resource page](../../EnvelopeRecipients) and from the [Developer Center](https://www.docusign.com/developer-center/explore/features/recipients) ### Tabs Tabs (also referred to as `tags` and as `fields` in the web sending user interface), can be defined in the `envelopeDefinition`, in templates, by transforming PDF Form Fields, or by using Composite Templates (see below). Defining tabs: the `inPersonSigner`, and `signer` recipient objects include a `tabs` field. It is an [`EnvelopeTabs` resource object](#/definitions/EnvelopeTabs). It includes arrays of the 24 different tab types available. See the [`EnvelopeTabs` resource](../../EnvelopeTabs) for more information. ## Using Templates Envelopes use specific people or groups as recipients. Templates can specify a role, eg `account_manager.` When a template is used in an envelope, the roles must be replaced with specific people or groups. When you create an envelope using a `templateId`, the different recipient type objects within the [`EnvelopeRecipients` object](#/definitions/EnvelopeRecipients) are used to assign recipients to the template's roles via the `roleName` property. The recipient objects can also override settings that were specified in the template, and set values for tab fields that were defined in the template. ### Message Lock When a template is added or applied to an envelope and the template has a locked email subject and message, that subject and message are used for the envelope and cannot be changed even if another locked template is subsequently added or applied to the envelope. The field `messageLock` is used to lock the email subject and message. If an email subject or message is entered before adding or applying a template with `messageLock` **true**, the email subject and message is overwritten with the locked email subject and message from the template. ## Envelope Status The status of sent envelopes can be determined through the DocuSign webhook system or by polling. Webhooks are highly recommended: they provide your application with the quickest updates when an envelope's status changes. DocuSign limits polling to once every 15 minutes or less frequently. When a webhook is used, DocuSign calls your application, via the URL you provide, with a notification XML message. See the [Webhook recipe](https://www.docusign.com/developer-center/recipes/webhook-status) for examples and live demos of using webhooks. ## Webhook Options The two webhook options, *eventNotification* and *Connect* use the same notification mechanism and message formats. eventNotification is used to create a webhook for a specific envelope sent via the API. Connect webhooks can be used for any envelope sent from an account, from any user, from any client. ### eventNotification Webhooks The Envelopes::create method includes an optional [eventNotification object](#definition-eventNotification) that adds a webhook to the envelope. eventNotification webhooks are available for all DocuSign accounts with API access. ### Connect Webhooks Connect can be used to create a webhook for all envelopes sent by all users in an account, either through the API or via other DocuSign clients (web, mobile, etc). Connect configurations are independent of specific envelopes. A Connect configuration includes a filter that may be used to limit the webhook to specific users, envelope statuses, etc. Connect configurations may be created and managed using the [ConnectConfigurations resource](../../Connect/ConnectConfigurations). Configurations can also be created and managed from the Administration tool accessed by selecting \"Go to Admin\" from the menu next to your picture on the DocuSign web app. See the Integrations/Connect section of the Admin tool. For repeatability, and to minimize support questions, creating Connect configurations via the API is recommended, especially for ISVs. Connect is available for some DocuSign account types. Please contact DocuSign Sales for more information. ## Composite Templates The Composite Templates feature, like [compositing in film production](https://en.wikipedia.org/wiki/Compositing), enables you to *overlay* document, recipient, and tab definitions from multiple sources, including PDF Form Field definitions, templates defined on the server, and more. Each Composite Template consists of optional elements: server templates, inline templates, PDF Metadata templates, and documents. * The Composite Template ID is an optional element used to identify the composite template. It is used as a reference when adding document object information via a multi-part HTTP message. If used, the document content-disposition must include the `compositeTemplateId` to which the document should be added. If `compositeTemplateId` is not specified in the content-disposition, the document is applied based on the `documentId` only. If no document object is specified, the composite template inherits the first document. * Server Templates are server-side templates stored on the DocuSign platform. If supplied, they are overlaid into the envelope in the order of their Sequence value. * Inline Templates provide a container to add documents, recipients, tabs, and custom fields. If inline templates are supplied, they are overlaid into the envelope in the order of their Sequence value. * Document objects are optional structures that provide a container to pass in a document or form. If this object is not included, the composite template inherits the *first* document it finds from a server template or inline template, starting with the lowest sequence value. PDF Form objects are only transformed from the document object. DocuSign does not derive PDF form properties from server templates or inline templates. To instruct DocuSign to transform fields from the PDF form, set `transformPdfFields` to \"true\" for the document. See the Transform PDF Fields section for more information about process. * PDF Metadata Templates provide a container to embed design-time template information into a PDF document. DocuSign uses this information when processing the Envelope. This convention allows the document to carry the signing instructions with it, so that less information needs to be provided at run-time through an inline template or synchronized with an external structure like a server template. PDF Metadata templates are stored in the Metadata layer of a PDF in accordance with Acrobat's XMP specification. DocuSign will only find PDF Metadata templates inside documents passed in the Document object (see below). If supplied, the PDF metadata template will be overlaid into the envelope in the order of its Sequence value. ### Compositing the definitions Each Composite Template adds a new document and templates overlay into the envelope. For each Composite Template these rules are applied: * Templates are overlaid in the order of their Sequence value. * If Document is not passed into the Composite Template's `document` field, the *first* template's document (based on the template's Sequence value) is used. * Last in wins in all cases except for the document (i.e. envelope information, recipient information, secure field information). There is no special casing. For example, if you want higher security on a tab, then that needs to be specified in a later template (by sequence number) then where the tab is included. If you want higher security on a role recipient, then it needs to be in a later template then where that role recipient is specified. * Recipient matching is based on Recipient Role and Routing Order. If there are matches, the recipient information is merged together. A final pass is done on all Composite Templates, after all template overlays have been applied, to collapse recipients with the same email, username and routing order. This prevents having the same recipients at the same routing order. * If you specify in a template that a recipient is locked, once that recipient is overlaid the recipient attributes can no longer be changed. The only items that can be changed for the recipient in this case are the email, username, access code and IDCheckInformationInput. * Tab matching is based on Tab Labels, Tab Types and Documents. If a Tab Label matches but the Document is not supplied, the Tab is overlaid for all the Documents. For example, if you have a simple inline template with only one tab in it with a label and a value, the Signature, Initial, Company, Envelope ID, User Name tabs will only be matched and collapsed if they fall in the exact same X and Y locations. * roleName and tabLabel matching is case sensitive. * The defaultRecipient field enables you to specify which recipient the generated tabs from a PDF form are mapped to. You can also set PDF form generated tabs to a recipient other than the DefaultRecipient by specifying the mapping of the tab label that is created to one of the template recipients. * You can use tabLabel wild carding to map a series of tabs from the PDF form. To use this you must end a tab label with \"\\*\" and then the system matches tabs that start with the label. * If no DefaultRecipient is specified, tabs must be explicitly mapped to recipients in order to be generated from the form. Unmapped form objects will not be generated into their DocuSign equivalents. (In the case of Signature/Initials, the tabs will be disregarded entirely; in the case of pdf text fields, the field data will be flattened on the Envelope document, but there will not be a corresponding DocuSign data tab.) ### Including the Document Content for Composite Templates Document content can be supplied inline, using the `documentBase64` or can be included in a multi-part HTTP message. If a multi-part message is used and there are multiple Composite Templates, the document content-disposition can include the `compositeTemplateId` to which the document should be added. Using the `compositeTemplateId` sets which documents are associated with particular composite templates. An example of this usage is: ``` - -5cd3320a-5aac-4453-b3a4-cbb52a4cba5d Content-Type: application/pdf Content-Disposition: file; filename=\"eula.pdf\"; documentId=1; compositeTemplateId=\"1\" Content-Transfer-Encoding: base64 ``` ### PDF Form Field Transformation Only the following PDF Form FieldTypes will be transformed to DocuSign tabs: CheckBox, DateTime, ListBox, Numeric, Password, Radio, Signature, and Text Field Properties that will be transformed: Read Only, Required, Max Length, Positions, and Initial Data. When transforming a *PDF Form Digital Signature Field,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials Any other PDF Form Digital Signature Field will be transformed to a DocuSign Signature tab When transforming *PDF Form Text Fields,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials DocuSignEnvelopeID or eSignEnvelopeID | EnvelopeID DocuSignCompany or eSignCompany | Company DocuSignDateSigned or eSignDateSigned | Date Signed DocuSignTitle or eSignTitle | Title DocuSignFullName or eSignFullName | Full Name DocuSignSignerAttachmentOptional or eSignSignerAttachmentOptional | Optional Signer Attachment Any other PDF Form Text Field will be transformed to a DocuSign data (text) tab. PDF Form Field Names that include \"DocuSignIgnoreTransform\" or \"eSignIgnoreTransform\" will not be transformed. PDF Form Date fields will be transformed to Date Signed fields if their name includes DocuSignDateSigned or eSignDateSigned. ## Template Email Subject Merge Fields This feature enables you to insert recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's `roleName`, are added to the `emailSubject` when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. * To add a recipient's name in the subject line add the following text in the `emailSubject` when creating the template or when sending an envelope from a template: [[<roleName>_UserName]] Example: `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",` * To add a recipient's email address in the subject line add the following text in the emailSubject when creating the template or when sending an envelope from a template: [[<roleName>_Email]] Example: `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",` In both cases the <roleName> is the recipient's `roleName` in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject. ## Branding an envelope The following rules are used to determine the `brandId` used in an envelope: * If a `brandId` is specified in the envelope/template and that brandId is available to the account, that brand is used in the envelope. * If more than one template is used in an envelope and more than one `brandId` is specified, the first `brandId` specified is used throughout the envelope. * In cases where no brand is specified and the sender belongs to a Group; if there is only one brand associated with the Group, then that brand is used in the envelope. Otherwise, the account's default signing brand is used. * For envelopes that do not meet any of the previous criteria, the account's default signing brand is used for the envelope. ## BCC Email address feature The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, don't use the BCC Email field. Use a Carbon Copy or Certified Delivery Recipient type. ## Merge Recipient Roles for Draft Envelopes When an envelope with multiple templates is sent, the recipients from the templates are merged according to the template roles, and empty recipients are removed. When creating an envelope with multiple templates, but not sending it (keeping it in a created state), duplicate recipients are not merged, which could cause leave duplicate recipients in the envelope. To prevent this, the query parameter `merge_roles_on_draft` should be added when posting a draft envelope (status=created) with multiple templates. Doing this will merge template roles and remove empty recipients. ###### Note: DocuSign recommends that the `merge_roles_on_draft` query parameter be used anytime you are creating an envelope with multiple templates and keeping it in draft (created) status. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Options for modifying the behavior of the function. /// Task of ApiResponse (EnvelopeSummary) System.Threading.Tasks.Task> CreateEnvelopeAsyncWithHttpInfo(string accountId, EnvelopeDefinition envelopeDefinition = null, EnvelopesApi.CreateEnvelopeOptions options = null); /// /// Posts a list of comments for authorized user /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of CommentHistoryResult System.Threading.Tasks.Task CreateEnvelopeCommentsAsync(string accountId, string envelopeId, CommentsPublish commentsPublish = null); /// /// Posts a list of comments for authorized user /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (CommentHistoryResult) System.Threading.Tasks.Task> CreateEnvelopeCommentsAsyncWithHttpInfo(string accountId, string envelopeId, CommentsPublish commentsPublish = null); /// /// Provides a URL to start a recipient view of the Envelope UI /// /// /// This method returns a URL for an envelope recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience. For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ViewUrl System.Threading.Tasks.Task CreateEnvelopeRecipientPreviewAsync(string accountId, string envelopeId, RecipientPreviewRequest recipientPreviewRequest = null); /// /// Provides a URL to start a recipient view of the Envelope UI /// /// /// This method returns a URL for an envelope recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience. For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (ViewUrl) System.Threading.Tasks.Task> CreateEnvelopeRecipientPreviewAsyncWithHttpInfo(string accountId, string envelopeId, RecipientPreviewRequest recipientPreviewRequest = null); /// /// Provides a URL to start a shared recipient view of the Envelope UI /// /// /// Returns a URL that enables you to embed the DocuSign UI recipient view of a [shared envelope](https://support.docusign.com/en/guides/ndse-admin-guide-share-envelopes) in your applications. This is the view that a user sees of an envelope that a recipient on the same account has shared with them. Due to screen space issues, do not use an `<iframe>` for embedded operations on mobile devices. For iOS devices, DocuSign recommends using a WebView. ### Revoking the URL You can revoke this URL by making a DELETE HTTP request to the URL with no request body. ### Related topics - [Embedded signing and sending](/docs/esign-rest-api/esign101/concepts/embedding/) - [How to send an envelope via your app](/docs/esign-rest-api/how-to/embedded-sending/) - [How to embed the DocuSign UI in your app](/docs/esign-rest-api/how-to/embed-ui/) /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ViewUrl System.Threading.Tasks.Task CreateEnvelopeRecipientSharedViewAsync(string accountId, string envelopeId, RecipientViewRequest recipientViewRequest = null); /// /// Provides a URL to start a shared recipient view of the Envelope UI /// /// /// Returns a URL that enables you to embed the DocuSign UI recipient view of a [shared envelope](https://support.docusign.com/en/guides/ndse-admin-guide-share-envelopes) in your applications. This is the view that a user sees of an envelope that a recipient on the same account has shared with them. Due to screen space issues, do not use an `<iframe>` for embedded operations on mobile devices. For iOS devices, DocuSign recommends using a WebView. ### Revoking the URL You can revoke this URL by making a DELETE HTTP request to the URL with no request body. ### Related topics - [Embedded signing and sending](/docs/esign-rest-api/esign101/concepts/embedding/) - [How to send an envelope via your app](/docs/esign-rest-api/how-to/embedded-sending/) - [How to embed the DocuSign UI in your app](/docs/esign-rest-api/how-to/embed-ui/) /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (ViewUrl) System.Threading.Tasks.Task> CreateEnvelopeRecipientSharedViewAsyncWithHttpInfo(string accountId, string envelopeId, RecipientViewRequest recipientViewRequest = null); /// /// Add envelope transfer rules to an account. /// /// /// This method creates an envelope transfer rule. When you create an envelope transfer rule, you specify the following properties: - `eventType` - `fromGroups` - `toUser` - `toFolder` - `carbonCopyOriginalOwner` - `enabled` **Note:** Only Administrators can create envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of EnvelopeTransferRuleInformation System.Threading.Tasks.Task CreateEnvelopeTransferRulesAsync(string accountId, EnvelopeTransferRuleRequest envelopeTransferRuleRequest = null); /// /// Add envelope transfer rules to an account. /// /// /// This method creates an envelope transfer rule. When you create an envelope transfer rule, you specify the following properties: - `eventType` - `fromGroups` - `toUser` - `toFolder` - `carbonCopyOriginalOwner` - `enabled` **Note:** Only Administrators can create envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of ApiResponse (EnvelopeTransferRuleInformation) System.Threading.Tasks.Task> CreateEnvelopeTransferRulesAsyncWithHttpInfo(string accountId, EnvelopeTransferRuleRequest envelopeTransferRuleRequest = null); /// /// Creates and adds a new workflow step definition for an envelope's workflow /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of WorkflowStep System.Threading.Tasks.Task CreateEnvelopeWorkflowStepDefinitionAsync(string accountId, string envelopeId, WorkflowStep workflowStep = null); /// /// Creates and adds a new workflow step definition for an envelope's workflow /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (WorkflowStep) System.Threading.Tasks.Task> CreateEnvelopeWorkflowStepDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, WorkflowStep workflowStep = null); /// /// Submits a batch of historical envelopes for republish to an adhoc config. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of EnvelopePublishTransaction System.Threading.Tasks.Task CreateHistoricalEnvelopePublishTransactionAsync(string accountId, ConnectHistoricalEnvelopeRepublish connectHistoricalEnvelopeRepublish = null); /// /// Submits a batch of historical envelopes for republish to an adhoc config. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of ApiResponse (EnvelopePublishTransaction) System.Threading.Tasks.Task> CreateHistoricalEnvelopePublishTransactionAsyncWithHttpInfo(string accountId, ConnectHistoricalEnvelopeRepublish connectHistoricalEnvelopeRepublish = null); /// /// Lock an envelope. /// /// /// Locks the specified envelope, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the envelope. ###### Note: Users must have envelope locking capability enabled to use this function (userSetting `canLockEnvelopes` must be set to true for the user). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of LockInformation System.Threading.Tasks.Task CreateLockAsync(string accountId, string envelopeId, LockRequest lockRequest = null); /// /// Lock an envelope. /// /// /// Locks the specified envelope, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the envelope. ###### Note: Users must have envelope locking capability enabled to use this function (userSetting `canLockEnvelopes` must be set to true for the user). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (LockInformation) System.Threading.Tasks.Task> CreateLockAsyncWithHttpInfo(string accountId, string envelopeId, LockRequest lockRequest = null); /// /// Adds one or more recipients to an envelope. /// /// /// Adds one or more recipients to an envelope. For an in process envelope, one that has been sent and has not been completed or voided, an email is sent to a new recipient when they are reached in the routing order. If the new recipient's routing order is before or the same as the envelope's next recipient, an email is only sent if the optional `resend_envelope` query string is set to **true**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of Recipients System.Threading.Tasks.Task CreateRecipientAsync(string accountId, string envelopeId, Recipients recipients = null, EnvelopesApi.CreateRecipientOptions options = null); /// /// Adds one or more recipients to an envelope. /// /// /// Adds one or more recipients to an envelope. For an in process envelope, one that has been sent and has not been completed or voided, an email is sent to a new recipient when they are reached in the routing order. If the new recipient's routing order is before or the same as the envelope's next recipient, an email is only sent if the optional `resend_envelope` query string is set to **true**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of ApiResponse (Recipients) System.Threading.Tasks.Task> CreateRecipientAsyncWithHttpInfo(string accountId, string envelopeId, Recipients recipients = null, EnvelopesApi.CreateRecipientOptions options = null); /// /// Provides a link to access the Identity manual review related to a recipient. /// /// /// This method returns the URL of the page that allows a sender to [manually review](https://support.docusign.com/en/guides/ndse-user-guide-send-documents-with-id-verification) the ID of a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of ViewUrl System.Threading.Tasks.Task CreateRecipientManualReviewViewAsync(string accountId, string envelopeId, string recipientId); /// /// Provides a link to access the Identity manual review related to a recipient. /// /// /// This method returns the URL of the page that allows a sender to [manually review](https://support.docusign.com/en/guides/ndse-user-guide-send-documents-with-id-verification) the ID of a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of ApiResponse (ViewUrl) System.Threading.Tasks.Task> CreateRecipientManualReviewViewAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId); /// /// Returns a link to access to the identity events stored in the proof service related to this recipient. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of IdEvidenceViewLink System.Threading.Tasks.Task CreateRecipientProofFileLinkAsync(string accountId, string envelopeId, string recipientId); /// /// Returns a link to access to the identity events stored in the proof service related to this recipient. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of ApiResponse (IdEvidenceViewLink) System.Threading.Tasks.Task> CreateRecipientProofFileLinkAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId); /// /// Returns a resource token to get access to the identity events stored in the proof service related to this recipient. /// /// /// Creates a resource token for a sender. This token allows a sender to return identification data for a recipient using the [ID Evidence API](/docs/idevidence-api/). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of IdEvidenceResourceToken System.Threading.Tasks.Task CreateRecipientProofFileResourceTokenAsync(string accountId, string envelopeId, string recipientId, EnvelopesApi.CreateRecipientProofFileResourceTokenOptions options = null); /// /// Returns a resource token to get access to the identity events stored in the proof service related to this recipient. /// /// /// Creates a resource token for a sender. This token allows a sender to return identification data for a recipient using the [ID Evidence API](/docs/idevidence-api/). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (IdEvidenceResourceToken) System.Threading.Tasks.Task> CreateRecipientProofFileResourceTokenAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.CreateRecipientProofFileResourceTokenOptions options = null); /// /// Returns a URL to the recipient view UI. /// /// /// Returns a URL that allows you to embed the recipient view of the DocuSign UI in your applications. This call cannot be used to view draft envelopes, since those envelopes have not been sent. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. An entry is added into the Security Level section of the DocuSign Certificate of Completion that reflects the `securityDomain` and `authenticationMethod` properties used to verify the user identity. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ViewUrl System.Threading.Tasks.Task CreateRecipientViewAsync(string accountId, string envelopeId, RecipientViewRequest recipientViewRequest = null); /// /// Returns a URL to the recipient view UI. /// /// /// Returns a URL that allows you to embed the recipient view of the DocuSign UI in your applications. This call cannot be used to view draft envelopes, since those envelopes have not been sent. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. An entry is added into the Security Level section of the DocuSign Certificate of Completion that reflects the `securityDomain` and `authenticationMethod` properties used to verify the user identity. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (ViewUrl) System.Threading.Tasks.Task> CreateRecipientViewAsyncWithHttpInfo(string accountId, string envelopeId, RecipientViewRequest recipientViewRequest = null); /// /// Get Responsive HTML Preview for all documents in an envelope. /// /// /// Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents in an envelope. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of DocumentHtmlDefinitions System.Threading.Tasks.Task CreateResponsiveHtmlPreviewAsync(string accountId, string envelopeId, DocumentHtmlDefinition documentHtmlDefinition = null); /// /// Get Responsive HTML Preview for all documents in an envelope. /// /// /// Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents in an envelope. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (DocumentHtmlDefinitions) System.Threading.Tasks.Task> CreateResponsiveHtmlPreviewAsyncWithHttpInfo(string accountId, string envelopeId, DocumentHtmlDefinition documentHtmlDefinition = null); /// /// Returns a URL to the sender view UI. /// /// /// Returns a URL that allows you to embed the sender view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign sending view. Upon sending completion, the user is returned to the return URL provided by the API application. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ViewUrl System.Threading.Tasks.Task CreateSenderViewAsync(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null); /// /// Returns a URL to the sender view UI. /// /// /// Returns a URL that allows you to embed the sender view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign sending view. Upon sending completion, the user is returned to the return URL provided by the API application. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (ViewUrl) System.Threading.Tasks.Task> CreateSenderViewAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null); /// /// Adds tabs for a recipient. /// /// /// Adds one or more tabs for a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of Tabs System.Threading.Tasks.Task CreateTabsAsync(string accountId, string envelopeId, string recipientId, Tabs tabs = null); /// /// Adds tabs for a recipient. /// /// /// Adds one or more tabs for a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of ApiResponse (Tabs) System.Threading.Tasks.Task> CreateTabsAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, Tabs tabs = null); /// /// Creates and adds a new workflow step definition for a template's workflow /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Task of WorkflowStep System.Threading.Tasks.Task CreateTemplateWorkflowStepDefinitionAsync(string accountId, string templateId, WorkflowStep workflowStep = null); /// /// Creates and adds a new workflow step definition for a template's workflow /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Task of ApiResponse (WorkflowStep) System.Threading.Tasks.Task> CreateTemplateWorkflowStepDefinitionAsyncWithHttpInfo(string accountId, string templateId, WorkflowStep workflowStep = null); /// /// Delete one or more attachments from a DRAFT envelope. /// /// /// Deletes one or more attachments from a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of EnvelopeAttachmentsResult System.Threading.Tasks.Task DeleteAttachmentsAsync(string accountId, string envelopeId, EnvelopeAttachmentsRequest envelopeAttachmentsRequest = null); /// /// Delete one or more attachments from a DRAFT envelope. /// /// /// Deletes one or more attachments from a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (EnvelopeAttachmentsResult) System.Threading.Tasks.Task> DeleteAttachmentsAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopeAttachmentsRequest envelopeAttachmentsRequest = null); /// /// Delete an existing ChunkedUpload. /// /// /// Deletes a chunked upload that has been committed but not yet consumed. This method cannot be used to delete the following types of chunked uploads, which the system deletes automatically: - Chunked uploads that have been consumed by use in another API call. - Expired chunked uploads. **Note:** If you are aware of a chunked upload that can be discarded, the best practice is to explicitly delete it. If you wait for the system to automatically delete it after it expires, the chunked upload will continue to count against your quota. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Task of ChunkedUploadResponse System.Threading.Tasks.Task DeleteChunkedUploadAsync(string accountId, string chunkedUploadId); /// /// Delete an existing ChunkedUpload. /// /// /// Deletes a chunked upload that has been committed but not yet consumed. This method cannot be used to delete the following types of chunked uploads, which the system deletes automatically: - Chunked uploads that have been consumed by use in another API call. - Expired chunked uploads. **Note:** If you are aware of a chunked upload that can be discarded, the best practice is to explicitly delete it. If you wait for the system to automatically delete it after it expires, the chunked upload will continue to count against your quota. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Task of ApiResponse (ChunkedUploadResponse) System.Threading.Tasks.Task> DeleteChunkedUploadAsyncWithHttpInfo(string accountId, string chunkedUploadId); /// /// Deletes envelope custom fields for draft and in-process envelopes. /// /// /// Deletes envelope custom fields for draft and in-process envelopes. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of CustomFields System.Threading.Tasks.Task DeleteCustomFieldsAsync(string accountId, string envelopeId, CustomFields customFields = null); /// /// Deletes envelope custom fields for draft and in-process envelopes. /// /// /// Deletes envelope custom fields for draft and in-process envelopes. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (CustomFields) System.Threading.Tasks.Task> DeleteCustomFieldsAsyncWithHttpInfo(string accountId, string envelopeId, CustomFields customFields = null); /// /// Deletes custom document fields from an existing envelope document. /// /// /// Deletes custom document fields from an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of DocumentFieldsInformation System.Threading.Tasks.Task DeleteDocumentFieldsAsync(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null); /// /// Deletes custom document fields from an existing envelope document. /// /// /// Deletes custom document fields from an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of ApiResponse (DocumentFieldsInformation) System.Threading.Tasks.Task> DeleteDocumentFieldsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null); /// /// Deletes a page from a document in an envelope. /// /// /// Deletes a page from a document in an envelope based on the page number. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Task of void System.Threading.Tasks.Task DeleteDocumentPageAsync(string accountId, string envelopeId, string documentId, string pageNumber); /// /// Deletes a page from a document in an envelope. /// /// /// Deletes a page from a document in an envelope based on the page number. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Task of ApiResponse System.Threading.Tasks.Task> DeleteDocumentPageAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, string pageNumber); /// /// Deletes tabs from an envelope document /// /// /// Deletes tabs from the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of Tabs System.Threading.Tasks.Task DeleteDocumentTabsAsync(string accountId, string envelopeId, string documentId, Tabs tabs = null); /// /// Deletes tabs from an envelope document /// /// /// Deletes tabs from the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of ApiResponse (Tabs) System.Threading.Tasks.Task> DeleteDocumentTabsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, Tabs tabs = null); /// /// Deletes documents from a draft envelope. /// /// /// Deletes one or more documents from an existing draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of EnvelopeDocumentsResult System.Threading.Tasks.Task DeleteDocumentsAsync(string accountId, string envelopeId, EnvelopeDefinition envelopeDefinition = null); /// /// Deletes documents from a draft envelope. /// /// /// Deletes one or more documents from an existing draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (EnvelopeDocumentsResult) System.Threading.Tasks.Task> DeleteDocumentsAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopeDefinition envelopeDefinition = null); /// /// Deletes the email setting overrides for an envelope. /// /// /// Deletes all existing email override settings for the envelope. If you want to delete an individual email override setting, use the PUT and set the value to an empty string. Note that deleting email settings will only affect email communications that occur after the deletion and the normal account email settings are used for future email communications. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of EmailSettings System.Threading.Tasks.Task DeleteEmailSettingsAsync(string accountId, string envelopeId); /// /// Deletes the email setting overrides for an envelope. /// /// /// Deletes all existing email override settings for the envelope. If you want to delete an individual email override setting, use the PUT and set the value to an empty string. Note that deleting email settings will only affect email communications that occur after the deletion and the normal account email settings are used for future email communications. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (EmailSettings) System.Threading.Tasks.Task> DeleteEmailSettingsAsyncWithHttpInfo(string accountId, string envelopeId); /// /// Revokes the correction view URL to the Envelope UI /// /// /// Revokes the correction view URL to the Envelope UI. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of void System.Threading.Tasks.Task DeleteEnvelopeCorrectViewAsync(string accountId, string envelopeId, CorrectViewRequest correctViewRequest = null); /// /// Revokes the correction view URL to the Envelope UI /// /// /// Revokes the correction view URL to the Envelope UI. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse System.Threading.Tasks.Task> DeleteEnvelopeCorrectViewAsyncWithHttpInfo(string accountId, string envelopeId, CorrectViewRequest correctViewRequest = null); /// /// Deletes the delayed routing rules for the specified envelope workflow step. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of void System.Threading.Tasks.Task DeleteEnvelopeDelayedRoutingDefinitionAsync(string accountId, string envelopeId, string workflowStepId); /// /// Deletes the delayed routing rules for the specified envelope workflow step. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of ApiResponse System.Threading.Tasks.Task> DeleteEnvelopeDelayedRoutingDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, string workflowStepId); /// /// Deletes the scheduled sending rules for the envelope's workflow. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of void System.Threading.Tasks.Task DeleteEnvelopeScheduledSendingDefinitionAsync(string accountId, string envelopeId); /// /// Deletes the scheduled sending rules for the envelope's workflow. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse System.Threading.Tasks.Task> DeleteEnvelopeScheduledSendingDefinitionAsyncWithHttpInfo(string accountId, string envelopeId); /// /// Delete envelope transfer rules for an account. /// /// /// This method deletes an envelope transfer rule. **Note:** Only Administrators can delete envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Task of void System.Threading.Tasks.Task DeleteEnvelopeTransferRulesAsync(string accountId, string envelopeTransferRuleId); /// /// Delete envelope transfer rules for an account. /// /// /// This method deletes an envelope transfer rule. **Note:** Only Administrators can delete envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Task of ApiResponse System.Threading.Tasks.Task> DeleteEnvelopeTransferRulesAsyncWithHttpInfo(string accountId, string envelopeTransferRuleId); /// /// Delete the workflow definition for an envelope. /// /// /// Deletes the specified envelope's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of void System.Threading.Tasks.Task DeleteEnvelopeWorkflowDefinitionAsync(string accountId, string envelopeId); /// /// Delete the workflow definition for an envelope. /// /// /// Deletes the specified envelope's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse System.Threading.Tasks.Task> DeleteEnvelopeWorkflowDefinitionAsyncWithHttpInfo(string accountId, string envelopeId); /// /// Deletes the envelope workflow step definition for an envelope's workflow by step id. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of void System.Threading.Tasks.Task DeleteEnvelopeWorkflowStepDefinitionAsync(string accountId, string envelopeId, string workflowStepId); /// /// Deletes the envelope workflow step definition for an envelope's workflow by step id. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of ApiResponse System.Threading.Tasks.Task> DeleteEnvelopeWorkflowStepDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, string workflowStepId); /// /// Deletes an envelope lock. /// /// /// Deletes the lock from the specified envelope. The `X-DocuSign-Edit` header must be included in the request. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of LockInformation System.Threading.Tasks.Task DeleteLockAsync(string accountId, string envelopeId); /// /// Deletes an envelope lock. /// /// /// Deletes the lock from the specified envelope. The `X-DocuSign-Edit` header must be included in the request. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (LockInformation) System.Threading.Tasks.Task> DeleteLockAsyncWithHttpInfo(string accountId, string envelopeId); /// /// Deletes a recipient from an envelope. /// /// /// Deletes the specified recipient file from the specified envelope. This cannot be used if the envelope has been sent. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of Recipients System.Threading.Tasks.Task DeleteRecipientAsync(string accountId, string envelopeId, string recipientId); /// /// Deletes a recipient from an envelope. /// /// /// Deletes the specified recipient file from the specified envelope. This cannot be used if the envelope has been sent. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of ApiResponse (Recipients) System.Threading.Tasks.Task> DeleteRecipientAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId); /// /// Deletes recipients from an envelope. /// /// /// Deletes one or more recipients from a draft or sent envelope. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients. If the envelope is `In Process`, meaning that it has been sent and has not been completed or voided, recipients that have completed their actions cannot be deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of Recipients System.Threading.Tasks.Task DeleteRecipientsAsync(string accountId, string envelopeId, Recipients recipients = null); /// /// Deletes recipients from an envelope. /// /// /// Deletes one or more recipients from a draft or sent envelope. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients. If the envelope is `In Process`, meaning that it has been sent and has not been completed or voided, recipients that have completed their actions cannot be deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (Recipients) System.Threading.Tasks.Task> DeleteRecipientsAsyncWithHttpInfo(string accountId, string envelopeId, Recipients recipients = null); /// /// Deletes the tabs associated with a recipient. /// /// /// Deletes one or more tabs associated with a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of Tabs System.Threading.Tasks.Task DeleteTabsAsync(string accountId, string envelopeId, string recipientId, Tabs tabs = null); /// /// Deletes the tabs associated with a recipient. /// /// /// Deletes one or more tabs associated with a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of ApiResponse (Tabs) System.Threading.Tasks.Task> DeleteTabsAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, Tabs tabs = null); /// /// Deletes the delayed routing rules for the specified template workflow step. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// Task of void System.Threading.Tasks.Task DeleteTemplateDelayedRoutingDefinitionAsync(string accountId, string templateId, string workflowStepId); /// /// Deletes the delayed routing rules for the specified template workflow step. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// Task of ApiResponse System.Threading.Tasks.Task> DeleteTemplateDelayedRoutingDefinitionAsyncWithHttpInfo(string accountId, string templateId, string workflowStepId); /// /// Deletes the scheduled sending rules for the template's workflow. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Task of void System.Threading.Tasks.Task DeleteTemplateScheduledSendingDefinitionAsync(string accountId, string templateId); /// /// Deletes the scheduled sending rules for the template's workflow. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Task of ApiResponse System.Threading.Tasks.Task> DeleteTemplateScheduledSendingDefinitionAsyncWithHttpInfo(string accountId, string templateId); /// /// Delete the workflow definition for a template. /// /// /// Deletes the specified template's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Task of void System.Threading.Tasks.Task DeleteTemplateWorkflowDefinitionAsync(string accountId, string templateId); /// /// Delete the workflow definition for a template. /// /// /// Deletes the specified template's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Task of ApiResponse System.Threading.Tasks.Task> DeleteTemplateWorkflowDefinitionAsyncWithHttpInfo(string accountId, string templateId); /// /// Deletes the workflow step definition for an template's workflow by step id. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// Task of void System.Threading.Tasks.Task DeleteTemplateWorkflowStepDefinitionAsync(string accountId, string templateId, string workflowStepId); /// /// Deletes the workflow step definition for an template's workflow by step id. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// Task of ApiResponse System.Threading.Tasks.Task> DeleteTemplateWorkflowStepDefinitionAsyncWithHttpInfo(string accountId, string templateId, string workflowStepId); /// /// Deletes a template from a document in an existing envelope. /// /// /// Deletes the specified template from a document in an existing envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The ID of the template being accessed. /// Task of void System.Threading.Tasks.Task DeleteTemplatesFromDocumentAsync(string accountId, string envelopeId, string documentId, string templateId); /// /// Deletes a template from a document in an existing envelope. /// /// /// Deletes the specified template from a document in an existing envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The ID of the template being accessed. /// Task of ApiResponse System.Threading.Tasks.Task> DeleteTemplatesFromDocumentAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, string templateId); /// /// Retrieves an attachment from the envelope. /// /// /// Retrieves an attachment from an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of System.IO.Stream System.Threading.Tasks.Task GetAttachmentAsync(string accountId, string envelopeId, string attachmentId); /// /// Retrieves an attachment from the envelope. /// /// /// Retrieves an attachment from an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetAttachmentAsyncWithHttpInfo(string accountId, string envelopeId, string attachmentId); /// /// Returns a list of attachments associated with the specified envelope /// /// /// Returns a list of attachments associated with a specified envelope /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of EnvelopeAttachmentsResult System.Threading.Tasks.Task GetAttachmentsAsync(string accountId, string envelopeId); /// /// Returns a list of attachments associated with the specified envelope /// /// /// Returns a list of attachments associated with a specified envelope /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (EnvelopeAttachmentsResult) System.Threading.Tasks.Task> GetAttachmentsAsyncWithHttpInfo(string accountId, string envelopeId); /// /// Retrieves the current metadata of a ChunkedUpload. /// /// /// Returns the details (but not the content) about a chunked upload. **Note:** You cannot obtain details about a chunked upload that has expired, been deleted, or consumed by other actions. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Options for modifying the behavior of the function. /// Task of ChunkedUploadResponse System.Threading.Tasks.Task GetChunkedUploadAsync(string accountId, string chunkedUploadId, EnvelopesApi.GetChunkedUploadOptions options = null); /// /// Retrieves the current metadata of a ChunkedUpload. /// /// /// Returns the details (but not the content) about a chunked upload. **Note:** You cannot obtain details about a chunked upload that has expired, been deleted, or consumed by other actions. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Options for modifying the behavior of the function. /// Task of ApiResponse (ChunkedUploadResponse) System.Threading.Tasks.Task> GetChunkedUploadAsyncWithHttpInfo(string accountId, string chunkedUploadId, EnvelopesApi.GetChunkedUploadOptions options = null); /// /// Gets comment transcript for envelope and user /// /// /// Retrieves a PDF file containing all of the comments that senders and recipients have added to the documents in an envelope. The response body of this method is the PDF file as a byte stream. **Note:** Comments are disabled by default. To use the comments feature, an account administrator must enable comments on the account (in the `accountSettingsInformation` object, set the `enableSigningExtensionComments` property to **true**). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of System.IO.Stream System.Threading.Tasks.Task GetCommentsTranscriptAsync(string accountId, string envelopeId, EnvelopesApi.GetCommentsTranscriptOptions options = null); /// /// Gets comment transcript for envelope and user /// /// /// Retrieves a PDF file containing all of the comments that senders and recipients have added to the documents in an envelope. The response body of this method is the PDF file as a byte stream. **Note:** Comments are disabled by default. To use the comments feature, an account administrator must enable comments on the account (in the `accountSettingsInformation` object, set the `enableSigningExtensionComments` property to **true**). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetCommentsTranscriptAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.GetCommentsTranscriptOptions options = null); /// /// Reserved: Gets the Electronic Record and Signature Disclosure associated with the account. /// /// /// Reserved: Retrieves the Electronic Record and Signature Disclosure, with HTML formatting, associated with the account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. /// Options for modifying the behavior of the function. /// Task of ConsumerDisclosure System.Threading.Tasks.Task GetConsumerDisclosureAsync(string accountId, string envelopeId, string recipientId, string langCode, EnvelopesApi.GetConsumerDisclosureOptions options = null); /// /// Reserved: Gets the Electronic Record and Signature Disclosure associated with the account. /// /// /// Reserved: Retrieves the Electronic Record and Signature Disclosure, with HTML formatting, associated with the account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. /// Options for modifying the behavior of the function. /// Task of ApiResponse (ConsumerDisclosure) System.Threading.Tasks.Task> GetConsumerDisclosureAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, string langCode, EnvelopesApi.GetConsumerDisclosureOptions options = null); /// /// Gets the Electronic Record and Signature Disclosure associated with the account. /// /// /// Retrieves the Electronic Record and Signature Disclosure, with html formatting, associated with the account. You can use an optional query string to set the language for the disclosure. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of ConsumerDisclosure System.Threading.Tasks.Task GetConsumerDisclosureDefaultAsync(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetConsumerDisclosureDefaultOptions options = null); /// /// Gets the Electronic Record and Signature Disclosure associated with the account. /// /// /// Retrieves the Electronic Record and Signature Disclosure, with html formatting, associated with the account. You can use an optional query string to set the language for the disclosure. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (ConsumerDisclosure) System.Threading.Tasks.Task> GetConsumerDisclosureDefaultAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetConsumerDisclosureDefaultOptions options = null); /// /// Gets a document from an envelope. /// /// /// Retrieves the specified document from the envelope. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. You can also use this method to retrieve a PDF containing the combined content of all documents and the certificate. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. To retrieve the combined content replace the `{documentId}` parameter in the endpoint with `combined`. /accounts/{accountId}/envelopes/{envelopeId}/documents/combined /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Task of System.IO.Stream System.Threading.Tasks.Task GetDocumentAsync(string accountId, string envelopeId, string documentId, EnvelopesApi.GetDocumentOptions options = null); /// /// Gets a document from an envelope. /// /// /// Retrieves the specified document from the envelope. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. You can also use this method to retrieve a PDF containing the combined content of all documents and the certificate. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. To retrieve the combined content replace the `{documentId}` parameter in the endpoint with `combined`. /accounts/{accountId}/envelopes/{envelopeId}/documents/combined /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetDocumentAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, EnvelopesApi.GetDocumentOptions options = null); /// /// Gets a page image from an envelope for display. /// /// /// Retrieves a page image for display from the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Options for modifying the behavior of the function. /// Task of System.IO.Stream System.Threading.Tasks.Task GetDocumentPageImageAsync(string accountId, string envelopeId, string documentId, string pageNumber, EnvelopesApi.GetDocumentPageImageOptions options = null); /// /// Gets a page image from an envelope for display. /// /// /// Retrieves a page image for display from the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetDocumentPageImageAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, string pageNumber, EnvelopesApi.GetDocumentPageImageOptions options = null); /// /// Returns tabs on the document. /// /// /// Returns the tabs on the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Task of Tabs System.Threading.Tasks.Task GetDocumentTabsAsync(string accountId, string envelopeId, string documentId, EnvelopesApi.GetDocumentTabsOptions options = null); /// /// Returns tabs on the document. /// /// /// Returns the tabs on the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (Tabs) System.Threading.Tasks.Task> GetDocumentTabsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, EnvelopesApi.GetDocumentTabsOptions options = null); /// /// Gets the email setting overrides for an envelope. /// /// /// Retrieves the email override settings for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of EmailSettings System.Threading.Tasks.Task GetEmailSettingsAsync(string accountId, string envelopeId); /// /// Gets the email setting overrides for an envelope. /// /// /// Retrieves the email override settings for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (EmailSettings) System.Threading.Tasks.Task> GetEmailSettingsAsyncWithHttpInfo(string accountId, string envelopeId); /// /// Gets the status of a envelope. /// /// /// Retrieves the overall status for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of Envelope System.Threading.Tasks.Task GetEnvelopeAsync(string accountId, string envelopeId, EnvelopesApi.GetEnvelopeOptions options = null); /// /// Gets the status of a envelope. /// /// /// Retrieves the overall status for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (Envelope) System.Threading.Tasks.Task> GetEnvelopeAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.GetEnvelopeOptions options = null); /// /// Returns the delayed routing rules for an envelope's workflow step definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of DelayedRouting System.Threading.Tasks.Task GetEnvelopeDelayedRoutingDefinitionAsync(string accountId, string envelopeId, string workflowStepId); /// /// Returns the delayed routing rules for an envelope's workflow step definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of ApiResponse (DelayedRouting) System.Threading.Tasks.Task> GetEnvelopeDelayedRoutingDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, string workflowStepId); /// /// Returns formfields for an envelope /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of DocGenFormFieldResponse System.Threading.Tasks.Task GetEnvelopeDocGenFormFieldsAsync(string accountId, string envelopeId); /// /// Returns formfields for an envelope /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (DocGenFormFieldResponse) System.Threading.Tasks.Task> GetEnvelopeDocGenFormFieldsAsyncWithHttpInfo(string accountId, string envelopeId); /// /// Get the Original HTML Definition used to generate the Responsive HTML for a given document. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Task of DocumentHtmlDefinitionOriginals System.Threading.Tasks.Task GetEnvelopeDocumentHtmlDefinitionsAsync(string accountId, string envelopeId, string documentId); /// /// Get the Original HTML Definition used to generate the Responsive HTML for a given document. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Task of ApiResponse (DocumentHtmlDefinitionOriginals) System.Threading.Tasks.Task> GetEnvelopeDocumentHtmlDefinitionsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId); /// /// Get the Original HTML Definition used to generate the Responsive HTML for the envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of DocumentHtmlDefinitionOriginals System.Threading.Tasks.Task GetEnvelopeHtmlDefinitionsAsync(string accountId, string envelopeId); /// /// Get the Original HTML Definition used to generate the Responsive HTML for the envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (DocumentHtmlDefinitionOriginals) System.Threading.Tasks.Task> GetEnvelopeHtmlDefinitionsAsyncWithHttpInfo(string accountId, string envelopeId); /// /// Returns the scheduled sending rules for an envelope's workflow definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ScheduledSending System.Threading.Tasks.Task GetEnvelopeScheduledSendingDefinitionAsync(string accountId, string envelopeId); /// /// Returns the scheduled sending rules for an envelope's workflow definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (ScheduledSending) System.Threading.Tasks.Task> GetEnvelopeScheduledSendingDefinitionAsyncWithHttpInfo(string accountId, string envelopeId); /// /// Returns a list of envelope transfer rules in the specified account. /// /// /// This method retrieves a list of envelope transfer rules associated with an account. **Note:** Only Administrators can create and use envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// Options for modifying the behavior of the function. /// Task of EnvelopeTransferRuleInformation System.Threading.Tasks.Task GetEnvelopeTransferRulesAsync(string accountId, EnvelopesApi.GetEnvelopeTransferRulesOptions options = null); /// /// Returns a list of envelope transfer rules in the specified account. /// /// /// This method retrieves a list of envelope transfer rules associated with an account. **Note:** Only Administrators can create and use envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// Options for modifying the behavior of the function. /// Task of ApiResponse (EnvelopeTransferRuleInformation) System.Threading.Tasks.Task> GetEnvelopeTransferRulesAsyncWithHttpInfo(string accountId, EnvelopesApi.GetEnvelopeTransferRulesOptions options = null); /// /// Returns the workflow definition for an envelope. /// /// /// Returns an envelope's workflow definition if the envelope specified by `envelopeId` has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of Workflow System.Threading.Tasks.Task GetEnvelopeWorkflowDefinitionAsync(string accountId, string envelopeId); /// /// Returns the workflow definition for an envelope. /// /// /// Returns an envelope's workflow definition if the envelope specified by `envelopeId` has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (Workflow) System.Threading.Tasks.Task> GetEnvelopeWorkflowDefinitionAsyncWithHttpInfo(string accountId, string envelopeId); /// /// Returns the workflow step definition for an envelope by step id. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of WorkflowStep System.Threading.Tasks.Task GetEnvelopeWorkflowStepDefinitionAsync(string accountId, string envelopeId, string workflowStepId); /// /// Returns the workflow step definition for an envelope by step id. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of ApiResponse (WorkflowStep) System.Threading.Tasks.Task> GetEnvelopeWorkflowStepDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, string workflowStepId); /// /// Returns envelope form data for an existing envelope. /// /// /// This method downloads the envelope and tab data (also called form data) from any in-process, completed, or canceled envelope that you sent or that is shared with you. Recipients who are also full administrators on an account can view form data for any envelopes that another user on the account has sent to them. **Note:** To use this feature, the Sending Setting \"Allow sender to download form data\" must be enabled for the account. ### Related topics - [How to get envelope tab values](/docs/esign-rest-api/how-to/get-envelope-tab-values/) /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of EnvelopeFormData System.Threading.Tasks.Task GetFormDataAsync(string accountId, string envelopeId); /// /// Returns envelope form data for an existing envelope. /// /// /// This method downloads the envelope and tab data (also called form data) from any in-process, completed, or canceled envelope that you sent or that is shared with you. Recipients who are also full administrators on an account can view form data for any envelopes that another user on the account has sent to them. **Note:** To use this feature, the Sending Setting \"Allow sender to download form data\" must be enabled for the account. ### Related topics - [How to get envelope tab values](/docs/esign-rest-api/how-to/get-envelope-tab-values/) /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (EnvelopeFormData) System.Threading.Tasks.Task> GetFormDataAsyncWithHttpInfo(string accountId, string envelopeId); /// /// Gets envelope lock information. /// /// /// Retrieves general information about the envelope lock. If the call is made by the locked by user and the request has the same integrator key as original, then the `X-DocuSign-Edit` header and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of LockInformation System.Threading.Tasks.Task GetLockAsync(string accountId, string envelopeId); /// /// Gets envelope lock information. /// /// /// Retrieves general information about the envelope lock. If the call is made by the locked by user and the request has the same integrator key as original, then the `X-DocuSign-Edit` header and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (LockInformation) System.Threading.Tasks.Task> GetLockAsyncWithHttpInfo(string accountId, string envelopeId); /// /// Gets envelope notification information. /// /// /// Retrieves the envelope notification, reminders and expirations, information for an existing envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of Notification System.Threading.Tasks.Task GetNotificationSettingsAsync(string accountId, string envelopeId); /// /// Gets envelope notification information. /// /// /// Retrieves the envelope notification, reminders and expirations, information for an existing envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (Notification) System.Threading.Tasks.Task> GetNotificationSettingsAsyncWithHttpInfo(string accountId, string envelopeId); /// /// Returns tabs on the specified page. /// /// /// Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Task of Tabs System.Threading.Tasks.Task GetPageTabsAsync(string accountId, string envelopeId, string documentId, string pageNumber); /// /// Returns tabs on the specified page. /// /// /// Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Task of ApiResponse (Tabs) System.Threading.Tasks.Task> GetPageTabsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, string pageNumber); /// /// Returns document page image(s) based on input. /// /// /// Returns images of the pages in a document for display based on the parameters that you specify. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Task of PageImages System.Threading.Tasks.Task GetPagesAsync(string accountId, string envelopeId, string documentId, EnvelopesApi.GetPagesOptions options = null); /// /// Returns document page image(s) based on input. /// /// /// Returns images of the pages in a document for display based on the parameters that you specify. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (PageImages) System.Threading.Tasks.Task> GetPagesAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, EnvelopesApi.GetPagesOptions options = null); /// /// Returns document visibility for the recipients /// /// /// This method returns information about document visibility for a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of DocumentVisibilityList System.Threading.Tasks.Task GetRecipientDocumentVisibilityAsync(string accountId, string envelopeId, string recipientId); /// /// Returns document visibility for the recipients /// /// /// This method returns information about document visibility for a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of ApiResponse (DocumentVisibilityList) System.Threading.Tasks.Task> GetRecipientDocumentVisibilityAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId); /// /// Gets the initials image for a user. /// /// /// Retrieves the initials image for the specified user. The image is returned in the same format as it was uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user id and the user must be a member of the account. The `signatureIdOrName` paramter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only contain chromed images. If getting the non-chromed image fails, try getting the chromed image. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of System.IO.Stream System.Threading.Tasks.Task GetRecipientInitialsImageAsync(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetRecipientInitialsImageOptions options = null); /// /// Gets the initials image for a user. /// /// /// Retrieves the initials image for the specified user. The image is returned in the same format as it was uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user id and the user must be a member of the account. The `signatureIdOrName` paramter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only contain chromed images. If getting the non-chromed image fails, try getting the chromed image. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetRecipientInitialsImageAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetRecipientInitialsImageOptions options = null); /// /// Gets signature information for a signer or sign-in-person recipient. /// /// /// Retrieves signature information for a signer or sign-in-person recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of UserSignature System.Threading.Tasks.Task GetRecipientSignatureAsync(string accountId, string envelopeId, string recipientId); /// /// Gets signature information for a signer or sign-in-person recipient. /// /// /// Retrieves signature information for a signer or sign-in-person recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of ApiResponse (UserSignature) System.Threading.Tasks.Task> GetRecipientSignatureAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId); /// /// Retrieve signature image information for a signer/sign-in-person recipient. /// /// /// Retrieves the specified user signature image. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureIdOrName` parameter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that don't properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of System.IO.Stream System.Threading.Tasks.Task GetRecipientSignatureImageAsync(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetRecipientSignatureImageOptions options = null); /// /// Retrieve signature image information for a signer/sign-in-person recipient. /// /// /// Retrieves the specified user signature image. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureIdOrName` parameter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that don't properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetRecipientSignatureImageAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetRecipientSignatureImageOptions options = null); /// /// Get encrypted tabs for envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of void System.Threading.Tasks.Task GetTabsBlobAsync(string accountId, string envelopeId); /// /// Get encrypted tabs for envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse System.Threading.Tasks.Task> GetTabsBlobAsyncWithHttpInfo(string accountId, string envelopeId); /// /// Returns the delayed routing rules for a template's workflow step definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// Task of DelayedRouting System.Threading.Tasks.Task GetTemplateDelayedRoutingDefinitionAsync(string accountId, string templateId, string workflowStepId); /// /// Returns the delayed routing rules for a template's workflow step definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// Task of ApiResponse (DelayedRouting) System.Threading.Tasks.Task> GetTemplateDelayedRoutingDefinitionAsyncWithHttpInfo(string accountId, string templateId, string workflowStepId); /// /// Returns document visibility for the recipients /// /// /// This method returns information about document visibility for a template recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// The ID of the recipient being accessed. /// Task of DocumentVisibilityList System.Threading.Tasks.Task GetTemplateRecipientDocumentVisibilityAsync(string accountId, string templateId, string recipientId); /// /// Returns document visibility for the recipients /// /// /// This method returns information about document visibility for a template recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// The ID of the recipient being accessed. /// Task of ApiResponse (DocumentVisibilityList) System.Threading.Tasks.Task> GetTemplateRecipientDocumentVisibilityAsyncWithHttpInfo(string accountId, string templateId, string recipientId); /// /// Returns the scheduled sending rules for a template's workflow definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Task of ScheduledSending System.Threading.Tasks.Task GetTemplateScheduledSendingDefinitionAsync(string accountId, string templateId); /// /// Returns the scheduled sending rules for a template's workflow definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Task of ApiResponse (ScheduledSending) System.Threading.Tasks.Task> GetTemplateScheduledSendingDefinitionAsyncWithHttpInfo(string accountId, string templateId); /// /// Returns the workflow definition for a template. /// /// /// Returns template's workflow definition if the template specified by `templateId` has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Task of Workflow System.Threading.Tasks.Task GetTemplateWorkflowDefinitionAsync(string accountId, string templateId); /// /// Returns the workflow definition for a template. /// /// /// Returns template's workflow definition if the template specified by `templateId` has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Task of ApiResponse (Workflow) System.Threading.Tasks.Task> GetTemplateWorkflowDefinitionAsyncWithHttpInfo(string accountId, string templateId); /// /// Returns the workflow step definition for a template by step id. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// Task of WorkflowStep System.Threading.Tasks.Task GetTemplateWorkflowStepDefinitionAsync(string accountId, string templateId, string workflowStepId); /// /// Returns the workflow step definition for a template by step id. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// Task of ApiResponse (WorkflowStep) System.Threading.Tasks.Task> GetTemplateWorkflowStepDefinitionAsyncWithHttpInfo(string accountId, string templateId, string workflowStepId); /// /// Gets the envelope audit events for an envelope. /// /// /// Gets the envelope audit events for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of EnvelopeAuditEventResponse System.Threading.Tasks.Task ListAuditEventsAsync(string accountId, string envelopeId, EnvelopesApi.ListAuditEventsOptions options = null); /// /// Gets the envelope audit events for an envelope. /// /// /// Gets the envelope audit events for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (EnvelopeAuditEventResponse) System.Threading.Tasks.Task> ListAuditEventsAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.ListAuditEventsOptions options = null); /// /// Gets the custom field information for the specified envelope. /// /// /// Retrieves the custom field information for the specified envelope. You can use these fields in the envelopes for your account to record information about the envelope, help search for envelopes, and track information. The envelope custom fields are shown in the Envelope Settings section when a user is creating an envelope in the DocuSign member console. The envelope custom fields are not seen by the envelope recipients. There are two types of envelope custom fields, text, and list. A text custom field lets the sender enter the value for the field. With a list custom field, the sender selects the value of the field from a pre-made list. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of CustomFieldsEnvelope System.Threading.Tasks.Task ListCustomFieldsAsync(string accountId, string envelopeId); /// /// Gets the custom field information for the specified envelope. /// /// /// Retrieves the custom field information for the specified envelope. You can use these fields in the envelopes for your account to record information about the envelope, help search for envelopes, and track information. The envelope custom fields are shown in the Envelope Settings section when a user is creating an envelope in the DocuSign member console. The envelope custom fields are not seen by the envelope recipients. There are two types of envelope custom fields, text, and list. A text custom field lets the sender enter the value for the field. With a list custom field, the sender selects the value of the field from a pre-made list. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (CustomFieldsEnvelope) System.Threading.Tasks.Task> ListCustomFieldsAsyncWithHttpInfo(string accountId, string envelopeId); /// /// Gets the custom document fields from an existing envelope document. /// /// /// Retrieves the custom document field information from an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Task of DocumentFieldsInformation System.Threading.Tasks.Task ListDocumentFieldsAsync(string accountId, string envelopeId, string documentId); /// /// Gets the custom document fields from an existing envelope document. /// /// /// Retrieves the custom document field information from an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Task of ApiResponse (DocumentFieldsInformation) System.Threading.Tasks.Task> ListDocumentFieldsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId); /// /// Gets a list of envelope documents. /// /// /// Retrieves a list of documents associated with the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of EnvelopeDocumentsResult System.Threading.Tasks.Task ListDocumentsAsync(string accountId, string envelopeId, EnvelopesApi.ListDocumentsOptions options = null); /// /// Gets a list of envelope documents. /// /// /// Retrieves a list of documents associated with the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (EnvelopeDocumentsResult) System.Threading.Tasks.Task> ListDocumentsAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.ListDocumentsOptions options = null); /// /// Gets the status of recipients for an envelope. /// /// /// Retrieves the status of all recipients in a single envelope and identifies the current recipient in the routing list. The `currentRoutingOrder` property of the response contains the `routingOrder` value of the current recipient indicating that the envelope has been sent to the recipient, but the recipient has not completed their actions. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of Recipients System.Threading.Tasks.Task ListRecipientsAsync(string accountId, string envelopeId, EnvelopesApi.ListRecipientsOptions options = null); /// /// Gets the status of recipients for an envelope. /// /// /// Retrieves the status of all recipients in a single envelope and identifies the current recipient in the routing list. The `currentRoutingOrder` property of the response contains the `routingOrder` value of the current recipient indicating that the envelope has been sent to the recipient, but the recipient has not completed their actions. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (Recipients) System.Threading.Tasks.Task> ListRecipientsAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.ListRecipientsOptions options = null); /// /// Gets the envelope status for the specified envelopes. /// /// /// Retrieves the envelope status for the specified envelopes. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Options for modifying the behavior of the function. /// Task of EnvelopesInformation System.Threading.Tasks.Task ListStatusAsync(string accountId, EnvelopeIdsRequest envelopeIdsRequest = null, EnvelopesApi.ListStatusOptions options = null); /// /// Gets the envelope status for the specified envelopes. /// /// /// Retrieves the envelope status for the specified envelopes. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Options for modifying the behavior of the function. /// Task of ApiResponse (EnvelopesInformation) System.Threading.Tasks.Task> ListStatusAsyncWithHttpInfo(string accountId, EnvelopeIdsRequest envelopeIdsRequest = null, EnvelopesApi.ListStatusOptions options = null); /// /// Gets status changes for one or more envelopes. /// /// /// Retrieves envelope status changes for all envelopes. You can modify the information returned by adding query strings to limit the request to check between certain dates and times, or for certain envelopes, or for certain status codes. It is recommended that you use one or more of the query strings in order to limit the size of the response. ### Important: Unless you are requesting the status for specific envelopes (using the `envelopeIds` or `transactionIds` properties), you must add a set the `from_date` property in the request. Getting envelope status using `transactionIds` is useful for offline signing situations where it can be used determine if an envelope was created or not, for the cases where a network connection was lost, before the envelope status could be returned. ### Request Envelope Status Notes ### The REST API GET /envelopes call uses certain filters to find results. In some cases requests are check for \"any status change\" instead of the just the single status requested. In these cases, more envelopes might be returned by the request than otherwise would be. For example, for a request with the begin date is set to Jan 1st, an end date set to Jan 7th and the status qualifier (`from_to_status`) set to `Delivered` &mdash; the response set might contain envelopes that were created during that time period, but not delivered during the time period. To avoid unnecessary database queries, the DocuSign system checks requests to ensure that the added filters will not result in a zero-size response before acting on the request. The following table shows the valid envelope statuses (in the Valid Current Statuses column) for the status qualifiers 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. For example, a request with a status qualifier (from_to_status) of `Delivered` and a status of \"`Created`,`Sent`\", DocuSign will always return an empty list. This is because the request essentially translates to: find the envelopes that were delivered between the begin and end dates that have a current status of `Created` or `Sent`, and 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 run the request, but just returns the empty list. Client applications should check that the statuses they are requesting make sense for a given status qualifier. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// Options for modifying the behavior of the function. /// Task of EnvelopesInformation System.Threading.Tasks.Task ListStatusChangesAsync(string accountId, EnvelopesApi.ListStatusChangesOptions options = null); /// /// Gets status changes for one or more envelopes. /// /// /// Retrieves envelope status changes for all envelopes. You can modify the information returned by adding query strings to limit the request to check between certain dates and times, or for certain envelopes, or for certain status codes. It is recommended that you use one or more of the query strings in order to limit the size of the response. ### Important: Unless you are requesting the status for specific envelopes (using the `envelopeIds` or `transactionIds` properties), you must add a set the `from_date` property in the request. Getting envelope status using `transactionIds` is useful for offline signing situations where it can be used determine if an envelope was created or not, for the cases where a network connection was lost, before the envelope status could be returned. ### Request Envelope Status Notes ### The REST API GET /envelopes call uses certain filters to find results. In some cases requests are check for \"any status change\" instead of the just the single status requested. In these cases, more envelopes might be returned by the request than otherwise would be. For example, for a request with the begin date is set to Jan 1st, an end date set to Jan 7th and the status qualifier (`from_to_status`) set to `Delivered` &mdash; the response set might contain envelopes that were created during that time period, but not delivered during the time period. To avoid unnecessary database queries, the DocuSign system checks requests to ensure that the added filters will not result in a zero-size response before acting on the request. The following table shows the valid envelope statuses (in the Valid Current Statuses column) for the status qualifiers 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. For example, a request with a status qualifier (from_to_status) of `Delivered` and a status of \"`Created`,`Sent`\", DocuSign will always return an empty list. This is because the request essentially translates to: find the envelopes that were delivered between the begin and end dates that have a current status of `Created` or `Sent`, and 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 run the request, but just returns the empty list. Client applications should check that the statuses they are requesting make sense for a given status qualifier. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// Options for modifying the behavior of the function. /// Task of ApiResponse (EnvelopesInformation) System.Threading.Tasks.Task> ListStatusChangesAsyncWithHttpInfo(string accountId, EnvelopesApi.ListStatusChangesOptions options = null); /// /// Gets the tabs information for a signer or sign-in-person recipient in an envelope. /// /// /// Retrieves information about the tabs associated with a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of Tabs System.Threading.Tasks.Task ListTabsAsync(string accountId, string envelopeId, string recipientId, EnvelopesApi.ListTabsOptions options = null); /// /// Gets the tabs information for a signer or sign-in-person recipient in an envelope. /// /// /// Retrieves information about the tabs associated with a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (Tabs) System.Threading.Tasks.Task> ListTabsAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.ListTabsOptions options = null); /// /// Get List of Templates used in an Envelope /// /// /// This returns a list of the server-side templates, their name and ID, used in an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of TemplateInformation System.Threading.Tasks.Task ListTemplatesAsync(string accountId, string envelopeId, EnvelopesApi.ListTemplatesOptions options = null); /// /// Get List of Templates used in an Envelope /// /// /// This returns a list of the server-side templates, their name and ID, used in an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (TemplateInformation) System.Threading.Tasks.Task> ListTemplatesAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.ListTemplatesOptions options = null); /// /// Gets the templates associated with a document in an existing envelope. /// /// /// Retrieves the templates associated with a document in the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Task of TemplateInformation System.Threading.Tasks.Task ListTemplatesForDocumentAsync(string accountId, string envelopeId, string documentId, EnvelopesApi.ListTemplatesForDocumentOptions options = null); /// /// Gets the templates associated with a document in an existing envelope. /// /// /// Retrieves the templates associated with a document in the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (TemplateInformation) System.Threading.Tasks.Task> ListTemplatesForDocumentAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, EnvelopesApi.ListTemplatesForDocumentOptions options = null); /// /// Add an attachment to a DRAFT or IN-PROCESS envelope. /// /// /// Adds an attachment to a draft or in-process envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// Task of EnvelopeAttachmentsResult System.Threading.Tasks.Task PutAttachmentAsync(string accountId, string envelopeId, string attachmentId, Attachment attachment = null); /// /// Add an attachment to a DRAFT or IN-PROCESS envelope. /// /// /// Adds an attachment to a draft or in-process envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// Task of ApiResponse (EnvelopeAttachmentsResult) System.Threading.Tasks.Task> PutAttachmentAsyncWithHttpInfo(string accountId, string envelopeId, string attachmentId, Attachment attachment = null); /// /// Add one or more attachments to a DRAFT or IN-PROCESS envelope. /// /// /// Adds one or more attachments to a draft or in-process envelope. Envelope attachments are files that an application can include in an envelope. They are not converted to PDF. Envelope attachments are available only through the API. There is no user interface in the DocuSign web application for them. For a list of supported file formats, see [Supported File Formats](https://support.docusign.com/guides/ndse-user-guide-supported-file-formats). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of EnvelopeAttachmentsResult System.Threading.Tasks.Task PutAttachmentsAsync(string accountId, string envelopeId, EnvelopeAttachmentsRequest envelopeAttachmentsRequest = null); /// /// Add one or more attachments to a DRAFT or IN-PROCESS envelope. /// /// /// Adds one or more attachments to a draft or in-process envelope. Envelope attachments are files that an application can include in an envelope. They are not converted to PDF. Envelope attachments are available only through the API. There is no user interface in the DocuSign web application for them. For a list of supported file formats, see [Supported File Formats](https://support.docusign.com/guides/ndse-user-guide-supported-file-formats). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (EnvelopeAttachmentsResult) System.Threading.Tasks.Task> PutAttachmentsAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopeAttachmentsRequest envelopeAttachmentsRequest = null); /// /// Rotates page image from an envelope for display. /// /// /// Rotates page image from an envelope for display. The page image can be rotated to the left or right. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// (optional) /// Task of void System.Threading.Tasks.Task RotateDocumentPageAsync(string accountId, string envelopeId, string documentId, string pageNumber, PageRequest pageRequest = null); /// /// Rotates page image from an envelope for display. /// /// /// Rotates page image from an envelope for display. The page image can be rotated to the left or right. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// (optional) /// Task of ApiResponse System.Threading.Tasks.Task> RotateDocumentPageAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, string pageNumber, PageRequest pageRequest = null); /// /// Send Draft Envelope/Void Envelope/Move/Purge Envelope/Modify draft /// /// /// The Put Envelopes endpoint provides the following functionality: * Sends the specified single draft envelope. Add {\"status\":\"sent\"} to the request body to send the envelope. * Voids the specified in-process envelope. Add {\"status\":\"voided\", \"voidedReason\":\"The reason for voiding the envelope\"} to the request body to void the envelope. * Replaces the current email subject and message for a draft envelope. Add {\"emailSubject\":\"subject\", \"emailBlurb\":\"message\"} to the request body to modify the subject and message. * Place the envelope documents and envelope metadata in a purge queue so that this information is removed from the DocuSign system. Add {\"purgeState\":\"purge type\"} to the request body. *Additional information on purging documents* The purge request can only be used for completed envelopes that are not marked as the authoritative copy. The requesting user must have permission to purge documents and must be the sender (the requesting user can act as the sender using Send On Behalf Of). ###### Note: If you have set the Document Retention policy on your account, envelope documents are automatically placed in the purge queue and the warning emails are sent at the end of the retention period. ###### Note: You can set the Document Retention policy in the Classic DocuSign Experience by specifying the number of days to retain documents. ###### Note: Setting a Document Retention policy is the same as setting a schedule for purging documents. When the purge request is initiated the envelope documents, or documents and envelope metadata, are placed in a purge queue for deletion in 14 days. A warning email notification is sent to the sender and recipients associated with the envelope, notifying them that the envelope documents will be deleted in 14 days and providing a link to the documents. A second email is sent 7 days later with the same message. At the end of the 14-day period, the envelope documents are deleted from the system. If `purgeState=\"documents_queued\"` is used in the request, then only the documents are deleted and any corresponding attachments and tabs remain in the DocuSign system. If `purgeState= \"documents_and_metadata_queued\"` is used in the request, then the documents, attachments, and tabs are deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of EnvelopeUpdateSummary System.Threading.Tasks.Task UpdateAsync(string accountId, string envelopeId, Envelope envelope = null, EnvelopesApi.UpdateOptions options = null); /// /// Send Draft Envelope/Void Envelope/Move/Purge Envelope/Modify draft /// /// /// The Put Envelopes endpoint provides the following functionality: * Sends the specified single draft envelope. Add {\"status\":\"sent\"} to the request body to send the envelope. * Voids the specified in-process envelope. Add {\"status\":\"voided\", \"voidedReason\":\"The reason for voiding the envelope\"} to the request body to void the envelope. * Replaces the current email subject and message for a draft envelope. Add {\"emailSubject\":\"subject\", \"emailBlurb\":\"message\"} to the request body to modify the subject and message. * Place the envelope documents and envelope metadata in a purge queue so that this information is removed from the DocuSign system. Add {\"purgeState\":\"purge type\"} to the request body. *Additional information on purging documents* The purge request can only be used for completed envelopes that are not marked as the authoritative copy. The requesting user must have permission to purge documents and must be the sender (the requesting user can act as the sender using Send On Behalf Of). ###### Note: If you have set the Document Retention policy on your account, envelope documents are automatically placed in the purge queue and the warning emails are sent at the end of the retention period. ###### Note: You can set the Document Retention policy in the Classic DocuSign Experience by specifying the number of days to retain documents. ###### Note: Setting a Document Retention policy is the same as setting a schedule for purging documents. When the purge request is initiated the envelope documents, or documents and envelope metadata, are placed in a purge queue for deletion in 14 days. A warning email notification is sent to the sender and recipients associated with the envelope, notifying them that the envelope documents will be deleted in 14 days and providing a link to the documents. A second email is sent 7 days later with the same message. At the end of the 14-day period, the envelope documents are deleted from the system. If `purgeState=\"documents_queued\"` is used in the request, then only the documents are deleted and any corresponding attachments and tabs remain in the DocuSign system. If `purgeState= \"documents_and_metadata_queued\"` is used in the request, then the documents, attachments, and tabs are deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of ApiResponse (EnvelopeUpdateSummary) System.Threading.Tasks.Task> UpdateAsyncWithHttpInfo(string accountId, string envelopeId, Envelope envelope = null, EnvelopesApi.UpdateOptions options = null); /// /// Integrity-Check and Commit a ChunkedUpload, readying it for use elsewhere. /// /// /// This method checks the integrity of a chunked upload and then commits it. When this request is successful, the chunked upload is then ready to be referenced in other API calls. If the request is unsuccessful, ensure that you have uploaded all of the parts by using the Update method. **Note:** After you commit a chunked upload, it no longer accepts additional parts. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Options for modifying the behavior of the function. /// Task of ChunkedUploadResponse System.Threading.Tasks.Task UpdateChunkedUploadAsync(string accountId, string chunkedUploadId, EnvelopesApi.UpdateChunkedUploadOptions options = null); /// /// Integrity-Check and Commit a ChunkedUpload, readying it for use elsewhere. /// /// /// This method checks the integrity of a chunked upload and then commits it. When this request is successful, the chunked upload is then ready to be referenced in other API calls. If the request is unsuccessful, ensure that you have uploaded all of the parts by using the Update method. **Note:** After you commit a chunked upload, it no longer accepts additional parts. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Options for modifying the behavior of the function. /// Task of ApiResponse (ChunkedUploadResponse) System.Threading.Tasks.Task> UpdateChunkedUploadAsyncWithHttpInfo(string accountId, string chunkedUploadId, EnvelopesApi.UpdateChunkedUploadOptions options = null); /// /// Add a chunk, a chunk 'part', to an existing ChunkedUpload. /// /// /// Adds a chunk or part to an existing chunked upload. After you use the Create method to initiate a new chunked upload and upload the first part, use this method to upload subsequent parts. For simplicity, DocuSign recommends that you upload the parts in their sequential order ( 1,2, 3, 4, etc.). The Create method adds the first part and assigns it the `sequence` value `0`. As a result, DocuSign recommends that you start with a `sequence` value of `1` when you use this method, and continue uploading parts contiguously until you have uploaded the entirety of the original content to DocuSign. Example: ``` PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/1 PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/2 PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/3 ``` **Note:** You cannot replace a part that DocuSign has already received, or add parts to a chunked upload that is already successfully committed. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// /// (optional) /// Task of ChunkedUploadResponse System.Threading.Tasks.Task UpdateChunkedUploadPartAsync(string accountId, string chunkedUploadId, string chunkedUploadPartSeq, ChunkedUploadRequest chunkedUploadRequest = null); /// /// Add a chunk, a chunk 'part', to an existing ChunkedUpload. /// /// /// Adds a chunk or part to an existing chunked upload. After you use the Create method to initiate a new chunked upload and upload the first part, use this method to upload subsequent parts. For simplicity, DocuSign recommends that you upload the parts in their sequential order ( 1,2, 3, 4, etc.). The Create method adds the first part and assigns it the `sequence` value `0`. As a result, DocuSign recommends that you start with a `sequence` value of `1` when you use this method, and continue uploading parts contiguously until you have uploaded the entirety of the original content to DocuSign. Example: ``` PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/1 PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/2 PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/3 ``` **Note:** You cannot replace a part that DocuSign has already received, or add parts to a chunked upload that is already successfully committed. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// /// (optional) /// Task of ApiResponse (ChunkedUploadResponse) System.Threading.Tasks.Task> UpdateChunkedUploadPartAsyncWithHttpInfo(string accountId, string chunkedUploadId, string chunkedUploadPartSeq, ChunkedUploadRequest chunkedUploadRequest = null); /// /// Updates envelope custom fields in an envelope. /// /// /// Updates the envelope custom fields in draft and in-process envelopes. Each custom field used in an envelope must have a unique name. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of CustomFields System.Threading.Tasks.Task UpdateCustomFieldsAsync(string accountId, string envelopeId, CustomFields customFields = null); /// /// Updates envelope custom fields in an envelope. /// /// /// Updates the envelope custom fields in draft and in-process envelopes. Each custom field used in an envelope must have a unique name. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (CustomFields) System.Threading.Tasks.Task> UpdateCustomFieldsAsyncWithHttpInfo(string accountId, string envelopeId, CustomFields customFields = null); /// /// Adds a document to an existing draft envelope. /// /// /// Adds a document to an existing draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Updated document content. /// Task of EnvelopeDocument System.Threading.Tasks.Task UpdateDocumentAsync(string accountId, string envelopeId, string documentId, byte[] documentFileBytes); /// /// Adds a document to an existing draft envelope. /// /// /// Adds a document to an existing draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Updated document content. /// Task of ApiResponse (EnvelopeDocument) System.Threading.Tasks.Task> UpdateDocumentAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, byte[] documentFileBytes); /// /// Updates existing custom document fields in an existing envelope document. /// /// /// Updates existing custom document fields in an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of DocumentFieldsInformation System.Threading.Tasks.Task UpdateDocumentFieldsAsync(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null); /// /// Updates existing custom document fields in an existing envelope document. /// /// /// Updates existing custom document fields in an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of ApiResponse (DocumentFieldsInformation) System.Threading.Tasks.Task> UpdateDocumentFieldsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null); /// /// Updates the tabs for an envelope document /// /// /// Updates tabs in the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of Tabs System.Threading.Tasks.Task UpdateDocumentTabsAsync(string accountId, string envelopeId, string documentId, Tabs tabs = null); /// /// Updates the tabs for an envelope document /// /// /// Updates tabs in the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of ApiResponse (Tabs) System.Threading.Tasks.Task> UpdateDocumentTabsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, Tabs tabs = null); /// /// Adds one or more documents to an existing envelope document. /// /// /// Adds one or more documents to an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of EnvelopeDocumentsResult System.Threading.Tasks.Task UpdateDocumentsAsync(string accountId, string envelopeId, EnvelopeDefinition envelopeDefinition = null); /// /// Adds one or more documents to an existing envelope document. /// /// /// Adds one or more documents to an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (EnvelopeDocumentsResult) System.Threading.Tasks.Task> UpdateDocumentsAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopeDefinition envelopeDefinition = null); /// /// Updates the email setting overrides for an envelope. /// /// /// Updates the existing email override settings for the specified envelope. Note that modifying email settings will only affect email communications that occur after the modification was made. This can also be used to delete an individual email override setting by using an empty string for the value to be deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of EmailSettings System.Threading.Tasks.Task UpdateEmailSettingsAsync(string accountId, string envelopeId, EmailSettings emailSettings = null); /// /// Updates the email setting overrides for an envelope. /// /// /// Updates the existing email override settings for the specified envelope. Note that modifying email settings will only affect email communications that occur after the modification was made. This can also be used to delete an individual email override setting by using an empty string for the value to be deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (EmailSettings) System.Threading.Tasks.Task> UpdateEmailSettingsAsyncWithHttpInfo(string accountId, string envelopeId, EmailSettings emailSettings = null); /// /// Updates the delayed routing rules for an envelope's workflow step definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// Task of DelayedRouting System.Threading.Tasks.Task UpdateEnvelopeDelayedRoutingDefinitionAsync(string accountId, string envelopeId, string workflowStepId, DelayedRouting delayedRouting = null); /// /// Updates the delayed routing rules for an envelope's workflow step definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// Task of ApiResponse (DelayedRouting) System.Threading.Tasks.Task> UpdateEnvelopeDelayedRoutingDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, string workflowStepId, DelayedRouting delayedRouting = null); /// /// Updates formfields for an envelope /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of DocGenFormFieldResponse System.Threading.Tasks.Task UpdateEnvelopeDocGenFormFieldsAsync(string accountId, string envelopeId, DocGenFormFieldRequest docGenFormFieldRequest = null, EnvelopesApi.UpdateEnvelopeDocGenFormFieldsOptions options = null); /// /// Updates formfields for an envelope /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of ApiResponse (DocGenFormFieldResponse) System.Threading.Tasks.Task> UpdateEnvelopeDocGenFormFieldsAsyncWithHttpInfo(string accountId, string envelopeId, DocGenFormFieldRequest docGenFormFieldRequest = null, EnvelopesApi.UpdateEnvelopeDocGenFormFieldsOptions options = null); /// /// Updates the scheduled sending rules for an envelope's workflow definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ScheduledSending System.Threading.Tasks.Task UpdateEnvelopeScheduledSendingDefinitionAsync(string accountId, string envelopeId, ScheduledSending scheduledSending = null); /// /// Updates the scheduled sending rules for an envelope's workflow definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (ScheduledSending) System.Threading.Tasks.Task> UpdateEnvelopeScheduledSendingDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, ScheduledSending scheduledSending = null); /// /// Update an envelope transfer rule for an account. /// /// /// This method changes the status of an envelope transfer rule. You use this method to change whether or not the rule is enabled. You must include the `envelopeTransferRuleId` both as a query parameter, and in the request body. **Note:** You cannot change any other information about the envelope transfer rule. Only Administrators can update an envelope transfer rule. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// (optional) /// Task of EnvelopeTransferRule System.Threading.Tasks.Task UpdateEnvelopeTransferRuleAsync(string accountId, string envelopeTransferRuleId, EnvelopeTransferRule envelopeTransferRule = null); /// /// Update an envelope transfer rule for an account. /// /// /// This method changes the status of an envelope transfer rule. You use this method to change whether or not the rule is enabled. You must include the `envelopeTransferRuleId` both as a query parameter, and in the request body. **Note:** You cannot change any other information about the envelope transfer rule. Only Administrators can update an envelope transfer rule. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// (optional) /// Task of ApiResponse (EnvelopeTransferRule) System.Threading.Tasks.Task> UpdateEnvelopeTransferRuleAsyncWithHttpInfo(string accountId, string envelopeTransferRuleId, EnvelopeTransferRule envelopeTransferRule = null); /// /// Update envelope transfer rules for an account. /// /// /// This method changes the status for one or more envelope transfer rules based on the `envelopeTransferRuleId`s in the request body. You use this method to change whether or not the rules are enabled. **Note:** You cannot change any other information about the envelope transfer rule. Only Administrators can update envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of EnvelopeTransferRuleInformation System.Threading.Tasks.Task UpdateEnvelopeTransferRulesAsync(string accountId, EnvelopeTransferRuleInformation envelopeTransferRuleInformation = null); /// /// Update envelope transfer rules for an account. /// /// /// This method changes the status for one or more envelope transfer rules based on the `envelopeTransferRuleId`s in the request body. You use this method to change whether or not the rules are enabled. **Note:** You cannot change any other information about the envelope transfer rule. Only Administrators can update envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of ApiResponse (EnvelopeTransferRuleInformation) System.Threading.Tasks.Task> UpdateEnvelopeTransferRulesAsyncWithHttpInfo(string accountId, EnvelopeTransferRuleInformation envelopeTransferRuleInformation = null); /// /// Updates the envelope workflow definition for an envelope. /// /// /// Updates the specified envelope's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of Workflow System.Threading.Tasks.Task UpdateEnvelopeWorkflowDefinitionAsync(string accountId, string envelopeId, Workflow workflow = null); /// /// Updates the envelope workflow definition for an envelope. /// /// /// Updates the specified envelope's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (Workflow) System.Threading.Tasks.Task> UpdateEnvelopeWorkflowDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, Workflow workflow = null); /// /// Updates the envelope workflow step definition for an envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// Task of WorkflowStep System.Threading.Tasks.Task UpdateEnvelopeWorkflowStepDefinitionAsync(string accountId, string envelopeId, string workflowStepId, WorkflowStep workflowStep = null); /// /// Updates the envelope workflow step definition for an envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// Task of ApiResponse (WorkflowStep) System.Threading.Tasks.Task> UpdateEnvelopeWorkflowStepDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, string workflowStepId, WorkflowStep workflowStep = null); /// /// Updates an envelope lock. /// /// /// Updates the lock duration time or update the `lockedByApp` property information for the specified envelope. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of LockInformation System.Threading.Tasks.Task UpdateLockAsync(string accountId, string envelopeId, LockRequest lockRequest = null); /// /// Updates an envelope lock. /// /// /// Updates the lock duration time or update the `lockedByApp` property information for the specified envelope. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (LockInformation) System.Threading.Tasks.Task> UpdateLockAsyncWithHttpInfo(string accountId, string envelopeId, LockRequest lockRequest = null); /// /// Sets envelope notification (Reminders/Expirations) structure for an existing envelope. /// /// /// This method sets the notifications (reminders and expirations) for an existing envelope. The request body sends a structure containing reminders and expirations settings. It also specifies whether to use the settings specified in the request, or the account default notification settings for the envelope. Note that this request only specifies when notifications are sent; it does not initiate sending of email messages. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of Notification System.Threading.Tasks.Task UpdateNotificationSettingsAsync(string accountId, string envelopeId, EnvelopeNotificationRequest envelopeNotificationRequest = null); /// /// Sets envelope notification (Reminders/Expirations) structure for an existing envelope. /// /// /// This method sets the notifications (reminders and expirations) for an existing envelope. The request body sends a structure containing reminders and expirations settings. It also specifies whether to use the settings specified in the request, or the account default notification settings for the envelope. Note that this request only specifies when notifications are sent; it does not initiate sending of email messages. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (Notification) System.Threading.Tasks.Task> UpdateNotificationSettingsAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopeNotificationRequest envelopeNotificationRequest = null); /// /// Updates document visibility for the recipients /// /// /// This method updates document visibility for a recipient. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of DocumentVisibilityList System.Threading.Tasks.Task UpdateRecipientDocumentVisibilityAsync(string accountId, string envelopeId, string recipientId, DocumentVisibilityList documentVisibilityList = null); /// /// Updates document visibility for the recipients /// /// /// This method updates document visibility for a recipient. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of ApiResponse (DocumentVisibilityList) System.Threading.Tasks.Task> UpdateRecipientDocumentVisibilityAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, DocumentVisibilityList documentVisibilityList = null); /// /// Sets the initials image for an accountless signer. /// /// /// Updates the initials image for a signer that does not have a DocuSign account. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K. For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of void System.Threading.Tasks.Task UpdateRecipientInitialsImageAsync(string accountId, string envelopeId, string recipientId); /// /// Sets the initials image for an accountless signer. /// /// /// Updates the initials image for a signer that does not have a DocuSign account. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K. For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of ApiResponse System.Threading.Tasks.Task> UpdateRecipientInitialsImageAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId); /// /// Sets the signature image for an accountless signer. /// /// /// Updates the signature image for an accountless signer. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K. For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of void System.Threading.Tasks.Task UpdateRecipientSignatureImageAsync(string accountId, string envelopeId, string recipientId); /// /// Sets the signature image for an accountless signer. /// /// /// Updates the signature image for an accountless signer. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K. For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of ApiResponse System.Threading.Tasks.Task> UpdateRecipientSignatureImageAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId); /// /// Updates recipients in a draft envelope or corrects recipient information for an in process envelope. /// /// /// Updates recipients in a draft envelope or corrects recipient information for an in process envelope. For draft envelopes, you can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`. Once an envelope has been sent, you can only edit: `email`, `userName`, `signerName`, `routingOrder`, `faxNumber`, and `deliveryMethod`. You can also select to resend an envelope by using the `resend_envelope` option. If you send information for a recipient that does not already exist in a draft envelope, the recipient is added to the envelope (similar to the POST). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of RecipientsUpdateSummary System.Threading.Tasks.Task UpdateRecipientsAsync(string accountId, string envelopeId, Recipients recipients = null, EnvelopesApi.UpdateRecipientsOptions options = null); /// /// Updates recipients in a draft envelope or corrects recipient information for an in process envelope. /// /// /// Updates recipients in a draft envelope or corrects recipient information for an in process envelope. For draft envelopes, you can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`. Once an envelope has been sent, you can only edit: `email`, `userName`, `signerName`, `routingOrder`, `faxNumber`, and `deliveryMethod`. You can also select to resend an envelope by using the `resend_envelope` option. If you send information for a recipient that does not already exist in a draft envelope, the recipient is added to the envelope (similar to the POST). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of ApiResponse (RecipientsUpdateSummary) System.Threading.Tasks.Task> UpdateRecipientsAsyncWithHttpInfo(string accountId, string envelopeId, Recipients recipients = null, EnvelopesApi.UpdateRecipientsOptions options = null); /// /// Updates document visibility for the recipients /// /// /// This method updates document visibility for one or more recipients based on the `recipientId` and `visible` values that you include in the request body. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of DocumentVisibilityList System.Threading.Tasks.Task UpdateRecipientsDocumentVisibilityAsync(string accountId, string envelopeId, DocumentVisibilityList documentVisibilityList = null); /// /// Updates document visibility for the recipients /// /// /// This method updates document visibility for one or more recipients based on the `recipientId` and `visible` values that you include in the request body. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (DocumentVisibilityList) System.Threading.Tasks.Task> UpdateRecipientsDocumentVisibilityAsyncWithHttpInfo(string accountId, string envelopeId, DocumentVisibilityList documentVisibilityList = null); /// /// Updates the tabs for a recipient. /// /// /// Updates one or more tabs for a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of Tabs System.Threading.Tasks.Task UpdateTabsAsync(string accountId, string envelopeId, string recipientId, Tabs tabs = null); /// /// Updates the tabs for a recipient. /// /// /// Updates one or more tabs for a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of ApiResponse (Tabs) System.Threading.Tasks.Task> UpdateTabsAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, Tabs tabs = null); /// /// Update encrypted tabs for envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of void System.Threading.Tasks.Task UpdateTabsBlobAsync(string accountId, string envelopeId); /// /// Update encrypted tabs for envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse System.Threading.Tasks.Task> UpdateTabsBlobAsyncWithHttpInfo(string accountId, string envelopeId); /// /// Updates the delayed routing rules for a template's workflow step definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// (optional) /// Task of DelayedRouting System.Threading.Tasks.Task UpdateTemplateDelayedRoutingDefinitionAsync(string accountId, string templateId, string workflowStepId, DelayedRouting delayedRouting = null); /// /// Updates the delayed routing rules for a template's workflow step definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// (optional) /// Task of ApiResponse (DelayedRouting) System.Threading.Tasks.Task> UpdateTemplateDelayedRoutingDefinitionAsyncWithHttpInfo(string accountId, string templateId, string workflowStepId, DelayedRouting delayedRouting = null); /// /// Updates document visibility for the recipients /// /// /// This method updates the document visibility for a template recipient. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of TemplateDocumentVisibilityList System.Threading.Tasks.Task UpdateTemplateRecipientDocumentVisibilityAsync(string accountId, string templateId, string recipientId, TemplateDocumentVisibilityList templateDocumentVisibilityList = null); /// /// Updates document visibility for the recipients /// /// /// This method updates the document visibility for a template recipient. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of ApiResponse (TemplateDocumentVisibilityList) System.Threading.Tasks.Task> UpdateTemplateRecipientDocumentVisibilityAsyncWithHttpInfo(string accountId, string templateId, string recipientId, TemplateDocumentVisibilityList templateDocumentVisibilityList = null); /// /// Updates document visibility for the recipients /// /// /// This method updates document visibility for one or more template recipients based on the `recipientId` and `visible` values that you include in the request body. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Task of TemplateDocumentVisibilityList System.Threading.Tasks.Task UpdateTemplateRecipientsDocumentVisibilityAsync(string accountId, string templateId, TemplateDocumentVisibilityList templateDocumentVisibilityList = null); /// /// Updates document visibility for the recipients /// /// /// This method updates document visibility for one or more template recipients based on the `recipientId` and `visible` values that you include in the request body. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Task of ApiResponse (TemplateDocumentVisibilityList) System.Threading.Tasks.Task> UpdateTemplateRecipientsDocumentVisibilityAsyncWithHttpInfo(string accountId, string templateId, TemplateDocumentVisibilityList templateDocumentVisibilityList = null); /// /// Updates the scheduled sending rules for a template's workflow definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Task of ScheduledSending System.Threading.Tasks.Task UpdateTemplateScheduledSendingDefinitionAsync(string accountId, string templateId, ScheduledSending scheduledSending = null); /// /// Updates the scheduled sending rules for a template's workflow definition. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Task of ApiResponse (ScheduledSending) System.Threading.Tasks.Task> UpdateTemplateScheduledSendingDefinitionAsyncWithHttpInfo(string accountId, string templateId, ScheduledSending scheduledSending = null); /// /// Updates the workflow definition for a template. /// /// /// Updates the specified template's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Task of Workflow System.Threading.Tasks.Task UpdateTemplateWorkflowDefinitionAsync(string accountId, string templateId, Workflow workflow = null); /// /// Updates the workflow definition for a template. /// /// /// Updates the specified template's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Task of ApiResponse (Workflow) System.Threading.Tasks.Task> UpdateTemplateWorkflowDefinitionAsyncWithHttpInfo(string accountId, string templateId, Workflow workflow = null); /// /// Updates the template workflow step definition for an envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// (optional) /// Task of WorkflowStep System.Threading.Tasks.Task UpdateTemplateWorkflowStepDefinitionAsync(string accountId, string templateId, string workflowStepId, WorkflowStep workflowStep = null); /// /// Updates the template workflow step definition for an envelope. /// /// /// /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// (optional) /// Task of ApiResponse (WorkflowStep) System.Threading.Tasks.Task> UpdateTemplateWorkflowStepDefinitionAsyncWithHttpInfo(string accountId, string templateId, string workflowStepId, WorkflowStep workflowStep = null); #endregion Asynchronous Operations } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class EnvelopesApi : IEnvelopesApi { private DocuSign.eSign.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class /// using AplClient object /// /// An instance of AplClient /// public EnvelopesApi(DocuSignClient aplClient) { this.ApiClient = aplClient; ExceptionFactory = Configuration.DefaultExceptionFactory; } /// /// Gets the base path of the API client. /// /// The base path public String GetBasePath() { return this.ApiClient.GetBasePath(); } /// /// Gets or sets the ApiClient object /// /// An instance of the ApiClient public DocuSignClient ApiClient { get; set; } /// /// Provides a factory method hook for the creation of exceptions. /// public DocuSign.eSign.Client.ExceptionFactory ExceptionFactory { get { if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) { throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); } return _exceptionFactory; } set { _exceptionFactory = value; } } /// /// Adds templates to an envelope. Adds templates to the specified envelope. /// public class ApplyTemplateOptions { /// public string preserveTemplateRecipient {get; set;} } /// /// Adds templates to an envelope. Adds templates to the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// DocumentTemplateList public DocumentTemplateList ApplyTemplate(string accountId, string envelopeId, DocumentTemplateList documentTemplateList = null, EnvelopesApi.ApplyTemplateOptions options = null) { ApiResponse localVarResponse = ApplyTemplateWithHttpInfo(accountId, envelopeId, documentTemplateList, options); return localVarResponse.Data; } /// /// Adds templates to an envelope. Adds templates to the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// ApiResponse of DocumentTemplateList public ApiResponse ApplyTemplateWithHttpInfo(string accountId, string envelopeId, DocumentTemplateList documentTemplateList = null, EnvelopesApi.ApplyTemplateOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ApplyTemplate"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ApplyTemplate"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/templates"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.preserveTemplateRecipient != null) localVarQueryParams.Add("preserve_template_recipient", this.ApiClient.ParameterToString(options.preserveTemplateRecipient)); // query parameter } if (documentTemplateList != null && documentTemplateList.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentTemplateList); // http body (model) parameter } else { localVarPostBody = documentTemplateList; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ApplyTemplate", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentTemplateList)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentTemplateList))); } /// /// Adds templates to an envelope. Adds templates to the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of DocumentTemplateList public async System.Threading.Tasks.Task ApplyTemplateAsync(string accountId, string envelopeId, DocumentTemplateList documentTemplateList = null, EnvelopesApi.ApplyTemplateOptions options = null) { ApiResponse localVarResponse = await ApplyTemplateAsyncWithHttpInfo(accountId, envelopeId, documentTemplateList, options); return localVarResponse.Data; } /// /// Adds templates to an envelope. Adds templates to the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of ApiResponse (DocumentTemplateList) public async System.Threading.Tasks.Task> ApplyTemplateAsyncWithHttpInfo(string accountId, string envelopeId, DocumentTemplateList documentTemplateList = null, EnvelopesApi.ApplyTemplateOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ApplyTemplate"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ApplyTemplate"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/templates"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.preserveTemplateRecipient != null) localVarQueryParams.Add("preserve_template_recipient", this.ApiClient.ParameterToString(options.preserveTemplateRecipient)); // query parameter } if (documentTemplateList != null && documentTemplateList.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentTemplateList); // http body (model) parameter } else { localVarPostBody = documentTemplateList; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ApplyTemplate", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentTemplateList)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentTemplateList))); } /// /// Adds templates to a document in an envelope. Adds templates to a document in the specified envelope. /// public class ApplyTemplateToDocumentOptions { /// public string preserveTemplateRecipient {get; set;} } /// /// Adds templates to a document in an envelope. Adds templates to a document in the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Options for modifying the behavior of the function. /// DocumentTemplateList public DocumentTemplateList ApplyTemplateToDocument(string accountId, string envelopeId, string documentId, DocumentTemplateList documentTemplateList = null, EnvelopesApi.ApplyTemplateToDocumentOptions options = null) { ApiResponse localVarResponse = ApplyTemplateToDocumentWithHttpInfo(accountId, envelopeId, documentId, documentTemplateList, options); return localVarResponse.Data; } /// /// Adds templates to a document in an envelope. Adds templates to a document in the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Options for modifying the behavior of the function. /// ApiResponse of DocumentTemplateList public ApiResponse ApplyTemplateToDocumentWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentTemplateList documentTemplateList = null, EnvelopesApi.ApplyTemplateToDocumentOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ApplyTemplateToDocument"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ApplyTemplateToDocument"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->ApplyTemplateToDocument"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/templates"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (options != null) { if (options.preserveTemplateRecipient != null) localVarQueryParams.Add("preserve_template_recipient", this.ApiClient.ParameterToString(options.preserveTemplateRecipient)); // query parameter } if (documentTemplateList != null && documentTemplateList.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentTemplateList); // http body (model) parameter } else { localVarPostBody = documentTemplateList; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ApplyTemplateToDocument", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentTemplateList)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentTemplateList))); } /// /// Adds templates to a document in an envelope. Adds templates to a document in the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of DocumentTemplateList public async System.Threading.Tasks.Task ApplyTemplateToDocumentAsync(string accountId, string envelopeId, string documentId, DocumentTemplateList documentTemplateList = null, EnvelopesApi.ApplyTemplateToDocumentOptions options = null) { ApiResponse localVarResponse = await ApplyTemplateToDocumentAsyncWithHttpInfo(accountId, envelopeId, documentId, documentTemplateList, options); return localVarResponse.Data; } /// /// Adds templates to a document in an envelope. Adds templates to a document in the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of ApiResponse (DocumentTemplateList) public async System.Threading.Tasks.Task> ApplyTemplateToDocumentAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentTemplateList documentTemplateList = null, EnvelopesApi.ApplyTemplateToDocumentOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ApplyTemplateToDocument"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ApplyTemplateToDocument"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->ApplyTemplateToDocument"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/templates"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (options != null) { if (options.preserveTemplateRecipient != null) localVarQueryParams.Add("preserve_template_recipient", this.ApiClient.ParameterToString(options.preserveTemplateRecipient)); // query parameter } if (documentTemplateList != null && documentTemplateList.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentTemplateList); // http body (model) parameter } else { localVarPostBody = documentTemplateList; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ApplyTemplateToDocument", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentTemplateList)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentTemplateList))); } /// /// Initiate a new ChunkedUpload. This method initiates a new chunked upload with the first part of the content. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// ChunkedUploadResponse public ChunkedUploadResponse CreateChunkedUpload(string accountId, ChunkedUploadRequest chunkedUploadRequest = null) { ApiResponse localVarResponse = CreateChunkedUploadWithHttpInfo(accountId, chunkedUploadRequest); return localVarResponse.Data; } /// /// Initiate a new ChunkedUpload. This method initiates a new chunked upload with the first part of the content. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// ApiResponse of ChunkedUploadResponse public ApiResponse CreateChunkedUploadWithHttpInfo(string accountId, ChunkedUploadRequest chunkedUploadRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateChunkedUpload"); var localVarPath = "/v2.1/accounts/{accountId}/chunked_uploads"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (chunkedUploadRequest != null && chunkedUploadRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(chunkedUploadRequest); // http body (model) parameter } else { localVarPostBody = chunkedUploadRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateChunkedUpload", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ChunkedUploadResponse)this.ApiClient.Deserialize(localVarResponse, typeof(ChunkedUploadResponse))); } /// /// Initiate a new ChunkedUpload. This method initiates a new chunked upload with the first part of the content. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of ChunkedUploadResponse public async System.Threading.Tasks.Task CreateChunkedUploadAsync(string accountId, ChunkedUploadRequest chunkedUploadRequest = null) { ApiResponse localVarResponse = await CreateChunkedUploadAsyncWithHttpInfo(accountId, chunkedUploadRequest); return localVarResponse.Data; } /// /// Initiate a new ChunkedUpload. This method initiates a new chunked upload with the first part of the content. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of ApiResponse (ChunkedUploadResponse) public async System.Threading.Tasks.Task> CreateChunkedUploadAsyncWithHttpInfo(string accountId, ChunkedUploadRequest chunkedUploadRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateChunkedUpload"); var localVarPath = "/v2.1/accounts/{accountId}/chunked_uploads"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (chunkedUploadRequest != null && chunkedUploadRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(chunkedUploadRequest); // http body (model) parameter } else { localVarPostBody = chunkedUploadRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateChunkedUpload", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ChunkedUploadResponse)this.ApiClient.Deserialize(localVarResponse, typeof(ChunkedUploadResponse))); } /// /// Returns a URL to the authentication view UI. Returns a URL that allows you to embed the authentication view of the DocuSign UI in your applications. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// ViewUrl public ViewUrl CreateConsoleView(string accountId, ConsoleViewRequest consoleViewRequest = null) { ApiResponse localVarResponse = CreateConsoleViewWithHttpInfo(accountId, consoleViewRequest); return localVarResponse.Data; } /// /// Returns a URL to the authentication view UI. Returns a URL that allows you to embed the authentication view of the DocuSign UI in your applications. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// ApiResponse of ViewUrl public ApiResponse CreateConsoleViewWithHttpInfo(string accountId, ConsoleViewRequest consoleViewRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateConsoleView"); var localVarPath = "/v2.1/accounts/{accountId}/views/console"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (consoleViewRequest != null && consoleViewRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(consoleViewRequest); // http body (model) parameter } else { localVarPostBody = consoleViewRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateConsoleView", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ViewUrl)this.ApiClient.Deserialize(localVarResponse, typeof(ViewUrl))); } /// /// Returns a URL to the authentication view UI. Returns a URL that allows you to embed the authentication view of the DocuSign UI in your applications. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of ViewUrl public async System.Threading.Tasks.Task CreateConsoleViewAsync(string accountId, ConsoleViewRequest consoleViewRequest = null) { ApiResponse localVarResponse = await CreateConsoleViewAsyncWithHttpInfo(accountId, consoleViewRequest); return localVarResponse.Data; } /// /// Returns a URL to the authentication view UI. Returns a URL that allows you to embed the authentication view of the DocuSign UI in your applications. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of ApiResponse (ViewUrl) public async System.Threading.Tasks.Task> CreateConsoleViewAsyncWithHttpInfo(string accountId, ConsoleViewRequest consoleViewRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateConsoleView"); var localVarPath = "/v2.1/accounts/{accountId}/views/console"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (consoleViewRequest != null && consoleViewRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(consoleViewRequest); // http body (model) parameter } else { localVarPostBody = consoleViewRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateConsoleView", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ViewUrl)this.ApiClient.Deserialize(localVarResponse, typeof(ViewUrl))); } /// /// Returns a URL to the envelope correction UI. Returns a URL that allows you to embed the envelope correction view of the DocuSign UI in your applications. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ViewUrl public ViewUrl CreateCorrectView(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null) { ApiResponse localVarResponse = CreateCorrectViewWithHttpInfo(accountId, envelopeId, envelopeViewRequest); return localVarResponse.Data; } /// /// Returns a URL to the envelope correction UI. Returns a URL that allows you to embed the envelope correction view of the DocuSign UI in your applications. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ViewUrl public ApiResponse CreateCorrectViewWithHttpInfo(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateCorrectView"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateCorrectView"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/correct"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (envelopeViewRequest != null && envelopeViewRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeViewRequest); // http body (model) parameter } else { localVarPostBody = envelopeViewRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateCorrectView", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ViewUrl)this.ApiClient.Deserialize(localVarResponse, typeof(ViewUrl))); } /// /// Returns a URL to the envelope correction UI. Returns a URL that allows you to embed the envelope correction view of the DocuSign UI in your applications. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ViewUrl public async System.Threading.Tasks.Task CreateCorrectViewAsync(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null) { ApiResponse localVarResponse = await CreateCorrectViewAsyncWithHttpInfo(accountId, envelopeId, envelopeViewRequest); return localVarResponse.Data; } /// /// Returns a URL to the envelope correction UI. Returns a URL that allows you to embed the envelope correction view of the DocuSign UI in your applications. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (ViewUrl) public async System.Threading.Tasks.Task> CreateCorrectViewAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateCorrectView"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateCorrectView"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/correct"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (envelopeViewRequest != null && envelopeViewRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeViewRequest); // http body (model) parameter } else { localVarPostBody = envelopeViewRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateCorrectView", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ViewUrl)this.ApiClient.Deserialize(localVarResponse, typeof(ViewUrl))); } /// /// Updates envelope custom fields for an envelope. Updates the envelope custom fields for draft and in-process envelopes. Each custom field used in an envelope must have a unique name. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// CustomFields public CustomFields CreateCustomFields(string accountId, string envelopeId, CustomFields customFields = null) { ApiResponse localVarResponse = CreateCustomFieldsWithHttpInfo(accountId, envelopeId, customFields); return localVarResponse.Data; } /// /// Updates envelope custom fields for an envelope. Updates the envelope custom fields for draft and in-process envelopes. Each custom field used in an envelope must have a unique name. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of CustomFields public ApiResponse CreateCustomFieldsWithHttpInfo(string accountId, string envelopeId, CustomFields customFields = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateCustomFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateCustomFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (customFields != null && customFields.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(customFields); // http body (model) parameter } else { localVarPostBody = customFields; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateCustomFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (CustomFields)this.ApiClient.Deserialize(localVarResponse, typeof(CustomFields))); } /// /// Updates envelope custom fields for an envelope. Updates the envelope custom fields for draft and in-process envelopes. Each custom field used in an envelope must have a unique name. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of CustomFields public async System.Threading.Tasks.Task CreateCustomFieldsAsync(string accountId, string envelopeId, CustomFields customFields = null) { ApiResponse localVarResponse = await CreateCustomFieldsAsyncWithHttpInfo(accountId, envelopeId, customFields); return localVarResponse.Data; } /// /// Updates envelope custom fields for an envelope. Updates the envelope custom fields for draft and in-process envelopes. Each custom field used in an envelope must have a unique name. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (CustomFields) public async System.Threading.Tasks.Task> CreateCustomFieldsAsyncWithHttpInfo(string accountId, string envelopeId, CustomFields customFields = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateCustomFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateCustomFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (customFields != null && customFields.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(customFields); // http body (model) parameter } else { localVarPostBody = customFields; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateCustomFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (CustomFields)this.ApiClient.Deserialize(localVarResponse, typeof(CustomFields))); } /// /// Creates custom document fields in an existing envelope document. Creates custom document fields in an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// DocumentFieldsInformation public DocumentFieldsInformation CreateDocumentFields(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null) { ApiResponse localVarResponse = CreateDocumentFieldsWithHttpInfo(accountId, envelopeId, documentId, documentFieldsInformation); return localVarResponse.Data; } /// /// Creates custom document fields in an existing envelope document. Creates custom document fields in an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// ApiResponse of DocumentFieldsInformation public ApiResponse CreateDocumentFieldsWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateDocumentFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateDocumentFields"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->CreateDocumentFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (documentFieldsInformation != null && documentFieldsInformation.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentFieldsInformation); // http body (model) parameter } else { localVarPostBody = documentFieldsInformation; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateDocumentFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentFieldsInformation)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentFieldsInformation))); } /// /// Creates custom document fields in an existing envelope document. Creates custom document fields in an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of DocumentFieldsInformation public async System.Threading.Tasks.Task CreateDocumentFieldsAsync(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null) { ApiResponse localVarResponse = await CreateDocumentFieldsAsyncWithHttpInfo(accountId, envelopeId, documentId, documentFieldsInformation); return localVarResponse.Data; } /// /// Creates custom document fields in an existing envelope document. Creates custom document fields in an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of ApiResponse (DocumentFieldsInformation) public async System.Threading.Tasks.Task> CreateDocumentFieldsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateDocumentFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateDocumentFields"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->CreateDocumentFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (documentFieldsInformation != null && documentFieldsInformation.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentFieldsInformation); // http body (model) parameter } else { localVarPostBody = documentFieldsInformation; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateDocumentFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentFieldsInformation)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentFieldsInformation))); } /// /// Get Responsive HTML Preview for a document in an envelope. Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/) HTML version of a specific document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// DocumentHtmlDefinitions public DocumentHtmlDefinitions CreateDocumentResponsiveHtmlPreview(string accountId, string envelopeId, string documentId, DocumentHtmlDefinition documentHtmlDefinition = null) { ApiResponse localVarResponse = CreateDocumentResponsiveHtmlPreviewWithHttpInfo(accountId, envelopeId, documentId, documentHtmlDefinition); return localVarResponse.Data; } /// /// Get Responsive HTML Preview for a document in an envelope. Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/) HTML version of a specific document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// ApiResponse of DocumentHtmlDefinitions public ApiResponse CreateDocumentResponsiveHtmlPreviewWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentHtmlDefinition documentHtmlDefinition = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateDocumentResponsiveHtmlPreview"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateDocumentResponsiveHtmlPreview"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->CreateDocumentResponsiveHtmlPreview"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/responsive_html_preview"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (documentHtmlDefinition != null && documentHtmlDefinition.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentHtmlDefinition); // http body (model) parameter } else { localVarPostBody = documentHtmlDefinition; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateDocumentResponsiveHtmlPreview", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentHtmlDefinitions)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentHtmlDefinitions))); } /// /// Get Responsive HTML Preview for a document in an envelope. Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/) HTML version of a specific document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of DocumentHtmlDefinitions public async System.Threading.Tasks.Task CreateDocumentResponsiveHtmlPreviewAsync(string accountId, string envelopeId, string documentId, DocumentHtmlDefinition documentHtmlDefinition = null) { ApiResponse localVarResponse = await CreateDocumentResponsiveHtmlPreviewAsyncWithHttpInfo(accountId, envelopeId, documentId, documentHtmlDefinition); return localVarResponse.Data; } /// /// Get Responsive HTML Preview for a document in an envelope. Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/) HTML version of a specific document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of ApiResponse (DocumentHtmlDefinitions) public async System.Threading.Tasks.Task> CreateDocumentResponsiveHtmlPreviewAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentHtmlDefinition documentHtmlDefinition = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateDocumentResponsiveHtmlPreview"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateDocumentResponsiveHtmlPreview"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->CreateDocumentResponsiveHtmlPreview"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/responsive_html_preview"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (documentHtmlDefinition != null && documentHtmlDefinition.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentHtmlDefinition); // http body (model) parameter } else { localVarPostBody = documentHtmlDefinition; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateDocumentResponsiveHtmlPreview", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentHtmlDefinitions)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentHtmlDefinitions))); } /// /// Adds the tabs to an envelope document Adds tabs to the document specified by `documentId` in the envelope specified by `envelopeId`. In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/envelopes/envelopedocumenttabs/create/#definition__tabs_prefilltabs), your request body might look like this: ``` { \"prefillTabs\": { \"textTabs\": [ { \"value\": \"a prefill text tab\", \"pageNumber\": \"1\", \"documentId\": \"1\", \"xPosition\": 316, \"yPosition\": 97 } ] } } ``` /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Tabs public Tabs CreateDocumentTabs(string accountId, string envelopeId, string documentId, Tabs tabs = null) { ApiResponse localVarResponse = CreateDocumentTabsWithHttpInfo(accountId, envelopeId, documentId, tabs); return localVarResponse.Data; } /// /// Adds the tabs to an envelope document Adds tabs to the document specified by `documentId` in the envelope specified by `envelopeId`. In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/envelopes/envelopedocumenttabs/create/#definition__tabs_prefilltabs), your request body might look like this: ``` { \"prefillTabs\": { \"textTabs\": [ { \"value\": \"a prefill text tab\", \"pageNumber\": \"1\", \"documentId\": \"1\", \"xPosition\": 316, \"yPosition\": 97 } ] } } ``` /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// ApiResponse of Tabs public ApiResponse CreateDocumentTabsWithHttpInfo(string accountId, string envelopeId, string documentId, Tabs tabs = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateDocumentTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateDocumentTabs"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->CreateDocumentTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (tabs != null && tabs.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(tabs); // http body (model) parameter } else { localVarPostBody = tabs; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateDocumentTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Adds the tabs to an envelope document Adds tabs to the document specified by `documentId` in the envelope specified by `envelopeId`. In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/envelopes/envelopedocumenttabs/create/#definition__tabs_prefilltabs), your request body might look like this: ``` { \"prefillTabs\": { \"textTabs\": [ { \"value\": \"a prefill text tab\", \"pageNumber\": \"1\", \"documentId\": \"1\", \"xPosition\": 316, \"yPosition\": 97 } ] } } ``` /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of Tabs public async System.Threading.Tasks.Task CreateDocumentTabsAsync(string accountId, string envelopeId, string documentId, Tabs tabs = null) { ApiResponse localVarResponse = await CreateDocumentTabsAsyncWithHttpInfo(accountId, envelopeId, documentId, tabs); return localVarResponse.Data; } /// /// Adds the tabs to an envelope document Adds tabs to the document specified by `documentId` in the envelope specified by `envelopeId`. In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/envelopes/envelopedocumenttabs/create/#definition__tabs_prefilltabs), your request body might look like this: ``` { \"prefillTabs\": { \"textTabs\": [ { \"value\": \"a prefill text tab\", \"pageNumber\": \"1\", \"documentId\": \"1\", \"xPosition\": 316, \"yPosition\": 97 } ] } } ``` /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of ApiResponse (Tabs) public async System.Threading.Tasks.Task> CreateDocumentTabsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, Tabs tabs = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateDocumentTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateDocumentTabs"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->CreateDocumentTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (tabs != null && tabs.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(tabs); // http body (model) parameter } else { localVarPostBody = tabs; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateDocumentTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Returns a URL to the edit view UI. Returns a URL that allows you to embed the edit view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign editing view. Upon sending completion, the user is returned to the return URL provided by the API application. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ViewUrl public ViewUrl CreateEditView(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null) { ApiResponse localVarResponse = CreateEditViewWithHttpInfo(accountId, envelopeId, envelopeViewRequest); return localVarResponse.Data; } /// /// Returns a URL to the edit view UI. Returns a URL that allows you to embed the edit view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign editing view. Upon sending completion, the user is returned to the return URL provided by the API application. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ViewUrl public ApiResponse CreateEditViewWithHttpInfo(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateEditView"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateEditView"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/edit"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (envelopeViewRequest != null && envelopeViewRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeViewRequest); // http body (model) parameter } else { localVarPostBody = envelopeViewRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateEditView", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ViewUrl)this.ApiClient.Deserialize(localVarResponse, typeof(ViewUrl))); } /// /// Returns a URL to the edit view UI. Returns a URL that allows you to embed the edit view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign editing view. Upon sending completion, the user is returned to the return URL provided by the API application. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ViewUrl public async System.Threading.Tasks.Task CreateEditViewAsync(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null) { ApiResponse localVarResponse = await CreateEditViewAsyncWithHttpInfo(accountId, envelopeId, envelopeViewRequest); return localVarResponse.Data; } /// /// Returns a URL to the edit view UI. Returns a URL that allows you to embed the edit view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign editing view. Upon sending completion, the user is returned to the return URL provided by the API application. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (ViewUrl) public async System.Threading.Tasks.Task> CreateEditViewAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateEditView"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateEditView"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/edit"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (envelopeViewRequest != null && envelopeViewRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeViewRequest); // http body (model) parameter } else { localVarPostBody = envelopeViewRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateEditView", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ViewUrl)this.ApiClient.Deserialize(localVarResponse, typeof(ViewUrl))); } /// /// Adds email setting overrides to an envelope. Adds email override settings, changing the email address to reply to an email address, name, or the BCC for email archive information, for the envelope. Note that adding email settings will only affect email communications that occur after the addition was made. ### Important: The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, use a Carbon Copies or Certified Deliveries Recipient Type. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// EmailSettings public EmailSettings CreateEmailSettings(string accountId, string envelopeId, EmailSettings emailSettings = null) { ApiResponse localVarResponse = CreateEmailSettingsWithHttpInfo(accountId, envelopeId, emailSettings); return localVarResponse.Data; } /// /// Adds email setting overrides to an envelope. Adds email override settings, changing the email address to reply to an email address, name, or the BCC for email archive information, for the envelope. Note that adding email settings will only affect email communications that occur after the addition was made. ### Important: The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, use a Carbon Copies or Certified Deliveries Recipient Type. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of EmailSettings public ApiResponse CreateEmailSettingsWithHttpInfo(string accountId, string envelopeId, EmailSettings emailSettings = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateEmailSettings"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateEmailSettings"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/email_settings"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (emailSettings != null && emailSettings.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(emailSettings); // http body (model) parameter } else { localVarPostBody = emailSettings; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateEmailSettings", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EmailSettings)this.ApiClient.Deserialize(localVarResponse, typeof(EmailSettings))); } /// /// Adds email setting overrides to an envelope. Adds email override settings, changing the email address to reply to an email address, name, or the BCC for email archive information, for the envelope. Note that adding email settings will only affect email communications that occur after the addition was made. ### Important: The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, use a Carbon Copies or Certified Deliveries Recipient Type. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of EmailSettings public async System.Threading.Tasks.Task CreateEmailSettingsAsync(string accountId, string envelopeId, EmailSettings emailSettings = null) { ApiResponse localVarResponse = await CreateEmailSettingsAsyncWithHttpInfo(accountId, envelopeId, emailSettings); return localVarResponse.Data; } /// /// Adds email setting overrides to an envelope. Adds email override settings, changing the email address to reply to an email address, name, or the BCC for email archive information, for the envelope. Note that adding email settings will only affect email communications that occur after the addition was made. ### Important: The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, use a Carbon Copies or Certified Deliveries Recipient Type. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (EmailSettings) public async System.Threading.Tasks.Task> CreateEmailSettingsAsyncWithHttpInfo(string accountId, string envelopeId, EmailSettings emailSettings = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateEmailSettings"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateEmailSettings"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/email_settings"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (emailSettings != null && emailSettings.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(emailSettings); // http body (model) parameter } else { localVarPostBody = emailSettings; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateEmailSettings", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EmailSettings)this.ApiClient.Deserialize(localVarResponse, typeof(EmailSettings))); } /// /// Creates an envelope. Creates an envelope. Using this function you can: * Create an envelope and send it. * Create an envelope from an existing template and send it. In either case, you can choose to save the envelope as a draft envelope instead of sending it by setting the request's `status` property to `created` instead of `sent`. ## Sending Envelopes Documents can be included with the Envelopes::create call itself or a template can include documents. Documents can be added by using a multi-part/form request or by using the `documentBase64` field of the [`document` object](#/definitions/document) ### Recipient Types An [`envelopeDefinition` object](#/definitions/envelopeDefinition) is used as the method's body. Envelope recipients can be defined in the envelope or in templates. The `envelopeDefinition` object's `recipients` field is an [`EnvelopeRecipients` resource object](#/definitions/EnvelopeRecipients). It includes arrays of the seven types of recipients defined by DocuSign: Recipient type | Object definition - -- -- -- -- -- -- - | - -- -- -- -- -- -- -- -- agent (can add name and email information for later recipients/signers) | [`agent`](#/definitions/agent) carbon copy (receives a copy of the documents) | [`carbonCopy`](#/definitions/carbonCopy) certified delivery (receives a copy of the documents and must acknowledge receipt) | [`certifiedDelivery`](#/definitions/certifiedDelivery) editor (can change recipients and document fields for later recipients/signers) | [`editor`](#/definitions/editor) in-person signer (\"hosts\" someone who signs in-person) | [`inPersonSigner`](#/definitions/inPersonSigner) intermediary (can add name and email information for some later recipients/signers.) | [`intermediary`](#/definitions/intermediary) signer (signs and/or updates document fields) | [`signer`](#/definitions/signer) Additional information about the different types of recipients is available from the [`EnvelopeRecipients` resource page](../../EnvelopeRecipients) and from the [Developer Center](https://www.docusign.com/developer-center/explore/features/recipients) ### Tabs Tabs (also referred to as `tags` and as `fields` in the web sending user interface), can be defined in the `envelopeDefinition`, in templates, by transforming PDF Form Fields, or by using Composite Templates (see below). Defining tabs: the `inPersonSigner`, and `signer` recipient objects include a `tabs` field. It is an [`EnvelopeTabs` resource object](#/definitions/EnvelopeTabs). It includes arrays of the 24 different tab types available. See the [`EnvelopeTabs` resource](../../EnvelopeTabs) for more information. ## Using Templates Envelopes use specific people or groups as recipients. Templates can specify a role, eg `account_manager.` When a template is used in an envelope, the roles must be replaced with specific people or groups. When you create an envelope using a `templateId`, the different recipient type objects within the [`EnvelopeRecipients` object](#/definitions/EnvelopeRecipients) are used to assign recipients to the template's roles via the `roleName` property. The recipient objects can also override settings that were specified in the template, and set values for tab fields that were defined in the template. ### Message Lock When a template is added or applied to an envelope and the template has a locked email subject and message, that subject and message are used for the envelope and cannot be changed even if another locked template is subsequently added or applied to the envelope. The field `messageLock` is used to lock the email subject and message. If an email subject or message is entered before adding or applying a template with `messageLock` **true**, the email subject and message is overwritten with the locked email subject and message from the template. ## Envelope Status The status of sent envelopes can be determined through the DocuSign webhook system or by polling. Webhooks are highly recommended: they provide your application with the quickest updates when an envelope's status changes. DocuSign limits polling to once every 15 minutes or less frequently. When a webhook is used, DocuSign calls your application, via the URL you provide, with a notification XML message. See the [Webhook recipe](https://www.docusign.com/developer-center/recipes/webhook-status) for examples and live demos of using webhooks. ## Webhook Options The two webhook options, *eventNotification* and *Connect* use the same notification mechanism and message formats. eventNotification is used to create a webhook for a specific envelope sent via the API. Connect webhooks can be used for any envelope sent from an account, from any user, from any client. ### eventNotification Webhooks The Envelopes::create method includes an optional [eventNotification object](#definition-eventNotification) that adds a webhook to the envelope. eventNotification webhooks are available for all DocuSign accounts with API access. ### Connect Webhooks Connect can be used to create a webhook for all envelopes sent by all users in an account, either through the API or via other DocuSign clients (web, mobile, etc). Connect configurations are independent of specific envelopes. A Connect configuration includes a filter that may be used to limit the webhook to specific users, envelope statuses, etc. Connect configurations may be created and managed using the [ConnectConfigurations resource](../../Connect/ConnectConfigurations). Configurations can also be created and managed from the Administration tool accessed by selecting \"Go to Admin\" from the menu next to your picture on the DocuSign web app. See the Integrations/Connect section of the Admin tool. For repeatability, and to minimize support questions, creating Connect configurations via the API is recommended, especially for ISVs. Connect is available for some DocuSign account types. Please contact DocuSign Sales for more information. ## Composite Templates The Composite Templates feature, like [compositing in film production](https://en.wikipedia.org/wiki/Compositing), enables you to *overlay* document, recipient, and tab definitions from multiple sources, including PDF Form Field definitions, templates defined on the server, and more. Each Composite Template consists of optional elements: server templates, inline templates, PDF Metadata templates, and documents. * The Composite Template ID is an optional element used to identify the composite template. It is used as a reference when adding document object information via a multi-part HTTP message. If used, the document content-disposition must include the `compositeTemplateId` to which the document should be added. If `compositeTemplateId` is not specified in the content-disposition, the document is applied based on the `documentId` only. If no document object is specified, the composite template inherits the first document. * Server Templates are server-side templates stored on the DocuSign platform. If supplied, they are overlaid into the envelope in the order of their Sequence value. * Inline Templates provide a container to add documents, recipients, tabs, and custom fields. If inline templates are supplied, they are overlaid into the envelope in the order of their Sequence value. * Document objects are optional structures that provide a container to pass in a document or form. If this object is not included, the composite template inherits the *first* document it finds from a server template or inline template, starting with the lowest sequence value. PDF Form objects are only transformed from the document object. DocuSign does not derive PDF form properties from server templates or inline templates. To instruct DocuSign to transform fields from the PDF form, set `transformPdfFields` to \"true\" for the document. See the Transform PDF Fields section for more information about process. * PDF Metadata Templates provide a container to embed design-time template information into a PDF document. DocuSign uses this information when processing the Envelope. This convention allows the document to carry the signing instructions with it, so that less information needs to be provided at run-time through an inline template or synchronized with an external structure like a server template. PDF Metadata templates are stored in the Metadata layer of a PDF in accordance with Acrobat's XMP specification. DocuSign will only find PDF Metadata templates inside documents passed in the Document object (see below). If supplied, the PDF metadata template will be overlaid into the envelope in the order of its Sequence value. ### Compositing the definitions Each Composite Template adds a new document and templates overlay into the envelope. For each Composite Template these rules are applied: * Templates are overlaid in the order of their Sequence value. * If Document is not passed into the Composite Template's `document` field, the *first* template's document (based on the template's Sequence value) is used. * Last in wins in all cases except for the document (i.e. envelope information, recipient information, secure field information). There is no special casing. For example, if you want higher security on a tab, then that needs to be specified in a later template (by sequence number) then where the tab is included. If you want higher security on a role recipient, then it needs to be in a later template then where that role recipient is specified. * Recipient matching is based on Recipient Role and Routing Order. If there are matches, the recipient information is merged together. A final pass is done on all Composite Templates, after all template overlays have been applied, to collapse recipients with the same email, username and routing order. This prevents having the same recipients at the same routing order. * If you specify in a template that a recipient is locked, once that recipient is overlaid the recipient attributes can no longer be changed. The only items that can be changed for the recipient in this case are the email, username, access code and IDCheckInformationInput. * Tab matching is based on Tab Labels, Tab Types and Documents. If a Tab Label matches but the Document is not supplied, the Tab is overlaid for all the Documents. For example, if you have a simple inline template with only one tab in it with a label and a value, the Signature, Initial, Company, Envelope ID, User Name tabs will only be matched and collapsed if they fall in the exact same X and Y locations. * roleName and tabLabel matching is case sensitive. * The defaultRecipient field enables you to specify which recipient the generated tabs from a PDF form are mapped to. You can also set PDF form generated tabs to a recipient other than the DefaultRecipient by specifying the mapping of the tab label that is created to one of the template recipients. * You can use tabLabel wild carding to map a series of tabs from the PDF form. To use this you must end a tab label with \"\\*\" and then the system matches tabs that start with the label. * If no DefaultRecipient is specified, tabs must be explicitly mapped to recipients in order to be generated from the form. Unmapped form objects will not be generated into their DocuSign equivalents. (In the case of Signature/Initials, the tabs will be disregarded entirely; in the case of pdf text fields, the field data will be flattened on the Envelope document, but there will not be a corresponding DocuSign data tab.) ### Including the Document Content for Composite Templates Document content can be supplied inline, using the `documentBase64` or can be included in a multi-part HTTP message. If a multi-part message is used and there are multiple Composite Templates, the document content-disposition can include the `compositeTemplateId` to which the document should be added. Using the `compositeTemplateId` sets which documents are associated with particular composite templates. An example of this usage is: ``` - -5cd3320a-5aac-4453-b3a4-cbb52a4cba5d Content-Type: application/pdf Content-Disposition: file; filename=\"eula.pdf\"; documentId=1; compositeTemplateId=\"1\" Content-Transfer-Encoding: base64 ``` ### PDF Form Field Transformation Only the following PDF Form FieldTypes will be transformed to DocuSign tabs: CheckBox, DateTime, ListBox, Numeric, Password, Radio, Signature, and Text Field Properties that will be transformed: Read Only, Required, Max Length, Positions, and Initial Data. When transforming a *PDF Form Digital Signature Field,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials Any other PDF Form Digital Signature Field will be transformed to a DocuSign Signature tab When transforming *PDF Form Text Fields,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials DocuSignEnvelopeID or eSignEnvelopeID | EnvelopeID DocuSignCompany or eSignCompany | Company DocuSignDateSigned or eSignDateSigned | Date Signed DocuSignTitle or eSignTitle | Title DocuSignFullName or eSignFullName | Full Name DocuSignSignerAttachmentOptional or eSignSignerAttachmentOptional | Optional Signer Attachment Any other PDF Form Text Field will be transformed to a DocuSign data (text) tab. PDF Form Field Names that include \"DocuSignIgnoreTransform\" or \"eSignIgnoreTransform\" will not be transformed. PDF Form Date fields will be transformed to Date Signed fields if their name includes DocuSignDateSigned or eSignDateSigned. ## Template Email Subject Merge Fields This feature enables you to insert recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's `roleName`, are added to the `emailSubject` when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. * To add a recipient's name in the subject line add the following text in the `emailSubject` when creating the template or when sending an envelope from a template: [[<roleName>_UserName]] Example: `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",` * To add a recipient's email address in the subject line add the following text in the emailSubject when creating the template or when sending an envelope from a template: [[<roleName>_Email]] Example: `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",` In both cases the <roleName> is the recipient's `roleName` in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject. ## Branding an envelope The following rules are used to determine the `brandId` used in an envelope: * If a `brandId` is specified in the envelope/template and that brandId is available to the account, that brand is used in the envelope. * If more than one template is used in an envelope and more than one `brandId` is specified, the first `brandId` specified is used throughout the envelope. * In cases where no brand is specified and the sender belongs to a Group; if there is only one brand associated with the Group, then that brand is used in the envelope. Otherwise, the account's default signing brand is used. * For envelopes that do not meet any of the previous criteria, the account's default signing brand is used for the envelope. ## BCC Email address feature The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, don't use the BCC Email field. Use a Carbon Copy or Certified Delivery Recipient type. ## Merge Recipient Roles for Draft Envelopes When an envelope with multiple templates is sent, the recipients from the templates are merged according to the template roles, and empty recipients are removed. When creating an envelope with multiple templates, but not sending it (keeping it in a created state), duplicate recipients are not merged, which could cause leave duplicate recipients in the envelope. To prevent this, the query parameter `merge_roles_on_draft` should be added when posting a draft envelope (status=created) with multiple templates. Doing this will merge template roles and remove empty recipients. ###### Note: DocuSign recommends that the `merge_roles_on_draft` query parameter be used anytime you are creating an envelope with multiple templates and keeping it in draft (created) status. /// public class CreateEnvelopeOptions { /// public string cdseMode {get; set;} /// public string changeRoutingOrder {get; set;} /// If set to true then we want to set the sourceEnvelopeId to indicate that this is a\"forward\" envelope action public string completedDocumentsOnly {get; set;} /// When set to **true**, merges template roles and remove empty recipients when you create an envelope with multiple templates. public string mergeRolesOnDraft {get; set;} /// public string tabLabelExactMatches {get; set;} } /// /// Creates an envelope. Creates an envelope. Using this function you can: * Create an envelope and send it. * Create an envelope from an existing template and send it. In either case, you can choose to save the envelope as a draft envelope instead of sending it by setting the request's `status` property to `created` instead of `sent`. ## Sending Envelopes Documents can be included with the Envelopes::create call itself or a template can include documents. Documents can be added by using a multi-part/form request or by using the `documentBase64` field of the [`document` object](#/definitions/document) ### Recipient Types An [`envelopeDefinition` object](#/definitions/envelopeDefinition) is used as the method's body. Envelope recipients can be defined in the envelope or in templates. The `envelopeDefinition` object's `recipients` field is an [`EnvelopeRecipients` resource object](#/definitions/EnvelopeRecipients). It includes arrays of the seven types of recipients defined by DocuSign: Recipient type | Object definition - -- -- -- -- -- -- - | - -- -- -- -- -- -- -- -- agent (can add name and email information for later recipients/signers) | [`agent`](#/definitions/agent) carbon copy (receives a copy of the documents) | [`carbonCopy`](#/definitions/carbonCopy) certified delivery (receives a copy of the documents and must acknowledge receipt) | [`certifiedDelivery`](#/definitions/certifiedDelivery) editor (can change recipients and document fields for later recipients/signers) | [`editor`](#/definitions/editor) in-person signer (\"hosts\" someone who signs in-person) | [`inPersonSigner`](#/definitions/inPersonSigner) intermediary (can add name and email information for some later recipients/signers.) | [`intermediary`](#/definitions/intermediary) signer (signs and/or updates document fields) | [`signer`](#/definitions/signer) Additional information about the different types of recipients is available from the [`EnvelopeRecipients` resource page](../../EnvelopeRecipients) and from the [Developer Center](https://www.docusign.com/developer-center/explore/features/recipients) ### Tabs Tabs (also referred to as `tags` and as `fields` in the web sending user interface), can be defined in the `envelopeDefinition`, in templates, by transforming PDF Form Fields, or by using Composite Templates (see below). Defining tabs: the `inPersonSigner`, and `signer` recipient objects include a `tabs` field. It is an [`EnvelopeTabs` resource object](#/definitions/EnvelopeTabs). It includes arrays of the 24 different tab types available. See the [`EnvelopeTabs` resource](../../EnvelopeTabs) for more information. ## Using Templates Envelopes use specific people or groups as recipients. Templates can specify a role, eg `account_manager.` When a template is used in an envelope, the roles must be replaced with specific people or groups. When you create an envelope using a `templateId`, the different recipient type objects within the [`EnvelopeRecipients` object](#/definitions/EnvelopeRecipients) are used to assign recipients to the template's roles via the `roleName` property. The recipient objects can also override settings that were specified in the template, and set values for tab fields that were defined in the template. ### Message Lock When a template is added or applied to an envelope and the template has a locked email subject and message, that subject and message are used for the envelope and cannot be changed even if another locked template is subsequently added or applied to the envelope. The field `messageLock` is used to lock the email subject and message. If an email subject or message is entered before adding or applying a template with `messageLock` **true**, the email subject and message is overwritten with the locked email subject and message from the template. ## Envelope Status The status of sent envelopes can be determined through the DocuSign webhook system or by polling. Webhooks are highly recommended: they provide your application with the quickest updates when an envelope's status changes. DocuSign limits polling to once every 15 minutes or less frequently. When a webhook is used, DocuSign calls your application, via the URL you provide, with a notification XML message. See the [Webhook recipe](https://www.docusign.com/developer-center/recipes/webhook-status) for examples and live demos of using webhooks. ## Webhook Options The two webhook options, *eventNotification* and *Connect* use the same notification mechanism and message formats. eventNotification is used to create a webhook for a specific envelope sent via the API. Connect webhooks can be used for any envelope sent from an account, from any user, from any client. ### eventNotification Webhooks The Envelopes::create method includes an optional [eventNotification object](#definition-eventNotification) that adds a webhook to the envelope. eventNotification webhooks are available for all DocuSign accounts with API access. ### Connect Webhooks Connect can be used to create a webhook for all envelopes sent by all users in an account, either through the API or via other DocuSign clients (web, mobile, etc). Connect configurations are independent of specific envelopes. A Connect configuration includes a filter that may be used to limit the webhook to specific users, envelope statuses, etc. Connect configurations may be created and managed using the [ConnectConfigurations resource](../../Connect/ConnectConfigurations). Configurations can also be created and managed from the Administration tool accessed by selecting \"Go to Admin\" from the menu next to your picture on the DocuSign web app. See the Integrations/Connect section of the Admin tool. For repeatability, and to minimize support questions, creating Connect configurations via the API is recommended, especially for ISVs. Connect is available for some DocuSign account types. Please contact DocuSign Sales for more information. ## Composite Templates The Composite Templates feature, like [compositing in film production](https://en.wikipedia.org/wiki/Compositing), enables you to *overlay* document, recipient, and tab definitions from multiple sources, including PDF Form Field definitions, templates defined on the server, and more. Each Composite Template consists of optional elements: server templates, inline templates, PDF Metadata templates, and documents. * The Composite Template ID is an optional element used to identify the composite template. It is used as a reference when adding document object information via a multi-part HTTP message. If used, the document content-disposition must include the `compositeTemplateId` to which the document should be added. If `compositeTemplateId` is not specified in the content-disposition, the document is applied based on the `documentId` only. If no document object is specified, the composite template inherits the first document. * Server Templates are server-side templates stored on the DocuSign platform. If supplied, they are overlaid into the envelope in the order of their Sequence value. * Inline Templates provide a container to add documents, recipients, tabs, and custom fields. If inline templates are supplied, they are overlaid into the envelope in the order of their Sequence value. * Document objects are optional structures that provide a container to pass in a document or form. If this object is not included, the composite template inherits the *first* document it finds from a server template or inline template, starting with the lowest sequence value. PDF Form objects are only transformed from the document object. DocuSign does not derive PDF form properties from server templates or inline templates. To instruct DocuSign to transform fields from the PDF form, set `transformPdfFields` to \"true\" for the document. See the Transform PDF Fields section for more information about process. * PDF Metadata Templates provide a container to embed design-time template information into a PDF document. DocuSign uses this information when processing the Envelope. This convention allows the document to carry the signing instructions with it, so that less information needs to be provided at run-time through an inline template or synchronized with an external structure like a server template. PDF Metadata templates are stored in the Metadata layer of a PDF in accordance with Acrobat's XMP specification. DocuSign will only find PDF Metadata templates inside documents passed in the Document object (see below). If supplied, the PDF metadata template will be overlaid into the envelope in the order of its Sequence value. ### Compositing the definitions Each Composite Template adds a new document and templates overlay into the envelope. For each Composite Template these rules are applied: * Templates are overlaid in the order of their Sequence value. * If Document is not passed into the Composite Template's `document` field, the *first* template's document (based on the template's Sequence value) is used. * Last in wins in all cases except for the document (i.e. envelope information, recipient information, secure field information). There is no special casing. For example, if you want higher security on a tab, then that needs to be specified in a later template (by sequence number) then where the tab is included. If you want higher security on a role recipient, then it needs to be in a later template then where that role recipient is specified. * Recipient matching is based on Recipient Role and Routing Order. If there are matches, the recipient information is merged together. A final pass is done on all Composite Templates, after all template overlays have been applied, to collapse recipients with the same email, username and routing order. This prevents having the same recipients at the same routing order. * If you specify in a template that a recipient is locked, once that recipient is overlaid the recipient attributes can no longer be changed. The only items that can be changed for the recipient in this case are the email, username, access code and IDCheckInformationInput. * Tab matching is based on Tab Labels, Tab Types and Documents. If a Tab Label matches but the Document is not supplied, the Tab is overlaid for all the Documents. For example, if you have a simple inline template with only one tab in it with a label and a value, the Signature, Initial, Company, Envelope ID, User Name tabs will only be matched and collapsed if they fall in the exact same X and Y locations. * roleName and tabLabel matching is case sensitive. * The defaultRecipient field enables you to specify which recipient the generated tabs from a PDF form are mapped to. You can also set PDF form generated tabs to a recipient other than the DefaultRecipient by specifying the mapping of the tab label that is created to one of the template recipients. * You can use tabLabel wild carding to map a series of tabs from the PDF form. To use this you must end a tab label with \"\\*\" and then the system matches tabs that start with the label. * If no DefaultRecipient is specified, tabs must be explicitly mapped to recipients in order to be generated from the form. Unmapped form objects will not be generated into their DocuSign equivalents. (In the case of Signature/Initials, the tabs will be disregarded entirely; in the case of pdf text fields, the field data will be flattened on the Envelope document, but there will not be a corresponding DocuSign data tab.) ### Including the Document Content for Composite Templates Document content can be supplied inline, using the `documentBase64` or can be included in a multi-part HTTP message. If a multi-part message is used and there are multiple Composite Templates, the document content-disposition can include the `compositeTemplateId` to which the document should be added. Using the `compositeTemplateId` sets which documents are associated with particular composite templates. An example of this usage is: ``` - -5cd3320a-5aac-4453-b3a4-cbb52a4cba5d Content-Type: application/pdf Content-Disposition: file; filename=\"eula.pdf\"; documentId=1; compositeTemplateId=\"1\" Content-Transfer-Encoding: base64 ``` ### PDF Form Field Transformation Only the following PDF Form FieldTypes will be transformed to DocuSign tabs: CheckBox, DateTime, ListBox, Numeric, Password, Radio, Signature, and Text Field Properties that will be transformed: Read Only, Required, Max Length, Positions, and Initial Data. When transforming a *PDF Form Digital Signature Field,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials Any other PDF Form Digital Signature Field will be transformed to a DocuSign Signature tab When transforming *PDF Form Text Fields,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials DocuSignEnvelopeID or eSignEnvelopeID | EnvelopeID DocuSignCompany or eSignCompany | Company DocuSignDateSigned or eSignDateSigned | Date Signed DocuSignTitle or eSignTitle | Title DocuSignFullName or eSignFullName | Full Name DocuSignSignerAttachmentOptional or eSignSignerAttachmentOptional | Optional Signer Attachment Any other PDF Form Text Field will be transformed to a DocuSign data (text) tab. PDF Form Field Names that include \"DocuSignIgnoreTransform\" or \"eSignIgnoreTransform\" will not be transformed. PDF Form Date fields will be transformed to Date Signed fields if their name includes DocuSignDateSigned or eSignDateSigned. ## Template Email Subject Merge Fields This feature enables you to insert recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's `roleName`, are added to the `emailSubject` when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. * To add a recipient's name in the subject line add the following text in the `emailSubject` when creating the template or when sending an envelope from a template: [[<roleName>_UserName]] Example: `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",` * To add a recipient's email address in the subject line add the following text in the emailSubject when creating the template or when sending an envelope from a template: [[<roleName>_Email]] Example: `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",` In both cases the <roleName> is the recipient's `roleName` in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject. ## Branding an envelope The following rules are used to determine the `brandId` used in an envelope: * If a `brandId` is specified in the envelope/template and that brandId is available to the account, that brand is used in the envelope. * If more than one template is used in an envelope and more than one `brandId` is specified, the first `brandId` specified is used throughout the envelope. * In cases where no brand is specified and the sender belongs to a Group; if there is only one brand associated with the Group, then that brand is used in the envelope. Otherwise, the account's default signing brand is used. * For envelopes that do not meet any of the previous criteria, the account's default signing brand is used for the envelope. ## BCC Email address feature The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, don't use the BCC Email field. Use a Carbon Copy or Certified Delivery Recipient type. ## Merge Recipient Roles for Draft Envelopes When an envelope with multiple templates is sent, the recipients from the templates are merged according to the template roles, and empty recipients are removed. When creating an envelope with multiple templates, but not sending it (keeping it in a created state), duplicate recipients are not merged, which could cause leave duplicate recipients in the envelope. To prevent this, the query parameter `merge_roles_on_draft` should be added when posting a draft envelope (status=created) with multiple templates. Doing this will merge template roles and remove empty recipients. ###### Note: DocuSign recommends that the `merge_roles_on_draft` query parameter be used anytime you are creating an envelope with multiple templates and keeping it in draft (created) status. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Options for modifying the behavior of the function. /// EnvelopeSummary public EnvelopeSummary CreateEnvelope(string accountId, EnvelopeDefinition envelopeDefinition = null, EnvelopesApi.CreateEnvelopeOptions options = null) { ApiResponse localVarResponse = CreateEnvelopeWithHttpInfo(accountId, envelopeDefinition, options); return localVarResponse.Data; } /// /// Creates an envelope. Creates an envelope. Using this function you can: * Create an envelope and send it. * Create an envelope from an existing template and send it. In either case, you can choose to save the envelope as a draft envelope instead of sending it by setting the request's `status` property to `created` instead of `sent`. ## Sending Envelopes Documents can be included with the Envelopes::create call itself or a template can include documents. Documents can be added by using a multi-part/form request or by using the `documentBase64` field of the [`document` object](#/definitions/document) ### Recipient Types An [`envelopeDefinition` object](#/definitions/envelopeDefinition) is used as the method's body. Envelope recipients can be defined in the envelope or in templates. The `envelopeDefinition` object's `recipients` field is an [`EnvelopeRecipients` resource object](#/definitions/EnvelopeRecipients). It includes arrays of the seven types of recipients defined by DocuSign: Recipient type | Object definition - -- -- -- -- -- -- - | - -- -- -- -- -- -- -- -- agent (can add name and email information for later recipients/signers) | [`agent`](#/definitions/agent) carbon copy (receives a copy of the documents) | [`carbonCopy`](#/definitions/carbonCopy) certified delivery (receives a copy of the documents and must acknowledge receipt) | [`certifiedDelivery`](#/definitions/certifiedDelivery) editor (can change recipients and document fields for later recipients/signers) | [`editor`](#/definitions/editor) in-person signer (\"hosts\" someone who signs in-person) | [`inPersonSigner`](#/definitions/inPersonSigner) intermediary (can add name and email information for some later recipients/signers.) | [`intermediary`](#/definitions/intermediary) signer (signs and/or updates document fields) | [`signer`](#/definitions/signer) Additional information about the different types of recipients is available from the [`EnvelopeRecipients` resource page](../../EnvelopeRecipients) and from the [Developer Center](https://www.docusign.com/developer-center/explore/features/recipients) ### Tabs Tabs (also referred to as `tags` and as `fields` in the web sending user interface), can be defined in the `envelopeDefinition`, in templates, by transforming PDF Form Fields, or by using Composite Templates (see below). Defining tabs: the `inPersonSigner`, and `signer` recipient objects include a `tabs` field. It is an [`EnvelopeTabs` resource object](#/definitions/EnvelopeTabs). It includes arrays of the 24 different tab types available. See the [`EnvelopeTabs` resource](../../EnvelopeTabs) for more information. ## Using Templates Envelopes use specific people or groups as recipients. Templates can specify a role, eg `account_manager.` When a template is used in an envelope, the roles must be replaced with specific people or groups. When you create an envelope using a `templateId`, the different recipient type objects within the [`EnvelopeRecipients` object](#/definitions/EnvelopeRecipients) are used to assign recipients to the template's roles via the `roleName` property. The recipient objects can also override settings that were specified in the template, and set values for tab fields that were defined in the template. ### Message Lock When a template is added or applied to an envelope and the template has a locked email subject and message, that subject and message are used for the envelope and cannot be changed even if another locked template is subsequently added or applied to the envelope. The field `messageLock` is used to lock the email subject and message. If an email subject or message is entered before adding or applying a template with `messageLock` **true**, the email subject and message is overwritten with the locked email subject and message from the template. ## Envelope Status The status of sent envelopes can be determined through the DocuSign webhook system or by polling. Webhooks are highly recommended: they provide your application with the quickest updates when an envelope's status changes. DocuSign limits polling to once every 15 minutes or less frequently. When a webhook is used, DocuSign calls your application, via the URL you provide, with a notification XML message. See the [Webhook recipe](https://www.docusign.com/developer-center/recipes/webhook-status) for examples and live demos of using webhooks. ## Webhook Options The two webhook options, *eventNotification* and *Connect* use the same notification mechanism and message formats. eventNotification is used to create a webhook for a specific envelope sent via the API. Connect webhooks can be used for any envelope sent from an account, from any user, from any client. ### eventNotification Webhooks The Envelopes::create method includes an optional [eventNotification object](#definition-eventNotification) that adds a webhook to the envelope. eventNotification webhooks are available for all DocuSign accounts with API access. ### Connect Webhooks Connect can be used to create a webhook for all envelopes sent by all users in an account, either through the API or via other DocuSign clients (web, mobile, etc). Connect configurations are independent of specific envelopes. A Connect configuration includes a filter that may be used to limit the webhook to specific users, envelope statuses, etc. Connect configurations may be created and managed using the [ConnectConfigurations resource](../../Connect/ConnectConfigurations). Configurations can also be created and managed from the Administration tool accessed by selecting \"Go to Admin\" from the menu next to your picture on the DocuSign web app. See the Integrations/Connect section of the Admin tool. For repeatability, and to minimize support questions, creating Connect configurations via the API is recommended, especially for ISVs. Connect is available for some DocuSign account types. Please contact DocuSign Sales for more information. ## Composite Templates The Composite Templates feature, like [compositing in film production](https://en.wikipedia.org/wiki/Compositing), enables you to *overlay* document, recipient, and tab definitions from multiple sources, including PDF Form Field definitions, templates defined on the server, and more. Each Composite Template consists of optional elements: server templates, inline templates, PDF Metadata templates, and documents. * The Composite Template ID is an optional element used to identify the composite template. It is used as a reference when adding document object information via a multi-part HTTP message. If used, the document content-disposition must include the `compositeTemplateId` to which the document should be added. If `compositeTemplateId` is not specified in the content-disposition, the document is applied based on the `documentId` only. If no document object is specified, the composite template inherits the first document. * Server Templates are server-side templates stored on the DocuSign platform. If supplied, they are overlaid into the envelope in the order of their Sequence value. * Inline Templates provide a container to add documents, recipients, tabs, and custom fields. If inline templates are supplied, they are overlaid into the envelope in the order of their Sequence value. * Document objects are optional structures that provide a container to pass in a document or form. If this object is not included, the composite template inherits the *first* document it finds from a server template or inline template, starting with the lowest sequence value. PDF Form objects are only transformed from the document object. DocuSign does not derive PDF form properties from server templates or inline templates. To instruct DocuSign to transform fields from the PDF form, set `transformPdfFields` to \"true\" for the document. See the Transform PDF Fields section for more information about process. * PDF Metadata Templates provide a container to embed design-time template information into a PDF document. DocuSign uses this information when processing the Envelope. This convention allows the document to carry the signing instructions with it, so that less information needs to be provided at run-time through an inline template or synchronized with an external structure like a server template. PDF Metadata templates are stored in the Metadata layer of a PDF in accordance with Acrobat's XMP specification. DocuSign will only find PDF Metadata templates inside documents passed in the Document object (see below). If supplied, the PDF metadata template will be overlaid into the envelope in the order of its Sequence value. ### Compositing the definitions Each Composite Template adds a new document and templates overlay into the envelope. For each Composite Template these rules are applied: * Templates are overlaid in the order of their Sequence value. * If Document is not passed into the Composite Template's `document` field, the *first* template's document (based on the template's Sequence value) is used. * Last in wins in all cases except for the document (i.e. envelope information, recipient information, secure field information). There is no special casing. For example, if you want higher security on a tab, then that needs to be specified in a later template (by sequence number) then where the tab is included. If you want higher security on a role recipient, then it needs to be in a later template then where that role recipient is specified. * Recipient matching is based on Recipient Role and Routing Order. If there are matches, the recipient information is merged together. A final pass is done on all Composite Templates, after all template overlays have been applied, to collapse recipients with the same email, username and routing order. This prevents having the same recipients at the same routing order. * If you specify in a template that a recipient is locked, once that recipient is overlaid the recipient attributes can no longer be changed. The only items that can be changed for the recipient in this case are the email, username, access code and IDCheckInformationInput. * Tab matching is based on Tab Labels, Tab Types and Documents. If a Tab Label matches but the Document is not supplied, the Tab is overlaid for all the Documents. For example, if you have a simple inline template with only one tab in it with a label and a value, the Signature, Initial, Company, Envelope ID, User Name tabs will only be matched and collapsed if they fall in the exact same X and Y locations. * roleName and tabLabel matching is case sensitive. * The defaultRecipient field enables you to specify which recipient the generated tabs from a PDF form are mapped to. You can also set PDF form generated tabs to a recipient other than the DefaultRecipient by specifying the mapping of the tab label that is created to one of the template recipients. * You can use tabLabel wild carding to map a series of tabs from the PDF form. To use this you must end a tab label with \"\\*\" and then the system matches tabs that start with the label. * If no DefaultRecipient is specified, tabs must be explicitly mapped to recipients in order to be generated from the form. Unmapped form objects will not be generated into their DocuSign equivalents. (In the case of Signature/Initials, the tabs will be disregarded entirely; in the case of pdf text fields, the field data will be flattened on the Envelope document, but there will not be a corresponding DocuSign data tab.) ### Including the Document Content for Composite Templates Document content can be supplied inline, using the `documentBase64` or can be included in a multi-part HTTP message. If a multi-part message is used and there are multiple Composite Templates, the document content-disposition can include the `compositeTemplateId` to which the document should be added. Using the `compositeTemplateId` sets which documents are associated with particular composite templates. An example of this usage is: ``` - -5cd3320a-5aac-4453-b3a4-cbb52a4cba5d Content-Type: application/pdf Content-Disposition: file; filename=\"eula.pdf\"; documentId=1; compositeTemplateId=\"1\" Content-Transfer-Encoding: base64 ``` ### PDF Form Field Transformation Only the following PDF Form FieldTypes will be transformed to DocuSign tabs: CheckBox, DateTime, ListBox, Numeric, Password, Radio, Signature, and Text Field Properties that will be transformed: Read Only, Required, Max Length, Positions, and Initial Data. When transforming a *PDF Form Digital Signature Field,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials Any other PDF Form Digital Signature Field will be transformed to a DocuSign Signature tab When transforming *PDF Form Text Fields,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials DocuSignEnvelopeID or eSignEnvelopeID | EnvelopeID DocuSignCompany or eSignCompany | Company DocuSignDateSigned or eSignDateSigned | Date Signed DocuSignTitle or eSignTitle | Title DocuSignFullName or eSignFullName | Full Name DocuSignSignerAttachmentOptional or eSignSignerAttachmentOptional | Optional Signer Attachment Any other PDF Form Text Field will be transformed to a DocuSign data (text) tab. PDF Form Field Names that include \"DocuSignIgnoreTransform\" or \"eSignIgnoreTransform\" will not be transformed. PDF Form Date fields will be transformed to Date Signed fields if their name includes DocuSignDateSigned or eSignDateSigned. ## Template Email Subject Merge Fields This feature enables you to insert recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's `roleName`, are added to the `emailSubject` when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. * To add a recipient's name in the subject line add the following text in the `emailSubject` when creating the template or when sending an envelope from a template: [[<roleName>_UserName]] Example: `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",` * To add a recipient's email address in the subject line add the following text in the emailSubject when creating the template or when sending an envelope from a template: [[<roleName>_Email]] Example: `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",` In both cases the <roleName> is the recipient's `roleName` in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject. ## Branding an envelope The following rules are used to determine the `brandId` used in an envelope: * If a `brandId` is specified in the envelope/template and that brandId is available to the account, that brand is used in the envelope. * If more than one template is used in an envelope and more than one `brandId` is specified, the first `brandId` specified is used throughout the envelope. * In cases where no brand is specified and the sender belongs to a Group; if there is only one brand associated with the Group, then that brand is used in the envelope. Otherwise, the account's default signing brand is used. * For envelopes that do not meet any of the previous criteria, the account's default signing brand is used for the envelope. ## BCC Email address feature The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, don't use the BCC Email field. Use a Carbon Copy or Certified Delivery Recipient type. ## Merge Recipient Roles for Draft Envelopes When an envelope with multiple templates is sent, the recipients from the templates are merged according to the template roles, and empty recipients are removed. When creating an envelope with multiple templates, but not sending it (keeping it in a created state), duplicate recipients are not merged, which could cause leave duplicate recipients in the envelope. To prevent this, the query parameter `merge_roles_on_draft` should be added when posting a draft envelope (status=created) with multiple templates. Doing this will merge template roles and remove empty recipients. ###### Note: DocuSign recommends that the `merge_roles_on_draft` query parameter be used anytime you are creating an envelope with multiple templates and keeping it in draft (created) status. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Options for modifying the behavior of the function. /// ApiResponse of EnvelopeSummary public ApiResponse CreateEnvelopeWithHttpInfo(string accountId, EnvelopeDefinition envelopeDefinition = null, EnvelopesApi.CreateEnvelopeOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateEnvelope"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (options != null) { if (options.cdseMode != null) localVarQueryParams.Add("cdse_mode", this.ApiClient.ParameterToString(options.cdseMode)); // query parameter if (options.changeRoutingOrder != null) localVarQueryParams.Add("change_routing_order", this.ApiClient.ParameterToString(options.changeRoutingOrder)); // query parameter if (options.completedDocumentsOnly != null) localVarQueryParams.Add("completed_documents_only", this.ApiClient.ParameterToString(options.completedDocumentsOnly)); // query parameter if (options.mergeRolesOnDraft != null) localVarQueryParams.Add("merge_roles_on_draft", this.ApiClient.ParameterToString(options.mergeRolesOnDraft)); // query parameter if (options.tabLabelExactMatches != null) localVarQueryParams.Add("tab_label_exact_matches", this.ApiClient.ParameterToString(options.tabLabelExactMatches)); // query parameter } if (envelopeDefinition != null && envelopeDefinition.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeDefinition); // http body (model) parameter } else { localVarPostBody = envelopeDefinition; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateEnvelope", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeSummary)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeSummary))); } /// /// Creates an envelope. Creates an envelope. Using this function you can: * Create an envelope and send it. * Create an envelope from an existing template and send it. In either case, you can choose to save the envelope as a draft envelope instead of sending it by setting the request's `status` property to `created` instead of `sent`. ## Sending Envelopes Documents can be included with the Envelopes::create call itself or a template can include documents. Documents can be added by using a multi-part/form request or by using the `documentBase64` field of the [`document` object](#/definitions/document) ### Recipient Types An [`envelopeDefinition` object](#/definitions/envelopeDefinition) is used as the method's body. Envelope recipients can be defined in the envelope or in templates. The `envelopeDefinition` object's `recipients` field is an [`EnvelopeRecipients` resource object](#/definitions/EnvelopeRecipients). It includes arrays of the seven types of recipients defined by DocuSign: Recipient type | Object definition - -- -- -- -- -- -- - | - -- -- -- -- -- -- -- -- agent (can add name and email information for later recipients/signers) | [`agent`](#/definitions/agent) carbon copy (receives a copy of the documents) | [`carbonCopy`](#/definitions/carbonCopy) certified delivery (receives a copy of the documents and must acknowledge receipt) | [`certifiedDelivery`](#/definitions/certifiedDelivery) editor (can change recipients and document fields for later recipients/signers) | [`editor`](#/definitions/editor) in-person signer (\"hosts\" someone who signs in-person) | [`inPersonSigner`](#/definitions/inPersonSigner) intermediary (can add name and email information for some later recipients/signers.) | [`intermediary`](#/definitions/intermediary) signer (signs and/or updates document fields) | [`signer`](#/definitions/signer) Additional information about the different types of recipients is available from the [`EnvelopeRecipients` resource page](../../EnvelopeRecipients) and from the [Developer Center](https://www.docusign.com/developer-center/explore/features/recipients) ### Tabs Tabs (also referred to as `tags` and as `fields` in the web sending user interface), can be defined in the `envelopeDefinition`, in templates, by transforming PDF Form Fields, or by using Composite Templates (see below). Defining tabs: the `inPersonSigner`, and `signer` recipient objects include a `tabs` field. It is an [`EnvelopeTabs` resource object](#/definitions/EnvelopeTabs). It includes arrays of the 24 different tab types available. See the [`EnvelopeTabs` resource](../../EnvelopeTabs) for more information. ## Using Templates Envelopes use specific people or groups as recipients. Templates can specify a role, eg `account_manager.` When a template is used in an envelope, the roles must be replaced with specific people or groups. When you create an envelope using a `templateId`, the different recipient type objects within the [`EnvelopeRecipients` object](#/definitions/EnvelopeRecipients) are used to assign recipients to the template's roles via the `roleName` property. The recipient objects can also override settings that were specified in the template, and set values for tab fields that were defined in the template. ### Message Lock When a template is added or applied to an envelope and the template has a locked email subject and message, that subject and message are used for the envelope and cannot be changed even if another locked template is subsequently added or applied to the envelope. The field `messageLock` is used to lock the email subject and message. If an email subject or message is entered before adding or applying a template with `messageLock` **true**, the email subject and message is overwritten with the locked email subject and message from the template. ## Envelope Status The status of sent envelopes can be determined through the DocuSign webhook system or by polling. Webhooks are highly recommended: they provide your application with the quickest updates when an envelope's status changes. DocuSign limits polling to once every 15 minutes or less frequently. When a webhook is used, DocuSign calls your application, via the URL you provide, with a notification XML message. See the [Webhook recipe](https://www.docusign.com/developer-center/recipes/webhook-status) for examples and live demos of using webhooks. ## Webhook Options The two webhook options, *eventNotification* and *Connect* use the same notification mechanism and message formats. eventNotification is used to create a webhook for a specific envelope sent via the API. Connect webhooks can be used for any envelope sent from an account, from any user, from any client. ### eventNotification Webhooks The Envelopes::create method includes an optional [eventNotification object](#definition-eventNotification) that adds a webhook to the envelope. eventNotification webhooks are available for all DocuSign accounts with API access. ### Connect Webhooks Connect can be used to create a webhook for all envelopes sent by all users in an account, either through the API or via other DocuSign clients (web, mobile, etc). Connect configurations are independent of specific envelopes. A Connect configuration includes a filter that may be used to limit the webhook to specific users, envelope statuses, etc. Connect configurations may be created and managed using the [ConnectConfigurations resource](../../Connect/ConnectConfigurations). Configurations can also be created and managed from the Administration tool accessed by selecting \"Go to Admin\" from the menu next to your picture on the DocuSign web app. See the Integrations/Connect section of the Admin tool. For repeatability, and to minimize support questions, creating Connect configurations via the API is recommended, especially for ISVs. Connect is available for some DocuSign account types. Please contact DocuSign Sales for more information. ## Composite Templates The Composite Templates feature, like [compositing in film production](https://en.wikipedia.org/wiki/Compositing), enables you to *overlay* document, recipient, and tab definitions from multiple sources, including PDF Form Field definitions, templates defined on the server, and more. Each Composite Template consists of optional elements: server templates, inline templates, PDF Metadata templates, and documents. * The Composite Template ID is an optional element used to identify the composite template. It is used as a reference when adding document object information via a multi-part HTTP message. If used, the document content-disposition must include the `compositeTemplateId` to which the document should be added. If `compositeTemplateId` is not specified in the content-disposition, the document is applied based on the `documentId` only. If no document object is specified, the composite template inherits the first document. * Server Templates are server-side templates stored on the DocuSign platform. If supplied, they are overlaid into the envelope in the order of their Sequence value. * Inline Templates provide a container to add documents, recipients, tabs, and custom fields. If inline templates are supplied, they are overlaid into the envelope in the order of their Sequence value. * Document objects are optional structures that provide a container to pass in a document or form. If this object is not included, the composite template inherits the *first* document it finds from a server template or inline template, starting with the lowest sequence value. PDF Form objects are only transformed from the document object. DocuSign does not derive PDF form properties from server templates or inline templates. To instruct DocuSign to transform fields from the PDF form, set `transformPdfFields` to \"true\" for the document. See the Transform PDF Fields section for more information about process. * PDF Metadata Templates provide a container to embed design-time template information into a PDF document. DocuSign uses this information when processing the Envelope. This convention allows the document to carry the signing instructions with it, so that less information needs to be provided at run-time through an inline template or synchronized with an external structure like a server template. PDF Metadata templates are stored in the Metadata layer of a PDF in accordance with Acrobat's XMP specification. DocuSign will only find PDF Metadata templates inside documents passed in the Document object (see below). If supplied, the PDF metadata template will be overlaid into the envelope in the order of its Sequence value. ### Compositing the definitions Each Composite Template adds a new document and templates overlay into the envelope. For each Composite Template these rules are applied: * Templates are overlaid in the order of their Sequence value. * If Document is not passed into the Composite Template's `document` field, the *first* template's document (based on the template's Sequence value) is used. * Last in wins in all cases except for the document (i.e. envelope information, recipient information, secure field information). There is no special casing. For example, if you want higher security on a tab, then that needs to be specified in a later template (by sequence number) then where the tab is included. If you want higher security on a role recipient, then it needs to be in a later template then where that role recipient is specified. * Recipient matching is based on Recipient Role and Routing Order. If there are matches, the recipient information is merged together. A final pass is done on all Composite Templates, after all template overlays have been applied, to collapse recipients with the same email, username and routing order. This prevents having the same recipients at the same routing order. * If you specify in a template that a recipient is locked, once that recipient is overlaid the recipient attributes can no longer be changed. The only items that can be changed for the recipient in this case are the email, username, access code and IDCheckInformationInput. * Tab matching is based on Tab Labels, Tab Types and Documents. If a Tab Label matches but the Document is not supplied, the Tab is overlaid for all the Documents. For example, if you have a simple inline template with only one tab in it with a label and a value, the Signature, Initial, Company, Envelope ID, User Name tabs will only be matched and collapsed if they fall in the exact same X and Y locations. * roleName and tabLabel matching is case sensitive. * The defaultRecipient field enables you to specify which recipient the generated tabs from a PDF form are mapped to. You can also set PDF form generated tabs to a recipient other than the DefaultRecipient by specifying the mapping of the tab label that is created to one of the template recipients. * You can use tabLabel wild carding to map a series of tabs from the PDF form. To use this you must end a tab label with \"\\*\" and then the system matches tabs that start with the label. * If no DefaultRecipient is specified, tabs must be explicitly mapped to recipients in order to be generated from the form. Unmapped form objects will not be generated into their DocuSign equivalents. (In the case of Signature/Initials, the tabs will be disregarded entirely; in the case of pdf text fields, the field data will be flattened on the Envelope document, but there will not be a corresponding DocuSign data tab.) ### Including the Document Content for Composite Templates Document content can be supplied inline, using the `documentBase64` or can be included in a multi-part HTTP message. If a multi-part message is used and there are multiple Composite Templates, the document content-disposition can include the `compositeTemplateId` to which the document should be added. Using the `compositeTemplateId` sets which documents are associated with particular composite templates. An example of this usage is: ``` - -5cd3320a-5aac-4453-b3a4-cbb52a4cba5d Content-Type: application/pdf Content-Disposition: file; filename=\"eula.pdf\"; documentId=1; compositeTemplateId=\"1\" Content-Transfer-Encoding: base64 ``` ### PDF Form Field Transformation Only the following PDF Form FieldTypes will be transformed to DocuSign tabs: CheckBox, DateTime, ListBox, Numeric, Password, Radio, Signature, and Text Field Properties that will be transformed: Read Only, Required, Max Length, Positions, and Initial Data. When transforming a *PDF Form Digital Signature Field,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials Any other PDF Form Digital Signature Field will be transformed to a DocuSign Signature tab When transforming *PDF Form Text Fields,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials DocuSignEnvelopeID or eSignEnvelopeID | EnvelopeID DocuSignCompany or eSignCompany | Company DocuSignDateSigned or eSignDateSigned | Date Signed DocuSignTitle or eSignTitle | Title DocuSignFullName or eSignFullName | Full Name DocuSignSignerAttachmentOptional or eSignSignerAttachmentOptional | Optional Signer Attachment Any other PDF Form Text Field will be transformed to a DocuSign data (text) tab. PDF Form Field Names that include \"DocuSignIgnoreTransform\" or \"eSignIgnoreTransform\" will not be transformed. PDF Form Date fields will be transformed to Date Signed fields if their name includes DocuSignDateSigned or eSignDateSigned. ## Template Email Subject Merge Fields This feature enables you to insert recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's `roleName`, are added to the `emailSubject` when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. * To add a recipient's name in the subject line add the following text in the `emailSubject` when creating the template or when sending an envelope from a template: [[<roleName>_UserName]] Example: `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",` * To add a recipient's email address in the subject line add the following text in the emailSubject when creating the template or when sending an envelope from a template: [[<roleName>_Email]] Example: `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",` In both cases the <roleName> is the recipient's `roleName` in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject. ## Branding an envelope The following rules are used to determine the `brandId` used in an envelope: * If a `brandId` is specified in the envelope/template and that brandId is available to the account, that brand is used in the envelope. * If more than one template is used in an envelope and more than one `brandId` is specified, the first `brandId` specified is used throughout the envelope. * In cases where no brand is specified and the sender belongs to a Group; if there is only one brand associated with the Group, then that brand is used in the envelope. Otherwise, the account's default signing brand is used. * For envelopes that do not meet any of the previous criteria, the account's default signing brand is used for the envelope. ## BCC Email address feature The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, don't use the BCC Email field. Use a Carbon Copy or Certified Delivery Recipient type. ## Merge Recipient Roles for Draft Envelopes When an envelope with multiple templates is sent, the recipients from the templates are merged according to the template roles, and empty recipients are removed. When creating an envelope with multiple templates, but not sending it (keeping it in a created state), duplicate recipients are not merged, which could cause leave duplicate recipients in the envelope. To prevent this, the query parameter `merge_roles_on_draft` should be added when posting a draft envelope (status=created) with multiple templates. Doing this will merge template roles and remove empty recipients. ###### Note: DocuSign recommends that the `merge_roles_on_draft` query parameter be used anytime you are creating an envelope with multiple templates and keeping it in draft (created) status. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Options for modifying the behavior of the function. /// Task of EnvelopeSummary public async System.Threading.Tasks.Task CreateEnvelopeAsync(string accountId, EnvelopeDefinition envelopeDefinition = null, EnvelopesApi.CreateEnvelopeOptions options = null) { ApiResponse localVarResponse = await CreateEnvelopeAsyncWithHttpInfo(accountId, envelopeDefinition, options); return localVarResponse.Data; } /// /// Creates an envelope. Creates an envelope. Using this function you can: * Create an envelope and send it. * Create an envelope from an existing template and send it. In either case, you can choose to save the envelope as a draft envelope instead of sending it by setting the request's `status` property to `created` instead of `sent`. ## Sending Envelopes Documents can be included with the Envelopes::create call itself or a template can include documents. Documents can be added by using a multi-part/form request or by using the `documentBase64` field of the [`document` object](#/definitions/document) ### Recipient Types An [`envelopeDefinition` object](#/definitions/envelopeDefinition) is used as the method's body. Envelope recipients can be defined in the envelope or in templates. The `envelopeDefinition` object's `recipients` field is an [`EnvelopeRecipients` resource object](#/definitions/EnvelopeRecipients). It includes arrays of the seven types of recipients defined by DocuSign: Recipient type | Object definition - -- -- -- -- -- -- - | - -- -- -- -- -- -- -- -- agent (can add name and email information for later recipients/signers) | [`agent`](#/definitions/agent) carbon copy (receives a copy of the documents) | [`carbonCopy`](#/definitions/carbonCopy) certified delivery (receives a copy of the documents and must acknowledge receipt) | [`certifiedDelivery`](#/definitions/certifiedDelivery) editor (can change recipients and document fields for later recipients/signers) | [`editor`](#/definitions/editor) in-person signer (\"hosts\" someone who signs in-person) | [`inPersonSigner`](#/definitions/inPersonSigner) intermediary (can add name and email information for some later recipients/signers.) | [`intermediary`](#/definitions/intermediary) signer (signs and/or updates document fields) | [`signer`](#/definitions/signer) Additional information about the different types of recipients is available from the [`EnvelopeRecipients` resource page](../../EnvelopeRecipients) and from the [Developer Center](https://www.docusign.com/developer-center/explore/features/recipients) ### Tabs Tabs (also referred to as `tags` and as `fields` in the web sending user interface), can be defined in the `envelopeDefinition`, in templates, by transforming PDF Form Fields, or by using Composite Templates (see below). Defining tabs: the `inPersonSigner`, and `signer` recipient objects include a `tabs` field. It is an [`EnvelopeTabs` resource object](#/definitions/EnvelopeTabs). It includes arrays of the 24 different tab types available. See the [`EnvelopeTabs` resource](../../EnvelopeTabs) for more information. ## Using Templates Envelopes use specific people or groups as recipients. Templates can specify a role, eg `account_manager.` When a template is used in an envelope, the roles must be replaced with specific people or groups. When you create an envelope using a `templateId`, the different recipient type objects within the [`EnvelopeRecipients` object](#/definitions/EnvelopeRecipients) are used to assign recipients to the template's roles via the `roleName` property. The recipient objects can also override settings that were specified in the template, and set values for tab fields that were defined in the template. ### Message Lock When a template is added or applied to an envelope and the template has a locked email subject and message, that subject and message are used for the envelope and cannot be changed even if another locked template is subsequently added or applied to the envelope. The field `messageLock` is used to lock the email subject and message. If an email subject or message is entered before adding or applying a template with `messageLock` **true**, the email subject and message is overwritten with the locked email subject and message from the template. ## Envelope Status The status of sent envelopes can be determined through the DocuSign webhook system or by polling. Webhooks are highly recommended: they provide your application with the quickest updates when an envelope's status changes. DocuSign limits polling to once every 15 minutes or less frequently. When a webhook is used, DocuSign calls your application, via the URL you provide, with a notification XML message. See the [Webhook recipe](https://www.docusign.com/developer-center/recipes/webhook-status) for examples and live demos of using webhooks. ## Webhook Options The two webhook options, *eventNotification* and *Connect* use the same notification mechanism and message formats. eventNotification is used to create a webhook for a specific envelope sent via the API. Connect webhooks can be used for any envelope sent from an account, from any user, from any client. ### eventNotification Webhooks The Envelopes::create method includes an optional [eventNotification object](#definition-eventNotification) that adds a webhook to the envelope. eventNotification webhooks are available for all DocuSign accounts with API access. ### Connect Webhooks Connect can be used to create a webhook for all envelopes sent by all users in an account, either through the API or via other DocuSign clients (web, mobile, etc). Connect configurations are independent of specific envelopes. A Connect configuration includes a filter that may be used to limit the webhook to specific users, envelope statuses, etc. Connect configurations may be created and managed using the [ConnectConfigurations resource](../../Connect/ConnectConfigurations). Configurations can also be created and managed from the Administration tool accessed by selecting \"Go to Admin\" from the menu next to your picture on the DocuSign web app. See the Integrations/Connect section of the Admin tool. For repeatability, and to minimize support questions, creating Connect configurations via the API is recommended, especially for ISVs. Connect is available for some DocuSign account types. Please contact DocuSign Sales for more information. ## Composite Templates The Composite Templates feature, like [compositing in film production](https://en.wikipedia.org/wiki/Compositing), enables you to *overlay* document, recipient, and tab definitions from multiple sources, including PDF Form Field definitions, templates defined on the server, and more. Each Composite Template consists of optional elements: server templates, inline templates, PDF Metadata templates, and documents. * The Composite Template ID is an optional element used to identify the composite template. It is used as a reference when adding document object information via a multi-part HTTP message. If used, the document content-disposition must include the `compositeTemplateId` to which the document should be added. If `compositeTemplateId` is not specified in the content-disposition, the document is applied based on the `documentId` only. If no document object is specified, the composite template inherits the first document. * Server Templates are server-side templates stored on the DocuSign platform. If supplied, they are overlaid into the envelope in the order of their Sequence value. * Inline Templates provide a container to add documents, recipients, tabs, and custom fields. If inline templates are supplied, they are overlaid into the envelope in the order of their Sequence value. * Document objects are optional structures that provide a container to pass in a document or form. If this object is not included, the composite template inherits the *first* document it finds from a server template or inline template, starting with the lowest sequence value. PDF Form objects are only transformed from the document object. DocuSign does not derive PDF form properties from server templates or inline templates. To instruct DocuSign to transform fields from the PDF form, set `transformPdfFields` to \"true\" for the document. See the Transform PDF Fields section for more information about process. * PDF Metadata Templates provide a container to embed design-time template information into a PDF document. DocuSign uses this information when processing the Envelope. This convention allows the document to carry the signing instructions with it, so that less information needs to be provided at run-time through an inline template or synchronized with an external structure like a server template. PDF Metadata templates are stored in the Metadata layer of a PDF in accordance with Acrobat's XMP specification. DocuSign will only find PDF Metadata templates inside documents passed in the Document object (see below). If supplied, the PDF metadata template will be overlaid into the envelope in the order of its Sequence value. ### Compositing the definitions Each Composite Template adds a new document and templates overlay into the envelope. For each Composite Template these rules are applied: * Templates are overlaid in the order of their Sequence value. * If Document is not passed into the Composite Template's `document` field, the *first* template's document (based on the template's Sequence value) is used. * Last in wins in all cases except for the document (i.e. envelope information, recipient information, secure field information). There is no special casing. For example, if you want higher security on a tab, then that needs to be specified in a later template (by sequence number) then where the tab is included. If you want higher security on a role recipient, then it needs to be in a later template then where that role recipient is specified. * Recipient matching is based on Recipient Role and Routing Order. If there are matches, the recipient information is merged together. A final pass is done on all Composite Templates, after all template overlays have been applied, to collapse recipients with the same email, username and routing order. This prevents having the same recipients at the same routing order. * If you specify in a template that a recipient is locked, once that recipient is overlaid the recipient attributes can no longer be changed. The only items that can be changed for the recipient in this case are the email, username, access code and IDCheckInformationInput. * Tab matching is based on Tab Labels, Tab Types and Documents. If a Tab Label matches but the Document is not supplied, the Tab is overlaid for all the Documents. For example, if you have a simple inline template with only one tab in it with a label and a value, the Signature, Initial, Company, Envelope ID, User Name tabs will only be matched and collapsed if they fall in the exact same X and Y locations. * roleName and tabLabel matching is case sensitive. * The defaultRecipient field enables you to specify which recipient the generated tabs from a PDF form are mapped to. You can also set PDF form generated tabs to a recipient other than the DefaultRecipient by specifying the mapping of the tab label that is created to one of the template recipients. * You can use tabLabel wild carding to map a series of tabs from the PDF form. To use this you must end a tab label with \"\\*\" and then the system matches tabs that start with the label. * If no DefaultRecipient is specified, tabs must be explicitly mapped to recipients in order to be generated from the form. Unmapped form objects will not be generated into their DocuSign equivalents. (In the case of Signature/Initials, the tabs will be disregarded entirely; in the case of pdf text fields, the field data will be flattened on the Envelope document, but there will not be a corresponding DocuSign data tab.) ### Including the Document Content for Composite Templates Document content can be supplied inline, using the `documentBase64` or can be included in a multi-part HTTP message. If a multi-part message is used and there are multiple Composite Templates, the document content-disposition can include the `compositeTemplateId` to which the document should be added. Using the `compositeTemplateId` sets which documents are associated with particular composite templates. An example of this usage is: ``` - -5cd3320a-5aac-4453-b3a4-cbb52a4cba5d Content-Type: application/pdf Content-Disposition: file; filename=\"eula.pdf\"; documentId=1; compositeTemplateId=\"1\" Content-Transfer-Encoding: base64 ``` ### PDF Form Field Transformation Only the following PDF Form FieldTypes will be transformed to DocuSign tabs: CheckBox, DateTime, ListBox, Numeric, Password, Radio, Signature, and Text Field Properties that will be transformed: Read Only, Required, Max Length, Positions, and Initial Data. When transforming a *PDF Form Digital Signature Field,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials Any other PDF Form Digital Signature Field will be transformed to a DocuSign Signature tab When transforming *PDF Form Text Fields,* the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be - -- -- -- | - -- -- -- - DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials DocuSignEnvelopeID or eSignEnvelopeID | EnvelopeID DocuSignCompany or eSignCompany | Company DocuSignDateSigned or eSignDateSigned | Date Signed DocuSignTitle or eSignTitle | Title DocuSignFullName or eSignFullName | Full Name DocuSignSignerAttachmentOptional or eSignSignerAttachmentOptional | Optional Signer Attachment Any other PDF Form Text Field will be transformed to a DocuSign data (text) tab. PDF Form Field Names that include \"DocuSignIgnoreTransform\" or \"eSignIgnoreTransform\" will not be transformed. PDF Form Date fields will be transformed to Date Signed fields if their name includes DocuSignDateSigned or eSignDateSigned. ## Template Email Subject Merge Fields This feature enables you to insert recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's `roleName`, are added to the `emailSubject` when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. * To add a recipient's name in the subject line add the following text in the `emailSubject` when creating the template or when sending an envelope from a template: [[<roleName>_UserName]] Example: `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",` * To add a recipient's email address in the subject line add the following text in the emailSubject when creating the template or when sending an envelope from a template: [[<roleName>_Email]] Example: `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",` In both cases the <roleName> is the recipient's `roleName` in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject. ## Branding an envelope The following rules are used to determine the `brandId` used in an envelope: * If a `brandId` is specified in the envelope/template and that brandId is available to the account, that brand is used in the envelope. * If more than one template is used in an envelope and more than one `brandId` is specified, the first `brandId` specified is used throughout the envelope. * In cases where no brand is specified and the sender belongs to a Group; if there is only one brand associated with the Group, then that brand is used in the envelope. Otherwise, the account's default signing brand is used. * For envelopes that do not meet any of the previous criteria, the account's default signing brand is used for the envelope. ## BCC Email address feature The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, don't use the BCC Email field. Use a Carbon Copy or Certified Delivery Recipient type. ## Merge Recipient Roles for Draft Envelopes When an envelope with multiple templates is sent, the recipients from the templates are merged according to the template roles, and empty recipients are removed. When creating an envelope with multiple templates, but not sending it (keeping it in a created state), duplicate recipients are not merged, which could cause leave duplicate recipients in the envelope. To prevent this, the query parameter `merge_roles_on_draft` should be added when posting a draft envelope (status=created) with multiple templates. Doing this will merge template roles and remove empty recipients. ###### Note: DocuSign recommends that the `merge_roles_on_draft` query parameter be used anytime you are creating an envelope with multiple templates and keeping it in draft (created) status. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Options for modifying the behavior of the function. /// Task of ApiResponse (EnvelopeSummary) public async System.Threading.Tasks.Task> CreateEnvelopeAsyncWithHttpInfo(string accountId, EnvelopeDefinition envelopeDefinition = null, EnvelopesApi.CreateEnvelopeOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateEnvelope"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (options != null) { if (options.cdseMode != null) localVarQueryParams.Add("cdse_mode", this.ApiClient.ParameterToString(options.cdseMode)); // query parameter if (options.changeRoutingOrder != null) localVarQueryParams.Add("change_routing_order", this.ApiClient.ParameterToString(options.changeRoutingOrder)); // query parameter if (options.completedDocumentsOnly != null) localVarQueryParams.Add("completed_documents_only", this.ApiClient.ParameterToString(options.completedDocumentsOnly)); // query parameter if (options.mergeRolesOnDraft != null) localVarQueryParams.Add("merge_roles_on_draft", this.ApiClient.ParameterToString(options.mergeRolesOnDraft)); // query parameter if (options.tabLabelExactMatches != null) localVarQueryParams.Add("tab_label_exact_matches", this.ApiClient.ParameterToString(options.tabLabelExactMatches)); // query parameter } if (envelopeDefinition != null && envelopeDefinition.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeDefinition); // http body (model) parameter } else { localVarPostBody = envelopeDefinition; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateEnvelope", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeSummary)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeSummary))); } /// /// Posts a list of comments for authorized user /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// CommentHistoryResult public CommentHistoryResult CreateEnvelopeComments(string accountId, string envelopeId, CommentsPublish commentsPublish = null) { ApiResponse localVarResponse = CreateEnvelopeCommentsWithHttpInfo(accountId, envelopeId, commentsPublish); return localVarResponse.Data; } /// /// Posts a list of comments for authorized user /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of CommentHistoryResult public ApiResponse CreateEnvelopeCommentsWithHttpInfo(string accountId, string envelopeId, CommentsPublish commentsPublish = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateEnvelopeComments"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateEnvelopeComments"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/comments"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (commentsPublish != null && commentsPublish.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(commentsPublish); // http body (model) parameter } else { localVarPostBody = commentsPublish; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateEnvelopeComments", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (CommentHistoryResult)this.ApiClient.Deserialize(localVarResponse, typeof(CommentHistoryResult))); } /// /// Posts a list of comments for authorized user /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of CommentHistoryResult public async System.Threading.Tasks.Task CreateEnvelopeCommentsAsync(string accountId, string envelopeId, CommentsPublish commentsPublish = null) { ApiResponse localVarResponse = await CreateEnvelopeCommentsAsyncWithHttpInfo(accountId, envelopeId, commentsPublish); return localVarResponse.Data; } /// /// Posts a list of comments for authorized user /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (CommentHistoryResult) public async System.Threading.Tasks.Task> CreateEnvelopeCommentsAsyncWithHttpInfo(string accountId, string envelopeId, CommentsPublish commentsPublish = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateEnvelopeComments"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateEnvelopeComments"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/comments"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (commentsPublish != null && commentsPublish.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(commentsPublish); // http body (model) parameter } else { localVarPostBody = commentsPublish; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateEnvelopeComments", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (CommentHistoryResult)this.ApiClient.Deserialize(localVarResponse, typeof(CommentHistoryResult))); } /// /// Provides a URL to start a recipient view of the Envelope UI This method returns a URL for an envelope recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience. For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ViewUrl public ViewUrl CreateEnvelopeRecipientPreview(string accountId, string envelopeId, RecipientPreviewRequest recipientPreviewRequest = null) { ApiResponse localVarResponse = CreateEnvelopeRecipientPreviewWithHttpInfo(accountId, envelopeId, recipientPreviewRequest); return localVarResponse.Data; } /// /// Provides a URL to start a recipient view of the Envelope UI This method returns a URL for an envelope recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience. For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ViewUrl public ApiResponse CreateEnvelopeRecipientPreviewWithHttpInfo(string accountId, string envelopeId, RecipientPreviewRequest recipientPreviewRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateEnvelopeRecipientPreview"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateEnvelopeRecipientPreview"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient_preview"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientPreviewRequest != null && recipientPreviewRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(recipientPreviewRequest); // http body (model) parameter } else { localVarPostBody = recipientPreviewRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateEnvelopeRecipientPreview", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ViewUrl)this.ApiClient.Deserialize(localVarResponse, typeof(ViewUrl))); } /// /// Provides a URL to start a recipient view of the Envelope UI This method returns a URL for an envelope recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience. For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ViewUrl public async System.Threading.Tasks.Task CreateEnvelopeRecipientPreviewAsync(string accountId, string envelopeId, RecipientPreviewRequest recipientPreviewRequest = null) { ApiResponse localVarResponse = await CreateEnvelopeRecipientPreviewAsyncWithHttpInfo(accountId, envelopeId, recipientPreviewRequest); return localVarResponse.Data; } /// /// Provides a URL to start a recipient view of the Envelope UI This method returns a URL for an envelope recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience. For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (ViewUrl) public async System.Threading.Tasks.Task> CreateEnvelopeRecipientPreviewAsyncWithHttpInfo(string accountId, string envelopeId, RecipientPreviewRequest recipientPreviewRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateEnvelopeRecipientPreview"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateEnvelopeRecipientPreview"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient_preview"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientPreviewRequest != null && recipientPreviewRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(recipientPreviewRequest); // http body (model) parameter } else { localVarPostBody = recipientPreviewRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateEnvelopeRecipientPreview", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ViewUrl)this.ApiClient.Deserialize(localVarResponse, typeof(ViewUrl))); } /// /// Provides a URL to start a shared recipient view of the Envelope UI Returns a URL that enables you to embed the DocuSign UI recipient view of a [shared envelope](https://support.docusign.com/en/guides/ndse-admin-guide-share-envelopes) in your applications. This is the view that a user sees of an envelope that a recipient on the same account has shared with them. Due to screen space issues, do not use an `<iframe>` for embedded operations on mobile devices. For iOS devices, DocuSign recommends using a WebView. ### Revoking the URL You can revoke this URL by making a DELETE HTTP request to the URL with no request body. ### Related topics - [Embedded signing and sending](/docs/esign-rest-api/esign101/concepts/embedding/) - [How to send an envelope via your app](/docs/esign-rest-api/how-to/embedded-sending/) - [How to embed the DocuSign UI in your app](/docs/esign-rest-api/how-to/embed-ui/) /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ViewUrl public ViewUrl CreateEnvelopeRecipientSharedView(string accountId, string envelopeId, RecipientViewRequest recipientViewRequest = null) { ApiResponse localVarResponse = CreateEnvelopeRecipientSharedViewWithHttpInfo(accountId, envelopeId, recipientViewRequest); return localVarResponse.Data; } /// /// Provides a URL to start a shared recipient view of the Envelope UI Returns a URL that enables you to embed the DocuSign UI recipient view of a [shared envelope](https://support.docusign.com/en/guides/ndse-admin-guide-share-envelopes) in your applications. This is the view that a user sees of an envelope that a recipient on the same account has shared with them. Due to screen space issues, do not use an `<iframe>` for embedded operations on mobile devices. For iOS devices, DocuSign recommends using a WebView. ### Revoking the URL You can revoke this URL by making a DELETE HTTP request to the URL with no request body. ### Related topics - [Embedded signing and sending](/docs/esign-rest-api/esign101/concepts/embedding/) - [How to send an envelope via your app](/docs/esign-rest-api/how-to/embedded-sending/) - [How to embed the DocuSign UI in your app](/docs/esign-rest-api/how-to/embed-ui/) /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ViewUrl public ApiResponse CreateEnvelopeRecipientSharedViewWithHttpInfo(string accountId, string envelopeId, RecipientViewRequest recipientViewRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateEnvelopeRecipientSharedView"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateEnvelopeRecipientSharedView"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/shared"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientViewRequest != null && recipientViewRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(recipientViewRequest); // http body (model) parameter } else { localVarPostBody = recipientViewRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateEnvelopeRecipientSharedView", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ViewUrl)this.ApiClient.Deserialize(localVarResponse, typeof(ViewUrl))); } /// /// Provides a URL to start a shared recipient view of the Envelope UI Returns a URL that enables you to embed the DocuSign UI recipient view of a [shared envelope](https://support.docusign.com/en/guides/ndse-admin-guide-share-envelopes) in your applications. This is the view that a user sees of an envelope that a recipient on the same account has shared with them. Due to screen space issues, do not use an `<iframe>` for embedded operations on mobile devices. For iOS devices, DocuSign recommends using a WebView. ### Revoking the URL You can revoke this URL by making a DELETE HTTP request to the URL with no request body. ### Related topics - [Embedded signing and sending](/docs/esign-rest-api/esign101/concepts/embedding/) - [How to send an envelope via your app](/docs/esign-rest-api/how-to/embedded-sending/) - [How to embed the DocuSign UI in your app](/docs/esign-rest-api/how-to/embed-ui/) /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ViewUrl public async System.Threading.Tasks.Task CreateEnvelopeRecipientSharedViewAsync(string accountId, string envelopeId, RecipientViewRequest recipientViewRequest = null) { ApiResponse localVarResponse = await CreateEnvelopeRecipientSharedViewAsyncWithHttpInfo(accountId, envelopeId, recipientViewRequest); return localVarResponse.Data; } /// /// Provides a URL to start a shared recipient view of the Envelope UI Returns a URL that enables you to embed the DocuSign UI recipient view of a [shared envelope](https://support.docusign.com/en/guides/ndse-admin-guide-share-envelopes) in your applications. This is the view that a user sees of an envelope that a recipient on the same account has shared with them. Due to screen space issues, do not use an `<iframe>` for embedded operations on mobile devices. For iOS devices, DocuSign recommends using a WebView. ### Revoking the URL You can revoke this URL by making a DELETE HTTP request to the URL with no request body. ### Related topics - [Embedded signing and sending](/docs/esign-rest-api/esign101/concepts/embedding/) - [How to send an envelope via your app](/docs/esign-rest-api/how-to/embedded-sending/) - [How to embed the DocuSign UI in your app](/docs/esign-rest-api/how-to/embed-ui/) /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (ViewUrl) public async System.Threading.Tasks.Task> CreateEnvelopeRecipientSharedViewAsyncWithHttpInfo(string accountId, string envelopeId, RecipientViewRequest recipientViewRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateEnvelopeRecipientSharedView"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateEnvelopeRecipientSharedView"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/shared"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientViewRequest != null && recipientViewRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(recipientViewRequest); // http body (model) parameter } else { localVarPostBody = recipientViewRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateEnvelopeRecipientSharedView", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ViewUrl)this.ApiClient.Deserialize(localVarResponse, typeof(ViewUrl))); } /// /// Add envelope transfer rules to an account. This method creates an envelope transfer rule. When you create an envelope transfer rule, you specify the following properties: - `eventType` - `fromGroups` - `toUser` - `toFolder` - `carbonCopyOriginalOwner` - `enabled` **Note:** Only Administrators can create envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// EnvelopeTransferRuleInformation public EnvelopeTransferRuleInformation CreateEnvelopeTransferRules(string accountId, EnvelopeTransferRuleRequest envelopeTransferRuleRequest = null) { ApiResponse localVarResponse = CreateEnvelopeTransferRulesWithHttpInfo(accountId, envelopeTransferRuleRequest); return localVarResponse.Data; } /// /// Add envelope transfer rules to an account. This method creates an envelope transfer rule. When you create an envelope transfer rule, you specify the following properties: - `eventType` - `fromGroups` - `toUser` - `toFolder` - `carbonCopyOriginalOwner` - `enabled` **Note:** Only Administrators can create envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// ApiResponse of EnvelopeTransferRuleInformation public ApiResponse CreateEnvelopeTransferRulesWithHttpInfo(string accountId, EnvelopeTransferRuleRequest envelopeTransferRuleRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateEnvelopeTransferRules"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/transfer_rules"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeTransferRuleRequest != null && envelopeTransferRuleRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeTransferRuleRequest); // http body (model) parameter } else { localVarPostBody = envelopeTransferRuleRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateEnvelopeTransferRules", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeTransferRuleInformation)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeTransferRuleInformation))); } /// /// Add envelope transfer rules to an account. This method creates an envelope transfer rule. When you create an envelope transfer rule, you specify the following properties: - `eventType` - `fromGroups` - `toUser` - `toFolder` - `carbonCopyOriginalOwner` - `enabled` **Note:** Only Administrators can create envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of EnvelopeTransferRuleInformation public async System.Threading.Tasks.Task CreateEnvelopeTransferRulesAsync(string accountId, EnvelopeTransferRuleRequest envelopeTransferRuleRequest = null) { ApiResponse localVarResponse = await CreateEnvelopeTransferRulesAsyncWithHttpInfo(accountId, envelopeTransferRuleRequest); return localVarResponse.Data; } /// /// Add envelope transfer rules to an account. This method creates an envelope transfer rule. When you create an envelope transfer rule, you specify the following properties: - `eventType` - `fromGroups` - `toUser` - `toFolder` - `carbonCopyOriginalOwner` - `enabled` **Note:** Only Administrators can create envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of ApiResponse (EnvelopeTransferRuleInformation) public async System.Threading.Tasks.Task> CreateEnvelopeTransferRulesAsyncWithHttpInfo(string accountId, EnvelopeTransferRuleRequest envelopeTransferRuleRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateEnvelopeTransferRules"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/transfer_rules"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeTransferRuleRequest != null && envelopeTransferRuleRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeTransferRuleRequest); // http body (model) parameter } else { localVarPostBody = envelopeTransferRuleRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateEnvelopeTransferRules", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeTransferRuleInformation)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeTransferRuleInformation))); } /// /// Creates and adds a new workflow step definition for an envelope's workflow /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// WorkflowStep public WorkflowStep CreateEnvelopeWorkflowStepDefinition(string accountId, string envelopeId, WorkflowStep workflowStep = null) { ApiResponse localVarResponse = CreateEnvelopeWorkflowStepDefinitionWithHttpInfo(accountId, envelopeId, workflowStep); return localVarResponse.Data; } /// /// Creates and adds a new workflow step definition for an envelope's workflow /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of WorkflowStep public ApiResponse CreateEnvelopeWorkflowStepDefinitionWithHttpInfo(string accountId, string envelopeId, WorkflowStep workflowStep = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateEnvelopeWorkflowStepDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateEnvelopeWorkflowStepDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/steps"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (workflowStep != null && workflowStep.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(workflowStep); // http body (model) parameter } else { localVarPostBody = workflowStep; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateEnvelopeWorkflowStepDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (WorkflowStep)this.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStep))); } /// /// Creates and adds a new workflow step definition for an envelope's workflow /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of WorkflowStep public async System.Threading.Tasks.Task CreateEnvelopeWorkflowStepDefinitionAsync(string accountId, string envelopeId, WorkflowStep workflowStep = null) { ApiResponse localVarResponse = await CreateEnvelopeWorkflowStepDefinitionAsyncWithHttpInfo(accountId, envelopeId, workflowStep); return localVarResponse.Data; } /// /// Creates and adds a new workflow step definition for an envelope's workflow /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (WorkflowStep) public async System.Threading.Tasks.Task> CreateEnvelopeWorkflowStepDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, WorkflowStep workflowStep = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateEnvelopeWorkflowStepDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateEnvelopeWorkflowStepDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/steps"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (workflowStep != null && workflowStep.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(workflowStep); // http body (model) parameter } else { localVarPostBody = workflowStep; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateEnvelopeWorkflowStepDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (WorkflowStep)this.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStep))); } /// /// Submits a batch of historical envelopes for republish to an adhoc config. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// EnvelopePublishTransaction public EnvelopePublishTransaction CreateHistoricalEnvelopePublishTransaction(string accountId, ConnectHistoricalEnvelopeRepublish connectHistoricalEnvelopeRepublish = null) { ApiResponse localVarResponse = CreateHistoricalEnvelopePublishTransactionWithHttpInfo(accountId, connectHistoricalEnvelopeRepublish); return localVarResponse.Data; } /// /// Submits a batch of historical envelopes for republish to an adhoc config. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// ApiResponse of EnvelopePublishTransaction public ApiResponse CreateHistoricalEnvelopePublishTransactionWithHttpInfo(string accountId, ConnectHistoricalEnvelopeRepublish connectHistoricalEnvelopeRepublish = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateHistoricalEnvelopePublishTransaction"); var localVarPath = "/v2.1/accounts/{accountId}/connect/envelopes/publish/historical"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (connectHistoricalEnvelopeRepublish != null && connectHistoricalEnvelopeRepublish.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(connectHistoricalEnvelopeRepublish); // http body (model) parameter } else { localVarPostBody = connectHistoricalEnvelopeRepublish; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateHistoricalEnvelopePublishTransaction", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopePublishTransaction)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopePublishTransaction))); } /// /// Submits a batch of historical envelopes for republish to an adhoc config. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of EnvelopePublishTransaction public async System.Threading.Tasks.Task CreateHistoricalEnvelopePublishTransactionAsync(string accountId, ConnectHistoricalEnvelopeRepublish connectHistoricalEnvelopeRepublish = null) { ApiResponse localVarResponse = await CreateHistoricalEnvelopePublishTransactionAsyncWithHttpInfo(accountId, connectHistoricalEnvelopeRepublish); return localVarResponse.Data; } /// /// Submits a batch of historical envelopes for republish to an adhoc config. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of ApiResponse (EnvelopePublishTransaction) public async System.Threading.Tasks.Task> CreateHistoricalEnvelopePublishTransactionAsyncWithHttpInfo(string accountId, ConnectHistoricalEnvelopeRepublish connectHistoricalEnvelopeRepublish = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateHistoricalEnvelopePublishTransaction"); var localVarPath = "/v2.1/accounts/{accountId}/connect/envelopes/publish/historical"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (connectHistoricalEnvelopeRepublish != null && connectHistoricalEnvelopeRepublish.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(connectHistoricalEnvelopeRepublish); // http body (model) parameter } else { localVarPostBody = connectHistoricalEnvelopeRepublish; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateHistoricalEnvelopePublishTransaction", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopePublishTransaction)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopePublishTransaction))); } /// /// Lock an envelope. Locks the specified envelope, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the envelope. ###### Note: Users must have envelope locking capability enabled to use this function (userSetting `canLockEnvelopes` must be set to true for the user). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// LockInformation public LockInformation CreateLock(string accountId, string envelopeId, LockRequest lockRequest = null) { ApiResponse localVarResponse = CreateLockWithHttpInfo(accountId, envelopeId, lockRequest); return localVarResponse.Data; } /// /// Lock an envelope. Locks the specified envelope, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the envelope. ###### Note: Users must have envelope locking capability enabled to use this function (userSetting `canLockEnvelopes` must be set to true for the user). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of LockInformation public ApiResponse CreateLockWithHttpInfo(string accountId, string envelopeId, LockRequest lockRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateLock"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateLock"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (lockRequest != null && lockRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(lockRequest); // http body (model) parameter } else { localVarPostBody = lockRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateLock", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (LockInformation)this.ApiClient.Deserialize(localVarResponse, typeof(LockInformation))); } /// /// Lock an envelope. Locks the specified envelope, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the envelope. ###### Note: Users must have envelope locking capability enabled to use this function (userSetting `canLockEnvelopes` must be set to true for the user). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of LockInformation public async System.Threading.Tasks.Task CreateLockAsync(string accountId, string envelopeId, LockRequest lockRequest = null) { ApiResponse localVarResponse = await CreateLockAsyncWithHttpInfo(accountId, envelopeId, lockRequest); return localVarResponse.Data; } /// /// Lock an envelope. Locks the specified envelope, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the envelope. ###### Note: Users must have envelope locking capability enabled to use this function (userSetting `canLockEnvelopes` must be set to true for the user). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (LockInformation) public async System.Threading.Tasks.Task> CreateLockAsyncWithHttpInfo(string accountId, string envelopeId, LockRequest lockRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateLock"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateLock"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (lockRequest != null && lockRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(lockRequest); // http body (model) parameter } else { localVarPostBody = lockRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateLock", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (LockInformation)this.ApiClient.Deserialize(localVarResponse, typeof(LockInformation))); } /// /// Adds one or more recipients to an envelope. Adds one or more recipients to an envelope. For an in process envelope, one that has been sent and has not been completed or voided, an email is sent to a new recipient when they are reached in the routing order. If the new recipient's routing order is before or the same as the envelope's next recipient, an email is only sent if the optional `resend_envelope` query string is set to **true**. /// public class CreateRecipientOptions { /// When set to **true**, resends the envelope if the new recipient's routing order is before or the same as the envelope's next recipient. public string resendEnvelope {get; set;} } /// /// Adds one or more recipients to an envelope. Adds one or more recipients to an envelope. For an in process envelope, one that has been sent and has not been completed or voided, an email is sent to a new recipient when they are reached in the routing order. If the new recipient's routing order is before or the same as the envelope's next recipient, an email is only sent if the optional `resend_envelope` query string is set to **true**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Recipients public Recipients CreateRecipient(string accountId, string envelopeId, Recipients recipients = null, EnvelopesApi.CreateRecipientOptions options = null) { ApiResponse localVarResponse = CreateRecipientWithHttpInfo(accountId, envelopeId, recipients, options); return localVarResponse.Data; } /// /// Adds one or more recipients to an envelope. Adds one or more recipients to an envelope. For an in process envelope, one that has been sent and has not been completed or voided, an email is sent to a new recipient when they are reached in the routing order. If the new recipient's routing order is before or the same as the envelope's next recipient, an email is only sent if the optional `resend_envelope` query string is set to **true**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// ApiResponse of Recipients public ApiResponse CreateRecipientWithHttpInfo(string accountId, string envelopeId, Recipients recipients = null, EnvelopesApi.CreateRecipientOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateRecipient"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateRecipient"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.resendEnvelope != null) localVarQueryParams.Add("resend_envelope", this.ApiClient.ParameterToString(options.resendEnvelope)); // query parameter } if (recipients != null && recipients.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(recipients); // http body (model) parameter } else { localVarPostBody = recipients; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateRecipient", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Recipients)this.ApiClient.Deserialize(localVarResponse, typeof(Recipients))); } /// /// Adds one or more recipients to an envelope. Adds one or more recipients to an envelope. For an in process envelope, one that has been sent and has not been completed or voided, an email is sent to a new recipient when they are reached in the routing order. If the new recipient's routing order is before or the same as the envelope's next recipient, an email is only sent if the optional `resend_envelope` query string is set to **true**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of Recipients public async System.Threading.Tasks.Task CreateRecipientAsync(string accountId, string envelopeId, Recipients recipients = null, EnvelopesApi.CreateRecipientOptions options = null) { ApiResponse localVarResponse = await CreateRecipientAsyncWithHttpInfo(accountId, envelopeId, recipients, options); return localVarResponse.Data; } /// /// Adds one or more recipients to an envelope. Adds one or more recipients to an envelope. For an in process envelope, one that has been sent and has not been completed or voided, an email is sent to a new recipient when they are reached in the routing order. If the new recipient's routing order is before or the same as the envelope's next recipient, an email is only sent if the optional `resend_envelope` query string is set to **true**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of ApiResponse (Recipients) public async System.Threading.Tasks.Task> CreateRecipientAsyncWithHttpInfo(string accountId, string envelopeId, Recipients recipients = null, EnvelopesApi.CreateRecipientOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateRecipient"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateRecipient"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.resendEnvelope != null) localVarQueryParams.Add("resend_envelope", this.ApiClient.ParameterToString(options.resendEnvelope)); // query parameter } if (recipients != null && recipients.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(recipients); // http body (model) parameter } else { localVarPostBody = recipients; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateRecipient", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Recipients)this.ApiClient.Deserialize(localVarResponse, typeof(Recipients))); } /// /// Provides a link to access the Identity manual review related to a recipient. This method returns the URL of the page that allows a sender to [manually review](https://support.docusign.com/en/guides/ndse-user-guide-send-documents-with-id-verification) the ID of a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// ViewUrl public ViewUrl CreateRecipientManualReviewView(string accountId, string envelopeId, string recipientId) { ApiResponse localVarResponse = CreateRecipientManualReviewViewWithHttpInfo(accountId, envelopeId, recipientId); return localVarResponse.Data; } /// /// Provides a link to access the Identity manual review related to a recipient. This method returns the URL of the page that allows a sender to [manually review](https://support.docusign.com/en/guides/ndse-user-guide-send-documents-with-id-verification) the ID of a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// ApiResponse of ViewUrl public ApiResponse CreateRecipientManualReviewViewWithHttpInfo(string accountId, string envelopeId, string recipientId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateRecipientManualReviewView"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateRecipientManualReviewView"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->CreateRecipientManualReviewView"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/views/identity_manual_review"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateRecipientManualReviewView", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ViewUrl)this.ApiClient.Deserialize(localVarResponse, typeof(ViewUrl))); } /// /// Provides a link to access the Identity manual review related to a recipient. This method returns the URL of the page that allows a sender to [manually review](https://support.docusign.com/en/guides/ndse-user-guide-send-documents-with-id-verification) the ID of a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of ViewUrl public async System.Threading.Tasks.Task CreateRecipientManualReviewViewAsync(string accountId, string envelopeId, string recipientId) { ApiResponse localVarResponse = await CreateRecipientManualReviewViewAsyncWithHttpInfo(accountId, envelopeId, recipientId); return localVarResponse.Data; } /// /// Provides a link to access the Identity manual review related to a recipient. This method returns the URL of the page that allows a sender to [manually review](https://support.docusign.com/en/guides/ndse-user-guide-send-documents-with-id-verification) the ID of a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of ApiResponse (ViewUrl) public async System.Threading.Tasks.Task> CreateRecipientManualReviewViewAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateRecipientManualReviewView"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateRecipientManualReviewView"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->CreateRecipientManualReviewView"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/views/identity_manual_review"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateRecipientManualReviewView", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ViewUrl)this.ApiClient.Deserialize(localVarResponse, typeof(ViewUrl))); } /// /// Returns a link to access to the identity events stored in the proof service related to this recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// IdEvidenceViewLink public IdEvidenceViewLink CreateRecipientProofFileLink(string accountId, string envelopeId, string recipientId) { ApiResponse localVarResponse = CreateRecipientProofFileLinkWithHttpInfo(accountId, envelopeId, recipientId); return localVarResponse.Data; } /// /// Returns a link to access to the identity events stored in the proof service related to this recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// ApiResponse of IdEvidenceViewLink public ApiResponse CreateRecipientProofFileLinkWithHttpInfo(string accountId, string envelopeId, string recipientId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateRecipientProofFileLink"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateRecipientProofFileLink"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->CreateRecipientProofFileLink"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/identity_proof"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateRecipientProofFileLink", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (IdEvidenceViewLink)this.ApiClient.Deserialize(localVarResponse, typeof(IdEvidenceViewLink))); } /// /// Returns a link to access to the identity events stored in the proof service related to this recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of IdEvidenceViewLink public async System.Threading.Tasks.Task CreateRecipientProofFileLinkAsync(string accountId, string envelopeId, string recipientId) { ApiResponse localVarResponse = await CreateRecipientProofFileLinkAsyncWithHttpInfo(accountId, envelopeId, recipientId); return localVarResponse.Data; } /// /// Returns a link to access to the identity events stored in the proof service related to this recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of ApiResponse (IdEvidenceViewLink) public async System.Threading.Tasks.Task> CreateRecipientProofFileLinkAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateRecipientProofFileLink"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateRecipientProofFileLink"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->CreateRecipientProofFileLink"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/identity_proof"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateRecipientProofFileLink", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (IdEvidenceViewLink)this.ApiClient.Deserialize(localVarResponse, typeof(IdEvidenceViewLink))); } /// /// Returns a resource token to get access to the identity events stored in the proof service related to this recipient. Creates a resource token for a sender. This token allows a sender to return identification data for a recipient using the [ID Evidence API](/docs/idevidence-api/). /// public class CreateRecipientProofFileResourceTokenOptions { /// public string tokenScopes {get; set;} } /// /// Returns a resource token to get access to the identity events stored in the proof service related to this recipient. Creates a resource token for a sender. This token allows a sender to return identification data for a recipient using the [ID Evidence API](/docs/idevidence-api/). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// IdEvidenceResourceToken public IdEvidenceResourceToken CreateRecipientProofFileResourceToken(string accountId, string envelopeId, string recipientId, EnvelopesApi.CreateRecipientProofFileResourceTokenOptions options = null) { ApiResponse localVarResponse = CreateRecipientProofFileResourceTokenWithHttpInfo(accountId, envelopeId, recipientId, options); return localVarResponse.Data; } /// /// Returns a resource token to get access to the identity events stored in the proof service related to this recipient. Creates a resource token for a sender. This token allows a sender to return identification data for a recipient using the [ID Evidence API](/docs/idevidence-api/). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of IdEvidenceResourceToken public ApiResponse CreateRecipientProofFileResourceTokenWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.CreateRecipientProofFileResourceTokenOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateRecipientProofFileResourceToken"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateRecipientProofFileResourceToken"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->CreateRecipientProofFileResourceToken"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/identity_proof_token"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (options != null) { if (options.tokenScopes != null) localVarQueryParams.Add("token_scopes", this.ApiClient.ParameterToString(options.tokenScopes)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateRecipientProofFileResourceToken", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (IdEvidenceResourceToken)this.ApiClient.Deserialize(localVarResponse, typeof(IdEvidenceResourceToken))); } /// /// Returns a resource token to get access to the identity events stored in the proof service related to this recipient. Creates a resource token for a sender. This token allows a sender to return identification data for a recipient using the [ID Evidence API](/docs/idevidence-api/). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of IdEvidenceResourceToken public async System.Threading.Tasks.Task CreateRecipientProofFileResourceTokenAsync(string accountId, string envelopeId, string recipientId, EnvelopesApi.CreateRecipientProofFileResourceTokenOptions options = null) { ApiResponse localVarResponse = await CreateRecipientProofFileResourceTokenAsyncWithHttpInfo(accountId, envelopeId, recipientId, options); return localVarResponse.Data; } /// /// Returns a resource token to get access to the identity events stored in the proof service related to this recipient. Creates a resource token for a sender. This token allows a sender to return identification data for a recipient using the [ID Evidence API](/docs/idevidence-api/). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (IdEvidenceResourceToken) public async System.Threading.Tasks.Task> CreateRecipientProofFileResourceTokenAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.CreateRecipientProofFileResourceTokenOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateRecipientProofFileResourceToken"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateRecipientProofFileResourceToken"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->CreateRecipientProofFileResourceToken"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/identity_proof_token"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (options != null) { if (options.tokenScopes != null) localVarQueryParams.Add("token_scopes", this.ApiClient.ParameterToString(options.tokenScopes)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateRecipientProofFileResourceToken", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (IdEvidenceResourceToken)this.ApiClient.Deserialize(localVarResponse, typeof(IdEvidenceResourceToken))); } /// /// Returns a URL to the recipient view UI. Returns a URL that allows you to embed the recipient view of the DocuSign UI in your applications. This call cannot be used to view draft envelopes, since those envelopes have not been sent. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. An entry is added into the Security Level section of the DocuSign Certificate of Completion that reflects the `securityDomain` and `authenticationMethod` properties used to verify the user identity. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ViewUrl public ViewUrl CreateRecipientView(string accountId, string envelopeId, RecipientViewRequest recipientViewRequest = null) { ApiResponse localVarResponse = CreateRecipientViewWithHttpInfo(accountId, envelopeId, recipientViewRequest); return localVarResponse.Data; } /// /// Returns a URL to the recipient view UI. Returns a URL that allows you to embed the recipient view of the DocuSign UI in your applications. This call cannot be used to view draft envelopes, since those envelopes have not been sent. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. An entry is added into the Security Level section of the DocuSign Certificate of Completion that reflects the `securityDomain` and `authenticationMethod` properties used to verify the user identity. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ViewUrl public ApiResponse CreateRecipientViewWithHttpInfo(string accountId, string envelopeId, RecipientViewRequest recipientViewRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateRecipientView"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateRecipientView"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientViewRequest != null && recipientViewRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(recipientViewRequest); // http body (model) parameter } else { localVarPostBody = recipientViewRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateRecipientView", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ViewUrl)this.ApiClient.Deserialize(localVarResponse, typeof(ViewUrl))); } /// /// Returns a URL to the recipient view UI. Returns a URL that allows you to embed the recipient view of the DocuSign UI in your applications. This call cannot be used to view draft envelopes, since those envelopes have not been sent. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. An entry is added into the Security Level section of the DocuSign Certificate of Completion that reflects the `securityDomain` and `authenticationMethod` properties used to verify the user identity. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ViewUrl public async System.Threading.Tasks.Task CreateRecipientViewAsync(string accountId, string envelopeId, RecipientViewRequest recipientViewRequest = null) { ApiResponse localVarResponse = await CreateRecipientViewAsyncWithHttpInfo(accountId, envelopeId, recipientViewRequest); return localVarResponse.Data; } /// /// Returns a URL to the recipient view UI. Returns a URL that allows you to embed the recipient view of the DocuSign UI in your applications. This call cannot be used to view draft envelopes, since those envelopes have not been sent. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. An entry is added into the Security Level section of the DocuSign Certificate of Completion that reflects the `securityDomain` and `authenticationMethod` properties used to verify the user identity. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (ViewUrl) public async System.Threading.Tasks.Task> CreateRecipientViewAsyncWithHttpInfo(string accountId, string envelopeId, RecipientViewRequest recipientViewRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateRecipientView"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateRecipientView"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientViewRequest != null && recipientViewRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(recipientViewRequest); // http body (model) parameter } else { localVarPostBody = recipientViewRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateRecipientView", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ViewUrl)this.ApiClient.Deserialize(localVarResponse, typeof(ViewUrl))); } /// /// Get Responsive HTML Preview for all documents in an envelope. Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents in an envelope. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// DocumentHtmlDefinitions public DocumentHtmlDefinitions CreateResponsiveHtmlPreview(string accountId, string envelopeId, DocumentHtmlDefinition documentHtmlDefinition = null) { ApiResponse localVarResponse = CreateResponsiveHtmlPreviewWithHttpInfo(accountId, envelopeId, documentHtmlDefinition); return localVarResponse.Data; } /// /// Get Responsive HTML Preview for all documents in an envelope. Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents in an envelope. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of DocumentHtmlDefinitions public ApiResponse CreateResponsiveHtmlPreviewWithHttpInfo(string accountId, string envelopeId, DocumentHtmlDefinition documentHtmlDefinition = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateResponsiveHtmlPreview"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateResponsiveHtmlPreview"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/responsive_html_preview"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentHtmlDefinition != null && documentHtmlDefinition.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentHtmlDefinition); // http body (model) parameter } else { localVarPostBody = documentHtmlDefinition; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateResponsiveHtmlPreview", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentHtmlDefinitions)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentHtmlDefinitions))); } /// /// Get Responsive HTML Preview for all documents in an envelope. Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents in an envelope. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of DocumentHtmlDefinitions public async System.Threading.Tasks.Task CreateResponsiveHtmlPreviewAsync(string accountId, string envelopeId, DocumentHtmlDefinition documentHtmlDefinition = null) { ApiResponse localVarResponse = await CreateResponsiveHtmlPreviewAsyncWithHttpInfo(accountId, envelopeId, documentHtmlDefinition); return localVarResponse.Data; } /// /// Get Responsive HTML Preview for all documents in an envelope. Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents in an envelope. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (DocumentHtmlDefinitions) public async System.Threading.Tasks.Task> CreateResponsiveHtmlPreviewAsyncWithHttpInfo(string accountId, string envelopeId, DocumentHtmlDefinition documentHtmlDefinition = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateResponsiveHtmlPreview"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateResponsiveHtmlPreview"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/responsive_html_preview"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentHtmlDefinition != null && documentHtmlDefinition.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentHtmlDefinition); // http body (model) parameter } else { localVarPostBody = documentHtmlDefinition; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateResponsiveHtmlPreview", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentHtmlDefinitions)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentHtmlDefinitions))); } /// /// Returns a URL to the sender view UI. Returns a URL that allows you to embed the sender view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign sending view. Upon sending completion, the user is returned to the return URL provided by the API application. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ViewUrl public ViewUrl CreateSenderView(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null) { ApiResponse localVarResponse = CreateSenderViewWithHttpInfo(accountId, envelopeId, envelopeViewRequest); return localVarResponse.Data; } /// /// Returns a URL to the sender view UI. Returns a URL that allows you to embed the sender view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign sending view. Upon sending completion, the user is returned to the return URL provided by the API application. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ViewUrl public ApiResponse CreateSenderViewWithHttpInfo(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateSenderView"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateSenderView"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/sender"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (envelopeViewRequest != null && envelopeViewRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeViewRequest); // http body (model) parameter } else { localVarPostBody = envelopeViewRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateSenderView", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ViewUrl)this.ApiClient.Deserialize(localVarResponse, typeof(ViewUrl))); } /// /// Returns a URL to the sender view UI. Returns a URL that allows you to embed the sender view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign sending view. Upon sending completion, the user is returned to the return URL provided by the API application. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ViewUrl public async System.Threading.Tasks.Task CreateSenderViewAsync(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null) { ApiResponse localVarResponse = await CreateSenderViewAsyncWithHttpInfo(accountId, envelopeId, envelopeViewRequest); return localVarResponse.Data; } /// /// Returns a URL to the sender view UI. Returns a URL that allows you to embed the sender view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign sending view. Upon sending completion, the user is returned to the return URL provided by the API application. Important: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (ViewUrl) public async System.Threading.Tasks.Task> CreateSenderViewAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopeViewRequest envelopeViewRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateSenderView"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateSenderView"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/sender"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (envelopeViewRequest != null && envelopeViewRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeViewRequest); // http body (model) parameter } else { localVarPostBody = envelopeViewRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateSenderView", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ViewUrl)this.ApiClient.Deserialize(localVarResponse, typeof(ViewUrl))); } /// /// Adds tabs for a recipient. Adds one or more tabs for a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Tabs public Tabs CreateTabs(string accountId, string envelopeId, string recipientId, Tabs tabs = null) { ApiResponse localVarResponse = CreateTabsWithHttpInfo(accountId, envelopeId, recipientId, tabs); return localVarResponse.Data; } /// /// Adds tabs for a recipient. Adds one or more tabs for a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// ApiResponse of Tabs public ApiResponse CreateTabsWithHttpInfo(string accountId, string envelopeId, string recipientId, Tabs tabs = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateTabs"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->CreateTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (tabs != null && tabs.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(tabs); // http body (model) parameter } else { localVarPostBody = tabs; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Adds tabs for a recipient. Adds one or more tabs for a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of Tabs public async System.Threading.Tasks.Task CreateTabsAsync(string accountId, string envelopeId, string recipientId, Tabs tabs = null) { ApiResponse localVarResponse = await CreateTabsAsyncWithHttpInfo(accountId, envelopeId, recipientId, tabs); return localVarResponse.Data; } /// /// Adds tabs for a recipient. Adds one or more tabs for a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of ApiResponse (Tabs) public async System.Threading.Tasks.Task> CreateTabsAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, Tabs tabs = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->CreateTabs"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->CreateTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (tabs != null && tabs.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(tabs); // http body (model) parameter } else { localVarPostBody = tabs; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Creates and adds a new workflow step definition for a template's workflow /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// WorkflowStep public WorkflowStep CreateTemplateWorkflowStepDefinition(string accountId, string templateId, WorkflowStep workflowStep = null) { ApiResponse localVarResponse = CreateTemplateWorkflowStepDefinitionWithHttpInfo(accountId, templateId, workflowStep); return localVarResponse.Data; } /// /// Creates and adds a new workflow step definition for a template's workflow /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// ApiResponse of WorkflowStep public ApiResponse CreateTemplateWorkflowStepDefinitionWithHttpInfo(string accountId, string templateId, WorkflowStep workflowStep = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateTemplateWorkflowStepDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->CreateTemplateWorkflowStepDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/steps"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (workflowStep != null && workflowStep.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(workflowStep); // http body (model) parameter } else { localVarPostBody = workflowStep; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateTemplateWorkflowStepDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (WorkflowStep)this.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStep))); } /// /// Creates and adds a new workflow step definition for a template's workflow /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Task of WorkflowStep public async System.Threading.Tasks.Task CreateTemplateWorkflowStepDefinitionAsync(string accountId, string templateId, WorkflowStep workflowStep = null) { ApiResponse localVarResponse = await CreateTemplateWorkflowStepDefinitionAsyncWithHttpInfo(accountId, templateId, workflowStep); return localVarResponse.Data; } /// /// Creates and adds a new workflow step definition for a template's workflow /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Task of ApiResponse (WorkflowStep) public async System.Threading.Tasks.Task> CreateTemplateWorkflowStepDefinitionAsyncWithHttpInfo(string accountId, string templateId, WorkflowStep workflowStep = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->CreateTemplateWorkflowStepDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->CreateTemplateWorkflowStepDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/steps"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (workflowStep != null && workflowStep.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(workflowStep); // http body (model) parameter } else { localVarPostBody = workflowStep; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("POST"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CreateTemplateWorkflowStepDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (WorkflowStep)this.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStep))); } /// /// Delete one or more attachments from a DRAFT envelope. Deletes one or more attachments from a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// EnvelopeAttachmentsResult public EnvelopeAttachmentsResult DeleteAttachments(string accountId, string envelopeId, EnvelopeAttachmentsRequest envelopeAttachmentsRequest = null) { ApiResponse localVarResponse = DeleteAttachmentsWithHttpInfo(accountId, envelopeId, envelopeAttachmentsRequest); return localVarResponse.Data; } /// /// Delete one or more attachments from a DRAFT envelope. Deletes one or more attachments from a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of EnvelopeAttachmentsResult public ApiResponse DeleteAttachmentsWithHttpInfo(string accountId, string envelopeId, EnvelopeAttachmentsRequest envelopeAttachmentsRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteAttachments"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteAttachments"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (envelopeAttachmentsRequest != null && envelopeAttachmentsRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeAttachmentsRequest); // http body (model) parameter } else { localVarPostBody = envelopeAttachmentsRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteAttachments", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeAttachmentsResult)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeAttachmentsResult))); } /// /// Delete one or more attachments from a DRAFT envelope. Deletes one or more attachments from a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of EnvelopeAttachmentsResult public async System.Threading.Tasks.Task DeleteAttachmentsAsync(string accountId, string envelopeId, EnvelopeAttachmentsRequest envelopeAttachmentsRequest = null) { ApiResponse localVarResponse = await DeleteAttachmentsAsyncWithHttpInfo(accountId, envelopeId, envelopeAttachmentsRequest); return localVarResponse.Data; } /// /// Delete one or more attachments from a DRAFT envelope. Deletes one or more attachments from a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (EnvelopeAttachmentsResult) public async System.Threading.Tasks.Task> DeleteAttachmentsAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopeAttachmentsRequest envelopeAttachmentsRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteAttachments"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteAttachments"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (envelopeAttachmentsRequest != null && envelopeAttachmentsRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeAttachmentsRequest); // http body (model) parameter } else { localVarPostBody = envelopeAttachmentsRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteAttachments", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeAttachmentsResult)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeAttachmentsResult))); } /// /// Delete an existing ChunkedUpload. Deletes a chunked upload that has been committed but not yet consumed. This method cannot be used to delete the following types of chunked uploads, which the system deletes automatically: - Chunked uploads that have been consumed by use in another API call. - Expired chunked uploads. **Note:** If you are aware of a chunked upload that can be discarded, the best practice is to explicitly delete it. If you wait for the system to automatically delete it after it expires, the chunked upload will continue to count against your quota. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// ChunkedUploadResponse public ChunkedUploadResponse DeleteChunkedUpload(string accountId, string chunkedUploadId) { ApiResponse localVarResponse = DeleteChunkedUploadWithHttpInfo(accountId, chunkedUploadId); return localVarResponse.Data; } /// /// Delete an existing ChunkedUpload. Deletes a chunked upload that has been committed but not yet consumed. This method cannot be used to delete the following types of chunked uploads, which the system deletes automatically: - Chunked uploads that have been consumed by use in another API call. - Expired chunked uploads. **Note:** If you are aware of a chunked upload that can be discarded, the best practice is to explicitly delete it. If you wait for the system to automatically delete it after it expires, the chunked upload will continue to count against your quota. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// ApiResponse of ChunkedUploadResponse public ApiResponse DeleteChunkedUploadWithHttpInfo(string accountId, string chunkedUploadId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteChunkedUpload"); // verify the required parameter 'chunkedUploadId' is set if (chunkedUploadId == null) throw new ApiException(400, "Missing required parameter 'chunkedUploadId' when calling EnvelopesApi->DeleteChunkedUpload"); var localVarPath = "/v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (chunkedUploadId != null) localVarPathParams.Add("chunkedUploadId", this.ApiClient.ParameterToString(chunkedUploadId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteChunkedUpload", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ChunkedUploadResponse)this.ApiClient.Deserialize(localVarResponse, typeof(ChunkedUploadResponse))); } /// /// Delete an existing ChunkedUpload. Deletes a chunked upload that has been committed but not yet consumed. This method cannot be used to delete the following types of chunked uploads, which the system deletes automatically: - Chunked uploads that have been consumed by use in another API call. - Expired chunked uploads. **Note:** If you are aware of a chunked upload that can be discarded, the best practice is to explicitly delete it. If you wait for the system to automatically delete it after it expires, the chunked upload will continue to count against your quota. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Task of ChunkedUploadResponse public async System.Threading.Tasks.Task DeleteChunkedUploadAsync(string accountId, string chunkedUploadId) { ApiResponse localVarResponse = await DeleteChunkedUploadAsyncWithHttpInfo(accountId, chunkedUploadId); return localVarResponse.Data; } /// /// Delete an existing ChunkedUpload. Deletes a chunked upload that has been committed but not yet consumed. This method cannot be used to delete the following types of chunked uploads, which the system deletes automatically: - Chunked uploads that have been consumed by use in another API call. - Expired chunked uploads. **Note:** If you are aware of a chunked upload that can be discarded, the best practice is to explicitly delete it. If you wait for the system to automatically delete it after it expires, the chunked upload will continue to count against your quota. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Task of ApiResponse (ChunkedUploadResponse) public async System.Threading.Tasks.Task> DeleteChunkedUploadAsyncWithHttpInfo(string accountId, string chunkedUploadId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteChunkedUpload"); // verify the required parameter 'chunkedUploadId' is set if (chunkedUploadId == null) throw new ApiException(400, "Missing required parameter 'chunkedUploadId' when calling EnvelopesApi->DeleteChunkedUpload"); var localVarPath = "/v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (chunkedUploadId != null) localVarPathParams.Add("chunkedUploadId", this.ApiClient.ParameterToString(chunkedUploadId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteChunkedUpload", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ChunkedUploadResponse)this.ApiClient.Deserialize(localVarResponse, typeof(ChunkedUploadResponse))); } /// /// Deletes envelope custom fields for draft and in-process envelopes. Deletes envelope custom fields for draft and in-process envelopes. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// CustomFields public CustomFields DeleteCustomFields(string accountId, string envelopeId, CustomFields customFields = null) { ApiResponse localVarResponse = DeleteCustomFieldsWithHttpInfo(accountId, envelopeId, customFields); return localVarResponse.Data; } /// /// Deletes envelope custom fields for draft and in-process envelopes. Deletes envelope custom fields for draft and in-process envelopes. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of CustomFields public ApiResponse DeleteCustomFieldsWithHttpInfo(string accountId, string envelopeId, CustomFields customFields = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteCustomFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteCustomFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (customFields != null && customFields.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(customFields); // http body (model) parameter } else { localVarPostBody = customFields; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteCustomFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (CustomFields)this.ApiClient.Deserialize(localVarResponse, typeof(CustomFields))); } /// /// Deletes envelope custom fields for draft and in-process envelopes. Deletes envelope custom fields for draft and in-process envelopes. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of CustomFields public async System.Threading.Tasks.Task DeleteCustomFieldsAsync(string accountId, string envelopeId, CustomFields customFields = null) { ApiResponse localVarResponse = await DeleteCustomFieldsAsyncWithHttpInfo(accountId, envelopeId, customFields); return localVarResponse.Data; } /// /// Deletes envelope custom fields for draft and in-process envelopes. Deletes envelope custom fields for draft and in-process envelopes. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (CustomFields) public async System.Threading.Tasks.Task> DeleteCustomFieldsAsyncWithHttpInfo(string accountId, string envelopeId, CustomFields customFields = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteCustomFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteCustomFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (customFields != null && customFields.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(customFields); // http body (model) parameter } else { localVarPostBody = customFields; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteCustomFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (CustomFields)this.ApiClient.Deserialize(localVarResponse, typeof(CustomFields))); } /// /// Deletes custom document fields from an existing envelope document. Deletes custom document fields from an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// DocumentFieldsInformation public DocumentFieldsInformation DeleteDocumentFields(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null) { ApiResponse localVarResponse = DeleteDocumentFieldsWithHttpInfo(accountId, envelopeId, documentId, documentFieldsInformation); return localVarResponse.Data; } /// /// Deletes custom document fields from an existing envelope document. Deletes custom document fields from an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// ApiResponse of DocumentFieldsInformation public ApiResponse DeleteDocumentFieldsWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteDocumentFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteDocumentFields"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->DeleteDocumentFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (documentFieldsInformation != null && documentFieldsInformation.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentFieldsInformation); // http body (model) parameter } else { localVarPostBody = documentFieldsInformation; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteDocumentFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentFieldsInformation)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentFieldsInformation))); } /// /// Deletes custom document fields from an existing envelope document. Deletes custom document fields from an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of DocumentFieldsInformation public async System.Threading.Tasks.Task DeleteDocumentFieldsAsync(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null) { ApiResponse localVarResponse = await DeleteDocumentFieldsAsyncWithHttpInfo(accountId, envelopeId, documentId, documentFieldsInformation); return localVarResponse.Data; } /// /// Deletes custom document fields from an existing envelope document. Deletes custom document fields from an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of ApiResponse (DocumentFieldsInformation) public async System.Threading.Tasks.Task> DeleteDocumentFieldsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteDocumentFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteDocumentFields"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->DeleteDocumentFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (documentFieldsInformation != null && documentFieldsInformation.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentFieldsInformation); // http body (model) parameter } else { localVarPostBody = documentFieldsInformation; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteDocumentFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentFieldsInformation)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentFieldsInformation))); } /// /// Deletes a page from a document in an envelope. Deletes a page from a document in an envelope based on the page number. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// public void DeleteDocumentPage(string accountId, string envelopeId, string documentId, string pageNumber) { DeleteDocumentPageWithHttpInfo(accountId, envelopeId, documentId, pageNumber); } /// /// Deletes a page from a document in an envelope. Deletes a page from a document in an envelope based on the page number. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// ApiResponse of Object(void) public ApiResponse DeleteDocumentPageWithHttpInfo(string accountId, string envelopeId, string documentId, string pageNumber) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteDocumentPage"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteDocumentPage"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->DeleteDocumentPage"); // verify the required parameter 'pageNumber' is set if (pageNumber == null) throw new ApiException(400, "Missing required parameter 'pageNumber' when calling EnvelopesApi->DeleteDocumentPage"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages/{pageNumber}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (pageNumber != null) localVarPathParams.Add("pageNumber", this.ApiClient.ParameterToString(pageNumber)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteDocumentPage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Deletes a page from a document in an envelope. Deletes a page from a document in an envelope based on the page number. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Task of void public async System.Threading.Tasks.Task DeleteDocumentPageAsync(string accountId, string envelopeId, string documentId, string pageNumber) { await DeleteDocumentPageAsyncWithHttpInfo(accountId, envelopeId, documentId, pageNumber); } /// /// Deletes a page from a document in an envelope. Deletes a page from a document in an envelope based on the page number. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteDocumentPageAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, string pageNumber) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteDocumentPage"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteDocumentPage"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->DeleteDocumentPage"); // verify the required parameter 'pageNumber' is set if (pageNumber == null) throw new ApiException(400, "Missing required parameter 'pageNumber' when calling EnvelopesApi->DeleteDocumentPage"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages/{pageNumber}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (pageNumber != null) localVarPathParams.Add("pageNumber", this.ApiClient.ParameterToString(pageNumber)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteDocumentPage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Deletes tabs from an envelope document Deletes tabs from the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Tabs public Tabs DeleteDocumentTabs(string accountId, string envelopeId, string documentId, Tabs tabs = null) { ApiResponse localVarResponse = DeleteDocumentTabsWithHttpInfo(accountId, envelopeId, documentId, tabs); return localVarResponse.Data; } /// /// Deletes tabs from an envelope document Deletes tabs from the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// ApiResponse of Tabs public ApiResponse DeleteDocumentTabsWithHttpInfo(string accountId, string envelopeId, string documentId, Tabs tabs = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteDocumentTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteDocumentTabs"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->DeleteDocumentTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (tabs != null && tabs.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(tabs); // http body (model) parameter } else { localVarPostBody = tabs; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteDocumentTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Deletes tabs from an envelope document Deletes tabs from the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of Tabs public async System.Threading.Tasks.Task DeleteDocumentTabsAsync(string accountId, string envelopeId, string documentId, Tabs tabs = null) { ApiResponse localVarResponse = await DeleteDocumentTabsAsyncWithHttpInfo(accountId, envelopeId, documentId, tabs); return localVarResponse.Data; } /// /// Deletes tabs from an envelope document Deletes tabs from the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of ApiResponse (Tabs) public async System.Threading.Tasks.Task> DeleteDocumentTabsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, Tabs tabs = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteDocumentTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteDocumentTabs"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->DeleteDocumentTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (tabs != null && tabs.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(tabs); // http body (model) parameter } else { localVarPostBody = tabs; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteDocumentTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Deletes documents from a draft envelope. Deletes one or more documents from an existing draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// EnvelopeDocumentsResult public EnvelopeDocumentsResult DeleteDocuments(string accountId, string envelopeId, EnvelopeDefinition envelopeDefinition = null) { ApiResponse localVarResponse = DeleteDocumentsWithHttpInfo(accountId, envelopeId, envelopeDefinition); return localVarResponse.Data; } /// /// Deletes documents from a draft envelope. Deletes one or more documents from an existing draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of EnvelopeDocumentsResult public ApiResponse DeleteDocumentsWithHttpInfo(string accountId, string envelopeId, EnvelopeDefinition envelopeDefinition = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteDocuments"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteDocuments"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (envelopeDefinition != null && envelopeDefinition.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeDefinition); // http body (model) parameter } else { localVarPostBody = envelopeDefinition; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteDocuments", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeDocumentsResult)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeDocumentsResult))); } /// /// Deletes documents from a draft envelope. Deletes one or more documents from an existing draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of EnvelopeDocumentsResult public async System.Threading.Tasks.Task DeleteDocumentsAsync(string accountId, string envelopeId, EnvelopeDefinition envelopeDefinition = null) { ApiResponse localVarResponse = await DeleteDocumentsAsyncWithHttpInfo(accountId, envelopeId, envelopeDefinition); return localVarResponse.Data; } /// /// Deletes documents from a draft envelope. Deletes one or more documents from an existing draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (EnvelopeDocumentsResult) public async System.Threading.Tasks.Task> DeleteDocumentsAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopeDefinition envelopeDefinition = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteDocuments"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteDocuments"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (envelopeDefinition != null && envelopeDefinition.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeDefinition); // http body (model) parameter } else { localVarPostBody = envelopeDefinition; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteDocuments", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeDocumentsResult)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeDocumentsResult))); } /// /// Deletes the email setting overrides for an envelope. Deletes all existing email override settings for the envelope. If you want to delete an individual email override setting, use the PUT and set the value to an empty string. Note that deleting email settings will only affect email communications that occur after the deletion and the normal account email settings are used for future email communications. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// EmailSettings public EmailSettings DeleteEmailSettings(string accountId, string envelopeId) { ApiResponse localVarResponse = DeleteEmailSettingsWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Deletes the email setting overrides for an envelope. Deletes all existing email override settings for the envelope. If you want to delete an individual email override setting, use the PUT and set the value to an empty string. Note that deleting email settings will only affect email communications that occur after the deletion and the normal account email settings are used for future email communications. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of EmailSettings public ApiResponse DeleteEmailSettingsWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteEmailSettings"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteEmailSettings"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/email_settings"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteEmailSettings", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EmailSettings)this.ApiClient.Deserialize(localVarResponse, typeof(EmailSettings))); } /// /// Deletes the email setting overrides for an envelope. Deletes all existing email override settings for the envelope. If you want to delete an individual email override setting, use the PUT and set the value to an empty string. Note that deleting email settings will only affect email communications that occur after the deletion and the normal account email settings are used for future email communications. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of EmailSettings public async System.Threading.Tasks.Task DeleteEmailSettingsAsync(string accountId, string envelopeId) { ApiResponse localVarResponse = await DeleteEmailSettingsAsyncWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Deletes the email setting overrides for an envelope. Deletes all existing email override settings for the envelope. If you want to delete an individual email override setting, use the PUT and set the value to an empty string. Note that deleting email settings will only affect email communications that occur after the deletion and the normal account email settings are used for future email communications. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (EmailSettings) public async System.Threading.Tasks.Task> DeleteEmailSettingsAsyncWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteEmailSettings"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteEmailSettings"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/email_settings"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteEmailSettings", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EmailSettings)this.ApiClient.Deserialize(localVarResponse, typeof(EmailSettings))); } /// /// Revokes the correction view URL to the Envelope UI Revokes the correction view URL to the Envelope UI. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// public void DeleteEnvelopeCorrectView(string accountId, string envelopeId, CorrectViewRequest correctViewRequest = null) { DeleteEnvelopeCorrectViewWithHttpInfo(accountId, envelopeId, correctViewRequest); } /// /// Revokes the correction view URL to the Envelope UI Revokes the correction view URL to the Envelope UI. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of Object(void) public ApiResponse DeleteEnvelopeCorrectViewWithHttpInfo(string accountId, string envelopeId, CorrectViewRequest correctViewRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteEnvelopeCorrectView"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteEnvelopeCorrectView"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/correct"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (correctViewRequest != null && correctViewRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(correctViewRequest); // http body (model) parameter } else { localVarPostBody = correctViewRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteEnvelopeCorrectView", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Revokes the correction view URL to the Envelope UI Revokes the correction view URL to the Envelope UI. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of void public async System.Threading.Tasks.Task DeleteEnvelopeCorrectViewAsync(string accountId, string envelopeId, CorrectViewRequest correctViewRequest = null) { await DeleteEnvelopeCorrectViewAsyncWithHttpInfo(accountId, envelopeId, correctViewRequest); } /// /// Revokes the correction view URL to the Envelope UI Revokes the correction view URL to the Envelope UI. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteEnvelopeCorrectViewAsyncWithHttpInfo(string accountId, string envelopeId, CorrectViewRequest correctViewRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteEnvelopeCorrectView"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteEnvelopeCorrectView"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/correct"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (correctViewRequest != null && correctViewRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(correctViewRequest); // http body (model) parameter } else { localVarPostBody = correctViewRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteEnvelopeCorrectView", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Deletes the delayed routing rules for the specified envelope workflow step. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// public void DeleteEnvelopeDelayedRoutingDefinition(string accountId, string envelopeId, string workflowStepId) { DeleteEnvelopeDelayedRoutingDefinitionWithHttpInfo(accountId, envelopeId, workflowStepId); } /// /// Deletes the delayed routing rules for the specified envelope workflow step. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// ApiResponse of Object(void) public ApiResponse DeleteEnvelopeDelayedRoutingDefinitionWithHttpInfo(string accountId, string envelopeId, string workflowStepId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteEnvelopeDelayedRoutingDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteEnvelopeDelayedRoutingDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->DeleteEnvelopeDelayedRoutingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/steps/{workflowStepId}/delayedRouting"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteEnvelopeDelayedRoutingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Deletes the delayed routing rules for the specified envelope workflow step. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of void public async System.Threading.Tasks.Task DeleteEnvelopeDelayedRoutingDefinitionAsync(string accountId, string envelopeId, string workflowStepId) { await DeleteEnvelopeDelayedRoutingDefinitionAsyncWithHttpInfo(accountId, envelopeId, workflowStepId); } /// /// Deletes the delayed routing rules for the specified envelope workflow step. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteEnvelopeDelayedRoutingDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, string workflowStepId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteEnvelopeDelayedRoutingDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteEnvelopeDelayedRoutingDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->DeleteEnvelopeDelayedRoutingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/steps/{workflowStepId}/delayedRouting"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteEnvelopeDelayedRoutingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Deletes the scheduled sending rules for the envelope's workflow. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// public void DeleteEnvelopeScheduledSendingDefinition(string accountId, string envelopeId) { DeleteEnvelopeScheduledSendingDefinitionWithHttpInfo(accountId, envelopeId); } /// /// Deletes the scheduled sending rules for the envelope's workflow. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of Object(void) public ApiResponse DeleteEnvelopeScheduledSendingDefinitionWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteEnvelopeScheduledSendingDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteEnvelopeScheduledSendingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/scheduledSending"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteEnvelopeScheduledSendingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Deletes the scheduled sending rules for the envelope's workflow. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of void public async System.Threading.Tasks.Task DeleteEnvelopeScheduledSendingDefinitionAsync(string accountId, string envelopeId) { await DeleteEnvelopeScheduledSendingDefinitionAsyncWithHttpInfo(accountId, envelopeId); } /// /// Deletes the scheduled sending rules for the envelope's workflow. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteEnvelopeScheduledSendingDefinitionAsyncWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteEnvelopeScheduledSendingDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteEnvelopeScheduledSendingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/scheduledSending"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteEnvelopeScheduledSendingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Delete envelope transfer rules for an account. This method deletes an envelope transfer rule. **Note:** Only Administrators can delete envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// public void DeleteEnvelopeTransferRules(string accountId, string envelopeTransferRuleId) { DeleteEnvelopeTransferRulesWithHttpInfo(accountId, envelopeTransferRuleId); } /// /// Delete envelope transfer rules for an account. This method deletes an envelope transfer rule. **Note:** Only Administrators can delete envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// ApiResponse of Object(void) public ApiResponse DeleteEnvelopeTransferRulesWithHttpInfo(string accountId, string envelopeTransferRuleId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteEnvelopeTransferRules"); // verify the required parameter 'envelopeTransferRuleId' is set if (envelopeTransferRuleId == null) throw new ApiException(400, "Missing required parameter 'envelopeTransferRuleId' when calling EnvelopesApi->DeleteEnvelopeTransferRules"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/transfer_rules/{envelopeTransferRuleId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeTransferRuleId != null) localVarPathParams.Add("envelopeTransferRuleId", this.ApiClient.ParameterToString(envelopeTransferRuleId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteEnvelopeTransferRules", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Delete envelope transfer rules for an account. This method deletes an envelope transfer rule. **Note:** Only Administrators can delete envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Task of void public async System.Threading.Tasks.Task DeleteEnvelopeTransferRulesAsync(string accountId, string envelopeTransferRuleId) { await DeleteEnvelopeTransferRulesAsyncWithHttpInfo(accountId, envelopeTransferRuleId); } /// /// Delete envelope transfer rules for an account. This method deletes an envelope transfer rule. **Note:** Only Administrators can delete envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteEnvelopeTransferRulesAsyncWithHttpInfo(string accountId, string envelopeTransferRuleId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteEnvelopeTransferRules"); // verify the required parameter 'envelopeTransferRuleId' is set if (envelopeTransferRuleId == null) throw new ApiException(400, "Missing required parameter 'envelopeTransferRuleId' when calling EnvelopesApi->DeleteEnvelopeTransferRules"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/transfer_rules/{envelopeTransferRuleId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeTransferRuleId != null) localVarPathParams.Add("envelopeTransferRuleId", this.ApiClient.ParameterToString(envelopeTransferRuleId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteEnvelopeTransferRules", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Delete the workflow definition for an envelope. Deletes the specified envelope's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// public void DeleteEnvelopeWorkflowDefinition(string accountId, string envelopeId) { DeleteEnvelopeWorkflowDefinitionWithHttpInfo(accountId, envelopeId); } /// /// Delete the workflow definition for an envelope. Deletes the specified envelope's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of Object(void) public ApiResponse DeleteEnvelopeWorkflowDefinitionWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteEnvelopeWorkflowDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteEnvelopeWorkflowDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteEnvelopeWorkflowDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Delete the workflow definition for an envelope. Deletes the specified envelope's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of void public async System.Threading.Tasks.Task DeleteEnvelopeWorkflowDefinitionAsync(string accountId, string envelopeId) { await DeleteEnvelopeWorkflowDefinitionAsyncWithHttpInfo(accountId, envelopeId); } /// /// Delete the workflow definition for an envelope. Deletes the specified envelope's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteEnvelopeWorkflowDefinitionAsyncWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteEnvelopeWorkflowDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteEnvelopeWorkflowDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteEnvelopeWorkflowDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Deletes the envelope workflow step definition for an envelope's workflow by step id. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// public void DeleteEnvelopeWorkflowStepDefinition(string accountId, string envelopeId, string workflowStepId) { DeleteEnvelopeWorkflowStepDefinitionWithHttpInfo(accountId, envelopeId, workflowStepId); } /// /// Deletes the envelope workflow step definition for an envelope's workflow by step id. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// ApiResponse of Object(void) public ApiResponse DeleteEnvelopeWorkflowStepDefinitionWithHttpInfo(string accountId, string envelopeId, string workflowStepId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteEnvelopeWorkflowStepDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteEnvelopeWorkflowStepDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->DeleteEnvelopeWorkflowStepDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/steps/{workflowStepId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteEnvelopeWorkflowStepDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Deletes the envelope workflow step definition for an envelope's workflow by step id. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of void public async System.Threading.Tasks.Task DeleteEnvelopeWorkflowStepDefinitionAsync(string accountId, string envelopeId, string workflowStepId) { await DeleteEnvelopeWorkflowStepDefinitionAsyncWithHttpInfo(accountId, envelopeId, workflowStepId); } /// /// Deletes the envelope workflow step definition for an envelope's workflow by step id. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteEnvelopeWorkflowStepDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, string workflowStepId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteEnvelopeWorkflowStepDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteEnvelopeWorkflowStepDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->DeleteEnvelopeWorkflowStepDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/steps/{workflowStepId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteEnvelopeWorkflowStepDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Deletes an envelope lock. Deletes the lock from the specified envelope. The `X-DocuSign-Edit` header must be included in the request. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// LockInformation public LockInformation DeleteLock(string accountId, string envelopeId) { ApiResponse localVarResponse = DeleteLockWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Deletes an envelope lock. Deletes the lock from the specified envelope. The `X-DocuSign-Edit` header must be included in the request. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of LockInformation public ApiResponse DeleteLockWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteLock"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteLock"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteLock", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (LockInformation)this.ApiClient.Deserialize(localVarResponse, typeof(LockInformation))); } /// /// Deletes an envelope lock. Deletes the lock from the specified envelope. The `X-DocuSign-Edit` header must be included in the request. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of LockInformation public async System.Threading.Tasks.Task DeleteLockAsync(string accountId, string envelopeId) { ApiResponse localVarResponse = await DeleteLockAsyncWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Deletes an envelope lock. Deletes the lock from the specified envelope. The `X-DocuSign-Edit` header must be included in the request. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (LockInformation) public async System.Threading.Tasks.Task> DeleteLockAsyncWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteLock"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteLock"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteLock", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (LockInformation)this.ApiClient.Deserialize(localVarResponse, typeof(LockInformation))); } /// /// Deletes a recipient from an envelope. Deletes the specified recipient file from the specified envelope. This cannot be used if the envelope has been sent. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Recipients public Recipients DeleteRecipient(string accountId, string envelopeId, string recipientId) { ApiResponse localVarResponse = DeleteRecipientWithHttpInfo(accountId, envelopeId, recipientId); return localVarResponse.Data; } /// /// Deletes a recipient from an envelope. Deletes the specified recipient file from the specified envelope. This cannot be used if the envelope has been sent. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// ApiResponse of Recipients public ApiResponse DeleteRecipientWithHttpInfo(string accountId, string envelopeId, string recipientId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteRecipient"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteRecipient"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->DeleteRecipient"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteRecipient", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Recipients)this.ApiClient.Deserialize(localVarResponse, typeof(Recipients))); } /// /// Deletes a recipient from an envelope. Deletes the specified recipient file from the specified envelope. This cannot be used if the envelope has been sent. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of Recipients public async System.Threading.Tasks.Task DeleteRecipientAsync(string accountId, string envelopeId, string recipientId) { ApiResponse localVarResponse = await DeleteRecipientAsyncWithHttpInfo(accountId, envelopeId, recipientId); return localVarResponse.Data; } /// /// Deletes a recipient from an envelope. Deletes the specified recipient file from the specified envelope. This cannot be used if the envelope has been sent. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of ApiResponse (Recipients) public async System.Threading.Tasks.Task> DeleteRecipientAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteRecipient"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteRecipient"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->DeleteRecipient"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteRecipient", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Recipients)this.ApiClient.Deserialize(localVarResponse, typeof(Recipients))); } /// /// Deletes recipients from an envelope. Deletes one or more recipients from a draft or sent envelope. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients. If the envelope is `In Process`, meaning that it has been sent and has not been completed or voided, recipients that have completed their actions cannot be deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Recipients public Recipients DeleteRecipients(string accountId, string envelopeId, Recipients recipients = null) { ApiResponse localVarResponse = DeleteRecipientsWithHttpInfo(accountId, envelopeId, recipients); return localVarResponse.Data; } /// /// Deletes recipients from an envelope. Deletes one or more recipients from a draft or sent envelope. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients. If the envelope is `In Process`, meaning that it has been sent and has not been completed or voided, recipients that have completed their actions cannot be deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of Recipients public ApiResponse DeleteRecipientsWithHttpInfo(string accountId, string envelopeId, Recipients recipients = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteRecipients"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteRecipients"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipients != null && recipients.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(recipients); // http body (model) parameter } else { localVarPostBody = recipients; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteRecipients", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Recipients)this.ApiClient.Deserialize(localVarResponse, typeof(Recipients))); } /// /// Deletes recipients from an envelope. Deletes one or more recipients from a draft or sent envelope. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients. If the envelope is `In Process`, meaning that it has been sent and has not been completed or voided, recipients that have completed their actions cannot be deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of Recipients public async System.Threading.Tasks.Task DeleteRecipientsAsync(string accountId, string envelopeId, Recipients recipients = null) { ApiResponse localVarResponse = await DeleteRecipientsAsyncWithHttpInfo(accountId, envelopeId, recipients); return localVarResponse.Data; } /// /// Deletes recipients from an envelope. Deletes one or more recipients from a draft or sent envelope. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients. If the envelope is `In Process`, meaning that it has been sent and has not been completed or voided, recipients that have completed their actions cannot be deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (Recipients) public async System.Threading.Tasks.Task> DeleteRecipientsAsyncWithHttpInfo(string accountId, string envelopeId, Recipients recipients = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteRecipients"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteRecipients"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipients != null && recipients.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(recipients); // http body (model) parameter } else { localVarPostBody = recipients; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteRecipients", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Recipients)this.ApiClient.Deserialize(localVarResponse, typeof(Recipients))); } /// /// Deletes the tabs associated with a recipient. Deletes one or more tabs associated with a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Tabs public Tabs DeleteTabs(string accountId, string envelopeId, string recipientId, Tabs tabs = null) { ApiResponse localVarResponse = DeleteTabsWithHttpInfo(accountId, envelopeId, recipientId, tabs); return localVarResponse.Data; } /// /// Deletes the tabs associated with a recipient. Deletes one or more tabs associated with a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// ApiResponse of Tabs public ApiResponse DeleteTabsWithHttpInfo(string accountId, string envelopeId, string recipientId, Tabs tabs = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteTabs"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->DeleteTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (tabs != null && tabs.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(tabs); // http body (model) parameter } else { localVarPostBody = tabs; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Deletes the tabs associated with a recipient. Deletes one or more tabs associated with a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of Tabs public async System.Threading.Tasks.Task DeleteTabsAsync(string accountId, string envelopeId, string recipientId, Tabs tabs = null) { ApiResponse localVarResponse = await DeleteTabsAsyncWithHttpInfo(accountId, envelopeId, recipientId, tabs); return localVarResponse.Data; } /// /// Deletes the tabs associated with a recipient. Deletes one or more tabs associated with a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of ApiResponse (Tabs) public async System.Threading.Tasks.Task> DeleteTabsAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, Tabs tabs = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteTabs"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->DeleteTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (tabs != null && tabs.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(tabs); // http body (model) parameter } else { localVarPostBody = tabs; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Deletes the delayed routing rules for the specified template workflow step. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// public void DeleteTemplateDelayedRoutingDefinition(string accountId, string templateId, string workflowStepId) { DeleteTemplateDelayedRoutingDefinitionWithHttpInfo(accountId, templateId, workflowStepId); } /// /// Deletes the delayed routing rules for the specified template workflow step. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// ApiResponse of Object(void) public ApiResponse DeleteTemplateDelayedRoutingDefinitionWithHttpInfo(string accountId, string templateId, string workflowStepId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteTemplateDelayedRoutingDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->DeleteTemplateDelayedRoutingDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->DeleteTemplateDelayedRoutingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/steps/{workflowStepId}/delayedRouting"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteTemplateDelayedRoutingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Deletes the delayed routing rules for the specified template workflow step. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// Task of void public async System.Threading.Tasks.Task DeleteTemplateDelayedRoutingDefinitionAsync(string accountId, string templateId, string workflowStepId) { await DeleteTemplateDelayedRoutingDefinitionAsyncWithHttpInfo(accountId, templateId, workflowStepId); } /// /// Deletes the delayed routing rules for the specified template workflow step. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteTemplateDelayedRoutingDefinitionAsyncWithHttpInfo(string accountId, string templateId, string workflowStepId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteTemplateDelayedRoutingDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->DeleteTemplateDelayedRoutingDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->DeleteTemplateDelayedRoutingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/steps/{workflowStepId}/delayedRouting"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteTemplateDelayedRoutingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Deletes the scheduled sending rules for the template's workflow. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// public void DeleteTemplateScheduledSendingDefinition(string accountId, string templateId) { DeleteTemplateScheduledSendingDefinitionWithHttpInfo(accountId, templateId); } /// /// Deletes the scheduled sending rules for the template's workflow. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// ApiResponse of Object(void) public ApiResponse DeleteTemplateScheduledSendingDefinitionWithHttpInfo(string accountId, string templateId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteTemplateScheduledSendingDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->DeleteTemplateScheduledSendingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/scheduledSending"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteTemplateScheduledSendingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Deletes the scheduled sending rules for the template's workflow. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Task of void public async System.Threading.Tasks.Task DeleteTemplateScheduledSendingDefinitionAsync(string accountId, string templateId) { await DeleteTemplateScheduledSendingDefinitionAsyncWithHttpInfo(accountId, templateId); } /// /// Deletes the scheduled sending rules for the template's workflow. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteTemplateScheduledSendingDefinitionAsyncWithHttpInfo(string accountId, string templateId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteTemplateScheduledSendingDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->DeleteTemplateScheduledSendingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/scheduledSending"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteTemplateScheduledSendingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Delete the workflow definition for a template. Deletes the specified template's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// public void DeleteTemplateWorkflowDefinition(string accountId, string templateId) { DeleteTemplateWorkflowDefinitionWithHttpInfo(accountId, templateId); } /// /// Delete the workflow definition for a template. Deletes the specified template's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// ApiResponse of Object(void) public ApiResponse DeleteTemplateWorkflowDefinitionWithHttpInfo(string accountId, string templateId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteTemplateWorkflowDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->DeleteTemplateWorkflowDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteTemplateWorkflowDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Delete the workflow definition for a template. Deletes the specified template's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Task of void public async System.Threading.Tasks.Task DeleteTemplateWorkflowDefinitionAsync(string accountId, string templateId) { await DeleteTemplateWorkflowDefinitionAsyncWithHttpInfo(accountId, templateId); } /// /// Delete the workflow definition for a template. Deletes the specified template's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteTemplateWorkflowDefinitionAsyncWithHttpInfo(string accountId, string templateId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteTemplateWorkflowDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->DeleteTemplateWorkflowDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteTemplateWorkflowDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Deletes the workflow step definition for an template's workflow by step id. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// public void DeleteTemplateWorkflowStepDefinition(string accountId, string templateId, string workflowStepId) { DeleteTemplateWorkflowStepDefinitionWithHttpInfo(accountId, templateId, workflowStepId); } /// /// Deletes the workflow step definition for an template's workflow by step id. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// ApiResponse of Object(void) public ApiResponse DeleteTemplateWorkflowStepDefinitionWithHttpInfo(string accountId, string templateId, string workflowStepId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteTemplateWorkflowStepDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->DeleteTemplateWorkflowStepDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->DeleteTemplateWorkflowStepDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/steps/{workflowStepId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteTemplateWorkflowStepDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Deletes the workflow step definition for an template's workflow by step id. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// Task of void public async System.Threading.Tasks.Task DeleteTemplateWorkflowStepDefinitionAsync(string accountId, string templateId, string workflowStepId) { await DeleteTemplateWorkflowStepDefinitionAsyncWithHttpInfo(accountId, templateId, workflowStepId); } /// /// Deletes the workflow step definition for an template's workflow by step id. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteTemplateWorkflowStepDefinitionAsyncWithHttpInfo(string accountId, string templateId, string workflowStepId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteTemplateWorkflowStepDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->DeleteTemplateWorkflowStepDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->DeleteTemplateWorkflowStepDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/steps/{workflowStepId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteTemplateWorkflowStepDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Deletes a template from a document in an existing envelope. Deletes the specified template from a document in an existing envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The ID of the template being accessed. /// public void DeleteTemplatesFromDocument(string accountId, string envelopeId, string documentId, string templateId) { DeleteTemplatesFromDocumentWithHttpInfo(accountId, envelopeId, documentId, templateId); } /// /// Deletes a template from a document in an existing envelope. Deletes the specified template from a document in an existing envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The ID of the template being accessed. /// ApiResponse of Object(void) public ApiResponse DeleteTemplatesFromDocumentWithHttpInfo(string accountId, string envelopeId, string documentId, string templateId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteTemplatesFromDocument"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteTemplatesFromDocument"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->DeleteTemplatesFromDocument"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->DeleteTemplatesFromDocument"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/templates/{templateId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteTemplatesFromDocument", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Deletes a template from a document in an existing envelope. Deletes the specified template from a document in an existing envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The ID of the template being accessed. /// Task of void public async System.Threading.Tasks.Task DeleteTemplatesFromDocumentAsync(string accountId, string envelopeId, string documentId, string templateId) { await DeleteTemplatesFromDocumentAsyncWithHttpInfo(accountId, envelopeId, documentId, templateId); } /// /// Deletes a template from a document in an existing envelope. Deletes the specified template from a document in an existing envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The ID of the template being accessed. /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteTemplatesFromDocumentAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, string templateId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->DeleteTemplatesFromDocument"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->DeleteTemplatesFromDocument"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->DeleteTemplatesFromDocument"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->DeleteTemplatesFromDocument"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/templates/{templateId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("DELETE"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("DeleteTemplatesFromDocument", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Retrieves an attachment from the envelope. Retrieves an attachment from an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// System.IO.Stream public System.IO.Stream GetAttachment(string accountId, string envelopeId, string attachmentId) { ApiResponse localVarResponse = GetAttachmentWithHttpInfo(accountId, envelopeId, attachmentId); return localVarResponse.Data; } /// /// Retrieves an attachment from the envelope. Retrieves an attachment from an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// ApiResponse of System.IO.Stream public ApiResponse GetAttachmentWithHttpInfo(string accountId, string envelopeId, string attachmentId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetAttachment"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetAttachment"); // verify the required parameter 'attachmentId' is set if (attachmentId == null) throw new ApiException(400, "Missing required parameter 'attachmentId' when calling EnvelopesApi->GetAttachment"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments/{attachmentId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/octet-stream" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (attachmentId != null) localVarPathParams.Add("attachmentId", this.ApiClient.ParameterToString(attachmentId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetAttachment", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (System.IO.Stream)this.ApiClient.Deserialize(localVarResponse, typeof(System.IO.Stream))); } /// /// Retrieves an attachment from the envelope. Retrieves an attachment from an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetAttachmentAsync(string accountId, string envelopeId, string attachmentId) { ApiResponse localVarResponse = await GetAttachmentAsyncWithHttpInfo(accountId, envelopeId, attachmentId); return localVarResponse.Data; } /// /// Retrieves an attachment from the envelope. Retrieves an attachment from an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetAttachmentAsyncWithHttpInfo(string accountId, string envelopeId, string attachmentId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetAttachment"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetAttachment"); // verify the required parameter 'attachmentId' is set if (attachmentId == null) throw new ApiException(400, "Missing required parameter 'attachmentId' when calling EnvelopesApi->GetAttachment"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments/{attachmentId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/octet-stream" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (attachmentId != null) localVarPathParams.Add("attachmentId", this.ApiClient.ParameterToString(attachmentId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetAttachment", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (System.IO.Stream)this.ApiClient.Deserialize(localVarResponse, typeof(System.IO.Stream))); } /// /// Returns a list of attachments associated with the specified envelope Returns a list of attachments associated with a specified envelope /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// EnvelopeAttachmentsResult public EnvelopeAttachmentsResult GetAttachments(string accountId, string envelopeId) { ApiResponse localVarResponse = GetAttachmentsWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Returns a list of attachments associated with the specified envelope Returns a list of attachments associated with a specified envelope /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of EnvelopeAttachmentsResult public ApiResponse GetAttachmentsWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetAttachments"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetAttachments"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetAttachments", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeAttachmentsResult)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeAttachmentsResult))); } /// /// Returns a list of attachments associated with the specified envelope Returns a list of attachments associated with a specified envelope /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of EnvelopeAttachmentsResult public async System.Threading.Tasks.Task GetAttachmentsAsync(string accountId, string envelopeId) { ApiResponse localVarResponse = await GetAttachmentsAsyncWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Returns a list of attachments associated with the specified envelope Returns a list of attachments associated with a specified envelope /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (EnvelopeAttachmentsResult) public async System.Threading.Tasks.Task> GetAttachmentsAsyncWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetAttachments"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetAttachments"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetAttachments", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeAttachmentsResult)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeAttachmentsResult))); } /// /// Retrieves the current metadata of a ChunkedUpload. Returns the details (but not the content) about a chunked upload. **Note:** You cannot obtain details about a chunked upload that has expired, been deleted, or consumed by other actions. /// public class GetChunkedUploadOptions { /// public string include {get; set;} } /// /// Retrieves the current metadata of a ChunkedUpload. Returns the details (but not the content) about a chunked upload. **Note:** You cannot obtain details about a chunked upload that has expired, been deleted, or consumed by other actions. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Options for modifying the behavior of the function. /// ChunkedUploadResponse public ChunkedUploadResponse GetChunkedUpload(string accountId, string chunkedUploadId, EnvelopesApi.GetChunkedUploadOptions options = null) { ApiResponse localVarResponse = GetChunkedUploadWithHttpInfo(accountId, chunkedUploadId, options); return localVarResponse.Data; } /// /// Retrieves the current metadata of a ChunkedUpload. Returns the details (but not the content) about a chunked upload. **Note:** You cannot obtain details about a chunked upload that has expired, been deleted, or consumed by other actions. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Options for modifying the behavior of the function. /// ApiResponse of ChunkedUploadResponse public ApiResponse GetChunkedUploadWithHttpInfo(string accountId, string chunkedUploadId, EnvelopesApi.GetChunkedUploadOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetChunkedUpload"); // verify the required parameter 'chunkedUploadId' is set if (chunkedUploadId == null) throw new ApiException(400, "Missing required parameter 'chunkedUploadId' when calling EnvelopesApi->GetChunkedUpload"); var localVarPath = "/v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (chunkedUploadId != null) localVarPathParams.Add("chunkedUploadId", this.ApiClient.ParameterToString(chunkedUploadId)); // path parameter if (options != null) { if (options.include != null) localVarQueryParams.Add("include", this.ApiClient.ParameterToString(options.include)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetChunkedUpload", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ChunkedUploadResponse)this.ApiClient.Deserialize(localVarResponse, typeof(ChunkedUploadResponse))); } /// /// Retrieves the current metadata of a ChunkedUpload. Returns the details (but not the content) about a chunked upload. **Note:** You cannot obtain details about a chunked upload that has expired, been deleted, or consumed by other actions. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Options for modifying the behavior of the function. /// Task of ChunkedUploadResponse public async System.Threading.Tasks.Task GetChunkedUploadAsync(string accountId, string chunkedUploadId, EnvelopesApi.GetChunkedUploadOptions options = null) { ApiResponse localVarResponse = await GetChunkedUploadAsyncWithHttpInfo(accountId, chunkedUploadId, options); return localVarResponse.Data; } /// /// Retrieves the current metadata of a ChunkedUpload. Returns the details (but not the content) about a chunked upload. **Note:** You cannot obtain details about a chunked upload that has expired, been deleted, or consumed by other actions. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Options for modifying the behavior of the function. /// Task of ApiResponse (ChunkedUploadResponse) public async System.Threading.Tasks.Task> GetChunkedUploadAsyncWithHttpInfo(string accountId, string chunkedUploadId, EnvelopesApi.GetChunkedUploadOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetChunkedUpload"); // verify the required parameter 'chunkedUploadId' is set if (chunkedUploadId == null) throw new ApiException(400, "Missing required parameter 'chunkedUploadId' when calling EnvelopesApi->GetChunkedUpload"); var localVarPath = "/v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (chunkedUploadId != null) localVarPathParams.Add("chunkedUploadId", this.ApiClient.ParameterToString(chunkedUploadId)); // path parameter if (options != null) { if (options.include != null) localVarQueryParams.Add("include", this.ApiClient.ParameterToString(options.include)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetChunkedUpload", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ChunkedUploadResponse)this.ApiClient.Deserialize(localVarResponse, typeof(ChunkedUploadResponse))); } /// /// Gets comment transcript for envelope and user Retrieves a PDF file containing all of the comments that senders and recipients have added to the documents in an envelope. The response body of this method is the PDF file as a byte stream. **Note:** Comments are disabled by default. To use the comments feature, an account administrator must enable comments on the account (in the `accountSettingsInformation` object, set the `enableSigningExtensionComments` property to **true**). /// public class GetCommentsTranscriptOptions { /// public string encoding {get; set;} } /// /// Gets comment transcript for envelope and user Retrieves a PDF file containing all of the comments that senders and recipients have added to the documents in an envelope. The response body of this method is the PDF file as a byte stream. **Note:** Comments are disabled by default. To use the comments feature, an account administrator must enable comments on the account (in the `accountSettingsInformation` object, set the `enableSigningExtensionComments` property to **true**). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// System.IO.Stream public System.IO.Stream GetCommentsTranscript(string accountId, string envelopeId, EnvelopesApi.GetCommentsTranscriptOptions options = null) { ApiResponse localVarResponse = GetCommentsTranscriptWithHttpInfo(accountId, envelopeId, options); return localVarResponse.Data; } /// /// Gets comment transcript for envelope and user Retrieves a PDF file containing all of the comments that senders and recipients have added to the documents in an envelope. The response body of this method is the PDF file as a byte stream. **Note:** Comments are disabled by default. To use the comments feature, an account administrator must enable comments on the account (in the `accountSettingsInformation` object, set the `enableSigningExtensionComments` property to **true**). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of System.IO.Stream public ApiResponse GetCommentsTranscriptWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.GetCommentsTranscriptOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetCommentsTranscript"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetCommentsTranscript"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/comments/transcript"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/pdf" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.encoding != null) localVarQueryParams.Add("encoding", this.ApiClient.ParameterToString(options.encoding)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetCommentsTranscript", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (System.IO.Stream)this.ApiClient.Deserialize(localVarResponse, typeof(System.IO.Stream))); } /// /// Gets comment transcript for envelope and user Retrieves a PDF file containing all of the comments that senders and recipients have added to the documents in an envelope. The response body of this method is the PDF file as a byte stream. **Note:** Comments are disabled by default. To use the comments feature, an account administrator must enable comments on the account (in the `accountSettingsInformation` object, set the `enableSigningExtensionComments` property to **true**). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetCommentsTranscriptAsync(string accountId, string envelopeId, EnvelopesApi.GetCommentsTranscriptOptions options = null) { ApiResponse localVarResponse = await GetCommentsTranscriptAsyncWithHttpInfo(accountId, envelopeId, options); return localVarResponse.Data; } /// /// Gets comment transcript for envelope and user Retrieves a PDF file containing all of the comments that senders and recipients have added to the documents in an envelope. The response body of this method is the PDF file as a byte stream. **Note:** Comments are disabled by default. To use the comments feature, an account administrator must enable comments on the account (in the `accountSettingsInformation` object, set the `enableSigningExtensionComments` property to **true**). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetCommentsTranscriptAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.GetCommentsTranscriptOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetCommentsTranscript"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetCommentsTranscript"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/comments/transcript"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/pdf" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.encoding != null) localVarQueryParams.Add("encoding", this.ApiClient.ParameterToString(options.encoding)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetCommentsTranscript", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (System.IO.Stream)this.ApiClient.Deserialize(localVarResponse, typeof(System.IO.Stream))); } /// /// Reserved: Gets the Electronic Record and Signature Disclosure associated with the account. Reserved: Retrieves the Electronic Record and Signature Disclosure, with HTML formatting, associated with the account. /// public class GetConsumerDisclosureOptions { /// The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. public string langCode2 {get; set;} } /// /// Reserved: Gets the Electronic Record and Signature Disclosure associated with the account. Reserved: Retrieves the Electronic Record and Signature Disclosure, with HTML formatting, associated with the account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. /// Options for modifying the behavior of the function. /// ConsumerDisclosure public ConsumerDisclosure GetConsumerDisclosure(string accountId, string envelopeId, string recipientId, string langCode, EnvelopesApi.GetConsumerDisclosureOptions options = null) { ApiResponse localVarResponse = GetConsumerDisclosureWithHttpInfo(accountId, envelopeId, recipientId, langCode, options); return localVarResponse.Data; } /// /// Reserved: Gets the Electronic Record and Signature Disclosure associated with the account. Reserved: Retrieves the Electronic Record and Signature Disclosure, with HTML formatting, associated with the account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. /// Options for modifying the behavior of the function. /// ApiResponse of ConsumerDisclosure public ApiResponse GetConsumerDisclosureWithHttpInfo(string accountId, string envelopeId, string recipientId, string langCode, EnvelopesApi.GetConsumerDisclosureOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetConsumerDisclosure"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetConsumerDisclosure"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->GetConsumerDisclosure"); // verify the required parameter 'langCode' is set if (langCode == null) throw new ApiException(400, "Missing required parameter 'langCode' when calling EnvelopesApi->GetConsumerDisclosure"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/consumer_disclosure/{langCode}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (langCode != null) localVarPathParams.Add("langCode", this.ApiClient.ParameterToString(langCode)); // path parameter if (options != null) { if (options.langCode2 != null) localVarQueryParams.Add("langCode", this.ApiClient.ParameterToString(options.langCode2)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetConsumerDisclosure", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ConsumerDisclosure)this.ApiClient.Deserialize(localVarResponse, typeof(ConsumerDisclosure))); } /// /// Reserved: Gets the Electronic Record and Signature Disclosure associated with the account. Reserved: Retrieves the Electronic Record and Signature Disclosure, with HTML formatting, associated with the account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. /// Options for modifying the behavior of the function. /// Task of ConsumerDisclosure public async System.Threading.Tasks.Task GetConsumerDisclosureAsync(string accountId, string envelopeId, string recipientId, string langCode, EnvelopesApi.GetConsumerDisclosureOptions options = null) { ApiResponse localVarResponse = await GetConsumerDisclosureAsyncWithHttpInfo(accountId, envelopeId, recipientId, langCode, options); return localVarResponse.Data; } /// /// Reserved: Gets the Electronic Record and Signature Disclosure associated with the account. Reserved: Retrieves the Electronic Record and Signature Disclosure, with HTML formatting, associated with the account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. /// Options for modifying the behavior of the function. /// Task of ApiResponse (ConsumerDisclosure) public async System.Threading.Tasks.Task> GetConsumerDisclosureAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, string langCode, EnvelopesApi.GetConsumerDisclosureOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetConsumerDisclosure"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetConsumerDisclosure"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->GetConsumerDisclosure"); // verify the required parameter 'langCode' is set if (langCode == null) throw new ApiException(400, "Missing required parameter 'langCode' when calling EnvelopesApi->GetConsumerDisclosure"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/consumer_disclosure/{langCode}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (langCode != null) localVarPathParams.Add("langCode", this.ApiClient.ParameterToString(langCode)); // path parameter if (options != null) { if (options.langCode2 != null) localVarQueryParams.Add("langCode", this.ApiClient.ParameterToString(options.langCode2)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetConsumerDisclosure", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ConsumerDisclosure)this.ApiClient.Deserialize(localVarResponse, typeof(ConsumerDisclosure))); } /// /// Gets the Electronic Record and Signature Disclosure associated with the account. Retrieves the Electronic Record and Signature Disclosure, with html formatting, associated with the account. You can use an optional query string to set the language for the disclosure. /// public class GetConsumerDisclosureDefaultOptions { /// public string langCode {get; set;} } /// /// Gets the Electronic Record and Signature Disclosure associated with the account. Retrieves the Electronic Record and Signature Disclosure, with html formatting, associated with the account. You can use an optional query string to set the language for the disclosure. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// ConsumerDisclosure public ConsumerDisclosure GetConsumerDisclosureDefault(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetConsumerDisclosureDefaultOptions options = null) { ApiResponse localVarResponse = GetConsumerDisclosureDefaultWithHttpInfo(accountId, envelopeId, recipientId, options); return localVarResponse.Data; } /// /// Gets the Electronic Record and Signature Disclosure associated with the account. Retrieves the Electronic Record and Signature Disclosure, with html formatting, associated with the account. You can use an optional query string to set the language for the disclosure. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of ConsumerDisclosure public ApiResponse GetConsumerDisclosureDefaultWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetConsumerDisclosureDefaultOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetConsumerDisclosureDefault"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetConsumerDisclosureDefault"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->GetConsumerDisclosureDefault"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/consumer_disclosure"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (options != null) { if (options.langCode != null) localVarQueryParams.Add("langCode", this.ApiClient.ParameterToString(options.langCode)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetConsumerDisclosureDefault", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ConsumerDisclosure)this.ApiClient.Deserialize(localVarResponse, typeof(ConsumerDisclosure))); } /// /// Gets the Electronic Record and Signature Disclosure associated with the account. Retrieves the Electronic Record and Signature Disclosure, with html formatting, associated with the account. You can use an optional query string to set the language for the disclosure. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of ConsumerDisclosure public async System.Threading.Tasks.Task GetConsumerDisclosureDefaultAsync(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetConsumerDisclosureDefaultOptions options = null) { ApiResponse localVarResponse = await GetConsumerDisclosureDefaultAsyncWithHttpInfo(accountId, envelopeId, recipientId, options); return localVarResponse.Data; } /// /// Gets the Electronic Record and Signature Disclosure associated with the account. Retrieves the Electronic Record and Signature Disclosure, with html formatting, associated with the account. You can use an optional query string to set the language for the disclosure. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (ConsumerDisclosure) public async System.Threading.Tasks.Task> GetConsumerDisclosureDefaultAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetConsumerDisclosureDefaultOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetConsumerDisclosureDefault"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetConsumerDisclosureDefault"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->GetConsumerDisclosureDefault"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/consumer_disclosure"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (options != null) { if (options.langCode != null) localVarQueryParams.Add("langCode", this.ApiClient.ParameterToString(options.langCode)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetConsumerDisclosureDefault", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ConsumerDisclosure)this.ApiClient.Deserialize(localVarResponse, typeof(ConsumerDisclosure))); } /// /// Gets a document from an envelope. Retrieves the specified document from the envelope. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. You can also use this method to retrieve a PDF containing the combined content of all documents and the certificate. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. To retrieve the combined content replace the `{documentId}` parameter in the endpoint with `combined`. /accounts/{accountId}/envelopes/{envelopeId}/documents/combined /// public class GetDocumentOptions { /// When set to **false**, the envelope signing certificate is removed from the download. public string certificate {get; set;} /// public string documentsByUserid {get; set;} /// public string encoding {get; set;} /// When set to **true**, the PDF bytes returned in the response are encrypted for all the key managers configured on your DocuSign account. The documents can be decrypted with the KeyManager Decrypt Document API. public string encrypt {get; set;} /// Specifies the language for the Certificate of Completion in the response. The supported languages, with the language value shown in parenthesis, are: Chinese Simplified (zh_CN), , Chinese Traditional (zh_TW), Dutch (nl), English US (en), French (fr), German (de), Italian (it), Japanese (ja), Korean (ko), Portuguese (pt), Portuguese (Brazil) (pt_BR), Russian (ru), Spanish (es). public string language {get; set;} /// public string recipientId {get; set;} /// public string sharedUserId {get; set;} /// When set to **true**, any changed fields for the returned PDF are highlighted in yellow and optional signatures or initials outlined in red. public string showChanges {get; set;} /// When set to **true**, the account has the watermark feature enabled, and the envelope is not complete, the watermark for the account is added to the PDF documents. This option can remove the watermark. public string watermark {get; set;} } /// /// Gets a document from an envelope. Retrieves the specified document from the envelope. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. You can also use this method to retrieve a PDF containing the combined content of all documents and the certificate. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. To retrieve the combined content replace the `{documentId}` parameter in the endpoint with `combined`. /accounts/{accountId}/envelopes/{envelopeId}/documents/combined /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// System.IO.Stream public System.IO.Stream GetDocument(string accountId, string envelopeId, string documentId, EnvelopesApi.GetDocumentOptions options = null) { ApiResponse localVarResponse = GetDocumentWithHttpInfo(accountId, envelopeId, documentId, options); return localVarResponse.Data; } /// /// Gets a document from an envelope. Retrieves the specified document from the envelope. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. You can also use this method to retrieve a PDF containing the combined content of all documents and the certificate. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. To retrieve the combined content replace the `{documentId}` parameter in the endpoint with `combined`. /accounts/{accountId}/envelopes/{envelopeId}/documents/combined /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of System.IO.Stream public ApiResponse GetDocumentWithHttpInfo(string accountId, string envelopeId, string documentId, EnvelopesApi.GetDocumentOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetDocument"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetDocument"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->GetDocument"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/pdf" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (options != null) { if (options.certificate != null) localVarQueryParams.Add("certificate", this.ApiClient.ParameterToString(options.certificate)); // query parameter if (options.documentsByUserid != null) localVarQueryParams.Add("documents_by_userid", this.ApiClient.ParameterToString(options.documentsByUserid)); // query parameter if (options.encoding != null) localVarQueryParams.Add("encoding", this.ApiClient.ParameterToString(options.encoding)); // query parameter if (options.encrypt != null) localVarQueryParams.Add("encrypt", this.ApiClient.ParameterToString(options.encrypt)); // query parameter if (options.language != null) localVarQueryParams.Add("language", this.ApiClient.ParameterToString(options.language)); // query parameter if (options.recipientId != null) localVarQueryParams.Add("recipient_id", this.ApiClient.ParameterToString(options.recipientId)); // query parameter if (options.sharedUserId != null) localVarQueryParams.Add("shared_user_id", this.ApiClient.ParameterToString(options.sharedUserId)); // query parameter if (options.showChanges != null) localVarQueryParams.Add("show_changes", this.ApiClient.ParameterToString(options.showChanges)); // query parameter if (options.watermark != null) localVarQueryParams.Add("watermark", this.ApiClient.ParameterToString(options.watermark)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetDocument", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (System.IO.Stream)this.ApiClient.Deserialize(localVarResponse, typeof(System.IO.Stream))); } /// /// Gets a document from an envelope. Retrieves the specified document from the envelope. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. You can also use this method to retrieve a PDF containing the combined content of all documents and the certificate. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. To retrieve the combined content replace the `{documentId}` parameter in the endpoint with `combined`. /accounts/{accountId}/envelopes/{envelopeId}/documents/combined /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetDocumentAsync(string accountId, string envelopeId, string documentId, EnvelopesApi.GetDocumentOptions options = null) { ApiResponse localVarResponse = await GetDocumentAsyncWithHttpInfo(accountId, envelopeId, documentId, options); return localVarResponse.Data; } /// /// Gets a document from an envelope. Retrieves the specified document from the envelope. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. You can also use this method to retrieve a PDF containing the combined content of all documents and the certificate. If the account has the Highlight Data Changes feature enabled, there is an option to request that any changes in the envelope be highlighted. To retrieve the combined content replace the `{documentId}` parameter in the endpoint with `combined`. /accounts/{accountId}/envelopes/{envelopeId}/documents/combined /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetDocumentAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, EnvelopesApi.GetDocumentOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetDocument"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetDocument"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->GetDocument"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/pdf" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (options != null) { if (options.certificate != null) localVarQueryParams.Add("certificate", this.ApiClient.ParameterToString(options.certificate)); // query parameter if (options.documentsByUserid != null) localVarQueryParams.Add("documents_by_userid", this.ApiClient.ParameterToString(options.documentsByUserid)); // query parameter if (options.encoding != null) localVarQueryParams.Add("encoding", this.ApiClient.ParameterToString(options.encoding)); // query parameter if (options.encrypt != null) localVarQueryParams.Add("encrypt", this.ApiClient.ParameterToString(options.encrypt)); // query parameter if (options.language != null) localVarQueryParams.Add("language", this.ApiClient.ParameterToString(options.language)); // query parameter if (options.recipientId != null) localVarQueryParams.Add("recipient_id", this.ApiClient.ParameterToString(options.recipientId)); // query parameter if (options.sharedUserId != null) localVarQueryParams.Add("shared_user_id", this.ApiClient.ParameterToString(options.sharedUserId)); // query parameter if (options.showChanges != null) localVarQueryParams.Add("show_changes", this.ApiClient.ParameterToString(options.showChanges)); // query parameter if (options.watermark != null) localVarQueryParams.Add("watermark", this.ApiClient.ParameterToString(options.watermark)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetDocument", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (System.IO.Stream)this.ApiClient.Deserialize(localVarResponse, typeof(System.IO.Stream))); } /// /// Gets a page image from an envelope for display. Retrieves a page image for display from the specified envelope. /// public class GetDocumentPageImageOptions { /// Sets the dpi for the image. public string dpi {get; set;} /// Sets the maximum height for the page image in pixels. The dpi is recalculated based on this setting. public string maxHeight {get; set;} /// Sets the maximum width for the page image in pixels. The dpi is recalculated based on this setting. public string maxWidth {get; set;} /// public string showChanges {get; set;} } /// /// Gets a page image from an envelope for display. Retrieves a page image for display from the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Options for modifying the behavior of the function. /// System.IO.Stream public System.IO.Stream GetDocumentPageImage(string accountId, string envelopeId, string documentId, string pageNumber, EnvelopesApi.GetDocumentPageImageOptions options = null) { ApiResponse localVarResponse = GetDocumentPageImageWithHttpInfo(accountId, envelopeId, documentId, pageNumber, options); return localVarResponse.Data; } /// /// Gets a page image from an envelope for display. Retrieves a page image for display from the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of System.IO.Stream public ApiResponse GetDocumentPageImageWithHttpInfo(string accountId, string envelopeId, string documentId, string pageNumber, EnvelopesApi.GetDocumentPageImageOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetDocumentPageImage"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetDocumentPageImage"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->GetDocumentPageImage"); // verify the required parameter 'pageNumber' is set if (pageNumber == null) throw new ApiException(400, "Missing required parameter 'pageNumber' when calling EnvelopesApi->GetDocumentPageImage"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages/{pageNumber}/page_image"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "image/png" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (pageNumber != null) localVarPathParams.Add("pageNumber", this.ApiClient.ParameterToString(pageNumber)); // path parameter if (options != null) { if (options.dpi != null) localVarQueryParams.Add("dpi", this.ApiClient.ParameterToString(options.dpi)); // query parameter if (options.maxHeight != null) localVarQueryParams.Add("max_height", this.ApiClient.ParameterToString(options.maxHeight)); // query parameter if (options.maxWidth != null) localVarQueryParams.Add("max_width", this.ApiClient.ParameterToString(options.maxWidth)); // query parameter if (options.showChanges != null) localVarQueryParams.Add("show_changes", this.ApiClient.ParameterToString(options.showChanges)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetDocumentPageImage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (System.IO.Stream)this.ApiClient.Deserialize(localVarResponse, typeof(System.IO.Stream))); } /// /// Gets a page image from an envelope for display. Retrieves a page image for display from the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Options for modifying the behavior of the function. /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetDocumentPageImageAsync(string accountId, string envelopeId, string documentId, string pageNumber, EnvelopesApi.GetDocumentPageImageOptions options = null) { ApiResponse localVarResponse = await GetDocumentPageImageAsyncWithHttpInfo(accountId, envelopeId, documentId, pageNumber, options); return localVarResponse.Data; } /// /// Gets a page image from an envelope for display. Retrieves a page image for display from the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetDocumentPageImageAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, string pageNumber, EnvelopesApi.GetDocumentPageImageOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetDocumentPageImage"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetDocumentPageImage"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->GetDocumentPageImage"); // verify the required parameter 'pageNumber' is set if (pageNumber == null) throw new ApiException(400, "Missing required parameter 'pageNumber' when calling EnvelopesApi->GetDocumentPageImage"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages/{pageNumber}/page_image"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "image/png" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (pageNumber != null) localVarPathParams.Add("pageNumber", this.ApiClient.ParameterToString(pageNumber)); // path parameter if (options != null) { if (options.dpi != null) localVarQueryParams.Add("dpi", this.ApiClient.ParameterToString(options.dpi)); // query parameter if (options.maxHeight != null) localVarQueryParams.Add("max_height", this.ApiClient.ParameterToString(options.maxHeight)); // query parameter if (options.maxWidth != null) localVarQueryParams.Add("max_width", this.ApiClient.ParameterToString(options.maxWidth)); // query parameter if (options.showChanges != null) localVarQueryParams.Add("show_changes", this.ApiClient.ParameterToString(options.showChanges)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetDocumentPageImage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (System.IO.Stream)this.ApiClient.Deserialize(localVarResponse, typeof(System.IO.Stream))); } /// /// Returns tabs on the document. Returns the tabs on the document specified by `documentId` in the envelope specified by `envelopeId`. /// public class GetDocumentTabsOptions { /// public string includeMetadata {get; set;} /// public string pageNumbers {get; set;} } /// /// Returns tabs on the document. Returns the tabs on the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Tabs public Tabs GetDocumentTabs(string accountId, string envelopeId, string documentId, EnvelopesApi.GetDocumentTabsOptions options = null) { ApiResponse localVarResponse = GetDocumentTabsWithHttpInfo(accountId, envelopeId, documentId, options); return localVarResponse.Data; } /// /// Returns tabs on the document. Returns the tabs on the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of Tabs public ApiResponse GetDocumentTabsWithHttpInfo(string accountId, string envelopeId, string documentId, EnvelopesApi.GetDocumentTabsOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetDocumentTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetDocumentTabs"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->GetDocumentTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (options != null) { if (options.includeMetadata != null) localVarQueryParams.Add("include_metadata", this.ApiClient.ParameterToString(options.includeMetadata)); // query parameter if (options.pageNumbers != null) localVarQueryParams.Add("page_numbers", this.ApiClient.ParameterToString(options.pageNumbers)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetDocumentTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Returns tabs on the document. Returns the tabs on the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Task of Tabs public async System.Threading.Tasks.Task GetDocumentTabsAsync(string accountId, string envelopeId, string documentId, EnvelopesApi.GetDocumentTabsOptions options = null) { ApiResponse localVarResponse = await GetDocumentTabsAsyncWithHttpInfo(accountId, envelopeId, documentId, options); return localVarResponse.Data; } /// /// Returns tabs on the document. Returns the tabs on the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (Tabs) public async System.Threading.Tasks.Task> GetDocumentTabsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, EnvelopesApi.GetDocumentTabsOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetDocumentTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetDocumentTabs"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->GetDocumentTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (options != null) { if (options.includeMetadata != null) localVarQueryParams.Add("include_metadata", this.ApiClient.ParameterToString(options.includeMetadata)); // query parameter if (options.pageNumbers != null) localVarQueryParams.Add("page_numbers", this.ApiClient.ParameterToString(options.pageNumbers)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetDocumentTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Gets the email setting overrides for an envelope. Retrieves the email override settings for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// EmailSettings public EmailSettings GetEmailSettings(string accountId, string envelopeId) { ApiResponse localVarResponse = GetEmailSettingsWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Gets the email setting overrides for an envelope. Retrieves the email override settings for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of EmailSettings public ApiResponse GetEmailSettingsWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEmailSettings"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEmailSettings"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/email_settings"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEmailSettings", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EmailSettings)this.ApiClient.Deserialize(localVarResponse, typeof(EmailSettings))); } /// /// Gets the email setting overrides for an envelope. Retrieves the email override settings for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of EmailSettings public async System.Threading.Tasks.Task GetEmailSettingsAsync(string accountId, string envelopeId) { ApiResponse localVarResponse = await GetEmailSettingsAsyncWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Gets the email setting overrides for an envelope. Retrieves the email override settings for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (EmailSettings) public async System.Threading.Tasks.Task> GetEmailSettingsAsyncWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEmailSettings"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEmailSettings"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/email_settings"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEmailSettings", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EmailSettings)this.ApiClient.Deserialize(localVarResponse, typeof(EmailSettings))); } /// /// Gets the status of a envelope. Retrieves the overall status for the specified envelope. /// public class GetEnvelopeOptions { /// When true, envelope information can be added or modified. public string advancedUpdate {get; set;} /// public string include {get; set;} /// public string includeAnchorTabLocations {get; set;} } /// /// Gets the status of a envelope. Retrieves the overall status for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Envelope public Envelope GetEnvelope(string accountId, string envelopeId, EnvelopesApi.GetEnvelopeOptions options = null) { ApiResponse localVarResponse = GetEnvelopeWithHttpInfo(accountId, envelopeId, options); return localVarResponse.Data; } /// /// Gets the status of a envelope. Retrieves the overall status for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of Envelope public ApiResponse GetEnvelopeWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.GetEnvelopeOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelope"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEnvelope"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.advancedUpdate != null) localVarQueryParams.Add("advanced_update", this.ApiClient.ParameterToString(options.advancedUpdate)); // query parameter if (options.include != null) localVarQueryParams.Add("include", this.ApiClient.ParameterToString(options.include)); // query parameter if (options.includeAnchorTabLocations != null) localVarQueryParams.Add("include_anchor_tab_locations", this.ApiClient.ParameterToString(options.includeAnchorTabLocations)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelope", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Envelope)this.ApiClient.Deserialize(localVarResponse, typeof(Envelope))); } /// /// Gets the status of a envelope. Retrieves the overall status for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of Envelope public async System.Threading.Tasks.Task GetEnvelopeAsync(string accountId, string envelopeId, EnvelopesApi.GetEnvelopeOptions options = null) { ApiResponse localVarResponse = await GetEnvelopeAsyncWithHttpInfo(accountId, envelopeId, options); return localVarResponse.Data; } /// /// Gets the status of a envelope. Retrieves the overall status for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (Envelope) public async System.Threading.Tasks.Task> GetEnvelopeAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.GetEnvelopeOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelope"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEnvelope"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.advancedUpdate != null) localVarQueryParams.Add("advanced_update", this.ApiClient.ParameterToString(options.advancedUpdate)); // query parameter if (options.include != null) localVarQueryParams.Add("include", this.ApiClient.ParameterToString(options.include)); // query parameter if (options.includeAnchorTabLocations != null) localVarQueryParams.Add("include_anchor_tab_locations", this.ApiClient.ParameterToString(options.includeAnchorTabLocations)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelope", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Envelope)this.ApiClient.Deserialize(localVarResponse, typeof(Envelope))); } /// /// Returns the delayed routing rules for an envelope's workflow step definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// DelayedRouting public DelayedRouting GetEnvelopeDelayedRoutingDefinition(string accountId, string envelopeId, string workflowStepId) { ApiResponse localVarResponse = GetEnvelopeDelayedRoutingDefinitionWithHttpInfo(accountId, envelopeId, workflowStepId); return localVarResponse.Data; } /// /// Returns the delayed routing rules for an envelope's workflow step definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// ApiResponse of DelayedRouting public ApiResponse GetEnvelopeDelayedRoutingDefinitionWithHttpInfo(string accountId, string envelopeId, string workflowStepId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelopeDelayedRoutingDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEnvelopeDelayedRoutingDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->GetEnvelopeDelayedRoutingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/steps/{workflowStepId}/delayedRouting"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelopeDelayedRoutingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DelayedRouting)this.ApiClient.Deserialize(localVarResponse, typeof(DelayedRouting))); } /// /// Returns the delayed routing rules for an envelope's workflow step definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of DelayedRouting public async System.Threading.Tasks.Task GetEnvelopeDelayedRoutingDefinitionAsync(string accountId, string envelopeId, string workflowStepId) { ApiResponse localVarResponse = await GetEnvelopeDelayedRoutingDefinitionAsyncWithHttpInfo(accountId, envelopeId, workflowStepId); return localVarResponse.Data; } /// /// Returns the delayed routing rules for an envelope's workflow step definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of ApiResponse (DelayedRouting) public async System.Threading.Tasks.Task> GetEnvelopeDelayedRoutingDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, string workflowStepId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelopeDelayedRoutingDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEnvelopeDelayedRoutingDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->GetEnvelopeDelayedRoutingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/steps/{workflowStepId}/delayedRouting"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelopeDelayedRoutingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DelayedRouting)this.ApiClient.Deserialize(localVarResponse, typeof(DelayedRouting))); } /// /// Returns formfields for an envelope /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// DocGenFormFieldResponse public DocGenFormFieldResponse GetEnvelopeDocGenFormFields(string accountId, string envelopeId) { ApiResponse localVarResponse = GetEnvelopeDocGenFormFieldsWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Returns formfields for an envelope /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of DocGenFormFieldResponse public ApiResponse GetEnvelopeDocGenFormFieldsWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelopeDocGenFormFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEnvelopeDocGenFormFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/docGenFormFields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelopeDocGenFormFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocGenFormFieldResponse)this.ApiClient.Deserialize(localVarResponse, typeof(DocGenFormFieldResponse))); } /// /// Returns formfields for an envelope /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of DocGenFormFieldResponse public async System.Threading.Tasks.Task GetEnvelopeDocGenFormFieldsAsync(string accountId, string envelopeId) { ApiResponse localVarResponse = await GetEnvelopeDocGenFormFieldsAsyncWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Returns formfields for an envelope /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (DocGenFormFieldResponse) public async System.Threading.Tasks.Task> GetEnvelopeDocGenFormFieldsAsyncWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelopeDocGenFormFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEnvelopeDocGenFormFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/docGenFormFields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelopeDocGenFormFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocGenFormFieldResponse)this.ApiClient.Deserialize(localVarResponse, typeof(DocGenFormFieldResponse))); } /// /// Get the Original HTML Definition used to generate the Responsive HTML for a given document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// DocumentHtmlDefinitionOriginals public DocumentHtmlDefinitionOriginals GetEnvelopeDocumentHtmlDefinitions(string accountId, string envelopeId, string documentId) { ApiResponse localVarResponse = GetEnvelopeDocumentHtmlDefinitionsWithHttpInfo(accountId, envelopeId, documentId); return localVarResponse.Data; } /// /// Get the Original HTML Definition used to generate the Responsive HTML for a given document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// ApiResponse of DocumentHtmlDefinitionOriginals public ApiResponse GetEnvelopeDocumentHtmlDefinitionsWithHttpInfo(string accountId, string envelopeId, string documentId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelopeDocumentHtmlDefinitions"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEnvelopeDocumentHtmlDefinitions"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->GetEnvelopeDocumentHtmlDefinitions"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/html_definitions"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelopeDocumentHtmlDefinitions", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentHtmlDefinitionOriginals)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentHtmlDefinitionOriginals))); } /// /// Get the Original HTML Definition used to generate the Responsive HTML for a given document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Task of DocumentHtmlDefinitionOriginals public async System.Threading.Tasks.Task GetEnvelopeDocumentHtmlDefinitionsAsync(string accountId, string envelopeId, string documentId) { ApiResponse localVarResponse = await GetEnvelopeDocumentHtmlDefinitionsAsyncWithHttpInfo(accountId, envelopeId, documentId); return localVarResponse.Data; } /// /// Get the Original HTML Definition used to generate the Responsive HTML for a given document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Task of ApiResponse (DocumentHtmlDefinitionOriginals) public async System.Threading.Tasks.Task> GetEnvelopeDocumentHtmlDefinitionsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelopeDocumentHtmlDefinitions"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEnvelopeDocumentHtmlDefinitions"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->GetEnvelopeDocumentHtmlDefinitions"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/html_definitions"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelopeDocumentHtmlDefinitions", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentHtmlDefinitionOriginals)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentHtmlDefinitionOriginals))); } /// /// Get the Original HTML Definition used to generate the Responsive HTML for the envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// DocumentHtmlDefinitionOriginals public DocumentHtmlDefinitionOriginals GetEnvelopeHtmlDefinitions(string accountId, string envelopeId) { ApiResponse localVarResponse = GetEnvelopeHtmlDefinitionsWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Get the Original HTML Definition used to generate the Responsive HTML for the envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of DocumentHtmlDefinitionOriginals public ApiResponse GetEnvelopeHtmlDefinitionsWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelopeHtmlDefinitions"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEnvelopeHtmlDefinitions"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/html_definitions"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelopeHtmlDefinitions", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentHtmlDefinitionOriginals)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentHtmlDefinitionOriginals))); } /// /// Get the Original HTML Definition used to generate the Responsive HTML for the envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of DocumentHtmlDefinitionOriginals public async System.Threading.Tasks.Task GetEnvelopeHtmlDefinitionsAsync(string accountId, string envelopeId) { ApiResponse localVarResponse = await GetEnvelopeHtmlDefinitionsAsyncWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Get the Original HTML Definition used to generate the Responsive HTML for the envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (DocumentHtmlDefinitionOriginals) public async System.Threading.Tasks.Task> GetEnvelopeHtmlDefinitionsAsyncWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelopeHtmlDefinitions"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEnvelopeHtmlDefinitions"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/html_definitions"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelopeHtmlDefinitions", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentHtmlDefinitionOriginals)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentHtmlDefinitionOriginals))); } /// /// Returns the scheduled sending rules for an envelope's workflow definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ScheduledSending public ScheduledSending GetEnvelopeScheduledSendingDefinition(string accountId, string envelopeId) { ApiResponse localVarResponse = GetEnvelopeScheduledSendingDefinitionWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Returns the scheduled sending rules for an envelope's workflow definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of ScheduledSending public ApiResponse GetEnvelopeScheduledSendingDefinitionWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelopeScheduledSendingDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEnvelopeScheduledSendingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/scheduledSending"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelopeScheduledSendingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ScheduledSending)this.ApiClient.Deserialize(localVarResponse, typeof(ScheduledSending))); } /// /// Returns the scheduled sending rules for an envelope's workflow definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ScheduledSending public async System.Threading.Tasks.Task GetEnvelopeScheduledSendingDefinitionAsync(string accountId, string envelopeId) { ApiResponse localVarResponse = await GetEnvelopeScheduledSendingDefinitionAsyncWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Returns the scheduled sending rules for an envelope's workflow definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (ScheduledSending) public async System.Threading.Tasks.Task> GetEnvelopeScheduledSendingDefinitionAsyncWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelopeScheduledSendingDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEnvelopeScheduledSendingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/scheduledSending"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelopeScheduledSendingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ScheduledSending)this.ApiClient.Deserialize(localVarResponse, typeof(ScheduledSending))); } /// /// Returns a list of envelope transfer rules in the specified account. This method retrieves a list of envelope transfer rules associated with an account. **Note:** Only Administrators can create and use envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// public class GetEnvelopeTransferRulesOptions { /// public string count {get; set;} /// public string startPosition {get; set;} } /// /// Returns a list of envelope transfer rules in the specified account. This method retrieves a list of envelope transfer rules associated with an account. **Note:** Only Administrators can create and use envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// Options for modifying the behavior of the function. /// EnvelopeTransferRuleInformation public EnvelopeTransferRuleInformation GetEnvelopeTransferRules(string accountId, EnvelopesApi.GetEnvelopeTransferRulesOptions options = null) { ApiResponse localVarResponse = GetEnvelopeTransferRulesWithHttpInfo(accountId, options); return localVarResponse.Data; } /// /// Returns a list of envelope transfer rules in the specified account. This method retrieves a list of envelope transfer rules associated with an account. **Note:** Only Administrators can create and use envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// Options for modifying the behavior of the function. /// ApiResponse of EnvelopeTransferRuleInformation public ApiResponse GetEnvelopeTransferRulesWithHttpInfo(string accountId, EnvelopesApi.GetEnvelopeTransferRulesOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelopeTransferRules"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/transfer_rules"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (options != null) { if (options.count != null) localVarQueryParams.Add("count", this.ApiClient.ParameterToString(options.count)); // query parameter if (options.startPosition != null) localVarQueryParams.Add("start_position", this.ApiClient.ParameterToString(options.startPosition)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelopeTransferRules", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeTransferRuleInformation)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeTransferRuleInformation))); } /// /// Returns a list of envelope transfer rules in the specified account. This method retrieves a list of envelope transfer rules associated with an account. **Note:** Only Administrators can create and use envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// Options for modifying the behavior of the function. /// Task of EnvelopeTransferRuleInformation public async System.Threading.Tasks.Task GetEnvelopeTransferRulesAsync(string accountId, EnvelopesApi.GetEnvelopeTransferRulesOptions options = null) { ApiResponse localVarResponse = await GetEnvelopeTransferRulesAsyncWithHttpInfo(accountId, options); return localVarResponse.Data; } /// /// Returns a list of envelope transfer rules in the specified account. This method retrieves a list of envelope transfer rules associated with an account. **Note:** Only Administrators can create and use envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// Options for modifying the behavior of the function. /// Task of ApiResponse (EnvelopeTransferRuleInformation) public async System.Threading.Tasks.Task> GetEnvelopeTransferRulesAsyncWithHttpInfo(string accountId, EnvelopesApi.GetEnvelopeTransferRulesOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelopeTransferRules"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/transfer_rules"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (options != null) { if (options.count != null) localVarQueryParams.Add("count", this.ApiClient.ParameterToString(options.count)); // query parameter if (options.startPosition != null) localVarQueryParams.Add("start_position", this.ApiClient.ParameterToString(options.startPosition)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelopeTransferRules", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeTransferRuleInformation)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeTransferRuleInformation))); } /// /// Returns the workflow definition for an envelope. Returns an envelope's workflow definition if the envelope specified by `envelopeId` has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Workflow public Workflow GetEnvelopeWorkflowDefinition(string accountId, string envelopeId) { ApiResponse localVarResponse = GetEnvelopeWorkflowDefinitionWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Returns the workflow definition for an envelope. Returns an envelope's workflow definition if the envelope specified by `envelopeId` has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of Workflow public ApiResponse GetEnvelopeWorkflowDefinitionWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelopeWorkflowDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEnvelopeWorkflowDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelopeWorkflowDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Workflow)this.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); } /// /// Returns the workflow definition for an envelope. Returns an envelope's workflow definition if the envelope specified by `envelopeId` has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of Workflow public async System.Threading.Tasks.Task GetEnvelopeWorkflowDefinitionAsync(string accountId, string envelopeId) { ApiResponse localVarResponse = await GetEnvelopeWorkflowDefinitionAsyncWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Returns the workflow definition for an envelope. Returns an envelope's workflow definition if the envelope specified by `envelopeId` has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (Workflow) public async System.Threading.Tasks.Task> GetEnvelopeWorkflowDefinitionAsyncWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelopeWorkflowDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEnvelopeWorkflowDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelopeWorkflowDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Workflow)this.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); } /// /// Returns the workflow step definition for an envelope by step id. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// WorkflowStep public WorkflowStep GetEnvelopeWorkflowStepDefinition(string accountId, string envelopeId, string workflowStepId) { ApiResponse localVarResponse = GetEnvelopeWorkflowStepDefinitionWithHttpInfo(accountId, envelopeId, workflowStepId); return localVarResponse.Data; } /// /// Returns the workflow step definition for an envelope by step id. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// ApiResponse of WorkflowStep public ApiResponse GetEnvelopeWorkflowStepDefinitionWithHttpInfo(string accountId, string envelopeId, string workflowStepId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelopeWorkflowStepDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEnvelopeWorkflowStepDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->GetEnvelopeWorkflowStepDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/steps/{workflowStepId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelopeWorkflowStepDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (WorkflowStep)this.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStep))); } /// /// Returns the workflow step definition for an envelope by step id. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of WorkflowStep public async System.Threading.Tasks.Task GetEnvelopeWorkflowStepDefinitionAsync(string accountId, string envelopeId, string workflowStepId) { ApiResponse localVarResponse = await GetEnvelopeWorkflowStepDefinitionAsyncWithHttpInfo(accountId, envelopeId, workflowStepId); return localVarResponse.Data; } /// /// Returns the workflow step definition for an envelope by step id. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// Task of ApiResponse (WorkflowStep) public async System.Threading.Tasks.Task> GetEnvelopeWorkflowStepDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, string workflowStepId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetEnvelopeWorkflowStepDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetEnvelopeWorkflowStepDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->GetEnvelopeWorkflowStepDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/steps/{workflowStepId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetEnvelopeWorkflowStepDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (WorkflowStep)this.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStep))); } /// /// Returns envelope form data for an existing envelope. This method downloads the envelope and tab data (also called form data) from any in-process, completed, or canceled envelope that you sent or that is shared with you. Recipients who are also full administrators on an account can view form data for any envelopes that another user on the account has sent to them. **Note:** To use this feature, the Sending Setting \"Allow sender to download form data\" must be enabled for the account. ### Related topics - [How to get envelope tab values](/docs/esign-rest-api/how-to/get-envelope-tab-values/) /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// EnvelopeFormData public EnvelopeFormData GetFormData(string accountId, string envelopeId) { ApiResponse localVarResponse = GetFormDataWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Returns envelope form data for an existing envelope. This method downloads the envelope and tab data (also called form data) from any in-process, completed, or canceled envelope that you sent or that is shared with you. Recipients who are also full administrators on an account can view form data for any envelopes that another user on the account has sent to them. **Note:** To use this feature, the Sending Setting \"Allow sender to download form data\" must be enabled for the account. ### Related topics - [How to get envelope tab values](/docs/esign-rest-api/how-to/get-envelope-tab-values/) /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of EnvelopeFormData public ApiResponse GetFormDataWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetFormData"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetFormData"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/form_data"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetFormData", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeFormData)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeFormData))); } /// /// Returns envelope form data for an existing envelope. This method downloads the envelope and tab data (also called form data) from any in-process, completed, or canceled envelope that you sent or that is shared with you. Recipients who are also full administrators on an account can view form data for any envelopes that another user on the account has sent to them. **Note:** To use this feature, the Sending Setting \"Allow sender to download form data\" must be enabled for the account. ### Related topics - [How to get envelope tab values](/docs/esign-rest-api/how-to/get-envelope-tab-values/) /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of EnvelopeFormData public async System.Threading.Tasks.Task GetFormDataAsync(string accountId, string envelopeId) { ApiResponse localVarResponse = await GetFormDataAsyncWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Returns envelope form data for an existing envelope. This method downloads the envelope and tab data (also called form data) from any in-process, completed, or canceled envelope that you sent or that is shared with you. Recipients who are also full administrators on an account can view form data for any envelopes that another user on the account has sent to them. **Note:** To use this feature, the Sending Setting \"Allow sender to download form data\" must be enabled for the account. ### Related topics - [How to get envelope tab values](/docs/esign-rest-api/how-to/get-envelope-tab-values/) /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (EnvelopeFormData) public async System.Threading.Tasks.Task> GetFormDataAsyncWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetFormData"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetFormData"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/form_data"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetFormData", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeFormData)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeFormData))); } /// /// Gets envelope lock information. Retrieves general information about the envelope lock. If the call is made by the locked by user and the request has the same integrator key as original, then the `X-DocuSign-Edit` header and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// LockInformation public LockInformation GetLock(string accountId, string envelopeId) { ApiResponse localVarResponse = GetLockWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Gets envelope lock information. Retrieves general information about the envelope lock. If the call is made by the locked by user and the request has the same integrator key as original, then the `X-DocuSign-Edit` header and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of LockInformation public ApiResponse GetLockWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetLock"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetLock"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetLock", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (LockInformation)this.ApiClient.Deserialize(localVarResponse, typeof(LockInformation))); } /// /// Gets envelope lock information. Retrieves general information about the envelope lock. If the call is made by the locked by user and the request has the same integrator key as original, then the `X-DocuSign-Edit` header and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of LockInformation public async System.Threading.Tasks.Task GetLockAsync(string accountId, string envelopeId) { ApiResponse localVarResponse = await GetLockAsyncWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Gets envelope lock information. Retrieves general information about the envelope lock. If the call is made by the locked by user and the request has the same integrator key as original, then the `X-DocuSign-Edit` header and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (LockInformation) public async System.Threading.Tasks.Task> GetLockAsyncWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetLock"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetLock"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetLock", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (LockInformation)this.ApiClient.Deserialize(localVarResponse, typeof(LockInformation))); } /// /// Gets envelope notification information. Retrieves the envelope notification, reminders and expirations, information for an existing envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Notification public Notification GetNotificationSettings(string accountId, string envelopeId) { ApiResponse localVarResponse = GetNotificationSettingsWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Gets envelope notification information. Retrieves the envelope notification, reminders and expirations, information for an existing envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of Notification public ApiResponse GetNotificationSettingsWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetNotificationSettings"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetNotificationSettings"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/notification"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetNotificationSettings", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Notification)this.ApiClient.Deserialize(localVarResponse, typeof(Notification))); } /// /// Gets envelope notification information. Retrieves the envelope notification, reminders and expirations, information for an existing envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of Notification public async System.Threading.Tasks.Task GetNotificationSettingsAsync(string accountId, string envelopeId) { ApiResponse localVarResponse = await GetNotificationSettingsAsyncWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Gets envelope notification information. Retrieves the envelope notification, reminders and expirations, information for an existing envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (Notification) public async System.Threading.Tasks.Task> GetNotificationSettingsAsyncWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetNotificationSettings"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetNotificationSettings"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/notification"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetNotificationSettings", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Notification)this.ApiClient.Deserialize(localVarResponse, typeof(Notification))); } /// /// Returns tabs on the specified page. Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Tabs public Tabs GetPageTabs(string accountId, string envelopeId, string documentId, string pageNumber) { ApiResponse localVarResponse = GetPageTabsWithHttpInfo(accountId, envelopeId, documentId, pageNumber); return localVarResponse.Data; } /// /// Returns tabs on the specified page. Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// ApiResponse of Tabs public ApiResponse GetPageTabsWithHttpInfo(string accountId, string envelopeId, string documentId, string pageNumber) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetPageTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetPageTabs"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->GetPageTabs"); // verify the required parameter 'pageNumber' is set if (pageNumber == null) throw new ApiException(400, "Missing required parameter 'pageNumber' when calling EnvelopesApi->GetPageTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages/{pageNumber}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (pageNumber != null) localVarPathParams.Add("pageNumber", this.ApiClient.ParameterToString(pageNumber)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetPageTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Returns tabs on the specified page. Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Task of Tabs public async System.Threading.Tasks.Task GetPageTabsAsync(string accountId, string envelopeId, string documentId, string pageNumber) { ApiResponse localVarResponse = await GetPageTabsAsyncWithHttpInfo(accountId, envelopeId, documentId, pageNumber); return localVarResponse.Data; } /// /// Returns tabs on the specified page. Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// Task of ApiResponse (Tabs) public async System.Threading.Tasks.Task> GetPageTabsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, string pageNumber) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetPageTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetPageTabs"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->GetPageTabs"); // verify the required parameter 'pageNumber' is set if (pageNumber == null) throw new ApiException(400, "Missing required parameter 'pageNumber' when calling EnvelopesApi->GetPageTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages/{pageNumber}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (pageNumber != null) localVarPathParams.Add("pageNumber", this.ApiClient.ParameterToString(pageNumber)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetPageTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Returns document page image(s) based on input. Returns images of the pages in a document for display based on the parameters that you specify. /// public class GetPagesOptions { /// public string count {get; set;} /// public string dpi {get; set;} /// public string maxHeight {get; set;} /// public string maxWidth {get; set;} /// public string nocache {get; set;} /// public string showChanges {get; set;} /// public string startPosition {get; set;} } /// /// Returns document page image(s) based on input. Returns images of the pages in a document for display based on the parameters that you specify. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// PageImages public PageImages GetPages(string accountId, string envelopeId, string documentId, EnvelopesApi.GetPagesOptions options = null) { ApiResponse localVarResponse = GetPagesWithHttpInfo(accountId, envelopeId, documentId, options); return localVarResponse.Data; } /// /// Returns document page image(s) based on input. Returns images of the pages in a document for display based on the parameters that you specify. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of PageImages public ApiResponse GetPagesWithHttpInfo(string accountId, string envelopeId, string documentId, EnvelopesApi.GetPagesOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetPages"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetPages"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->GetPages"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (options != null) { if (options.count != null) localVarQueryParams.Add("count", this.ApiClient.ParameterToString(options.count)); // query parameter if (options.dpi != null) localVarQueryParams.Add("dpi", this.ApiClient.ParameterToString(options.dpi)); // query parameter if (options.maxHeight != null) localVarQueryParams.Add("max_height", this.ApiClient.ParameterToString(options.maxHeight)); // query parameter if (options.maxWidth != null) localVarQueryParams.Add("max_width", this.ApiClient.ParameterToString(options.maxWidth)); // query parameter if (options.nocache != null) localVarQueryParams.Add("nocache", this.ApiClient.ParameterToString(options.nocache)); // query parameter if (options.showChanges != null) localVarQueryParams.Add("show_changes", this.ApiClient.ParameterToString(options.showChanges)); // query parameter if (options.startPosition != null) localVarQueryParams.Add("start_position", this.ApiClient.ParameterToString(options.startPosition)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetPages", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (PageImages)this.ApiClient.Deserialize(localVarResponse, typeof(PageImages))); } /// /// Returns document page image(s) based on input. Returns images of the pages in a document for display based on the parameters that you specify. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Task of PageImages public async System.Threading.Tasks.Task GetPagesAsync(string accountId, string envelopeId, string documentId, EnvelopesApi.GetPagesOptions options = null) { ApiResponse localVarResponse = await GetPagesAsyncWithHttpInfo(accountId, envelopeId, documentId, options); return localVarResponse.Data; } /// /// Returns document page image(s) based on input. Returns images of the pages in a document for display based on the parameters that you specify. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (PageImages) public async System.Threading.Tasks.Task> GetPagesAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, EnvelopesApi.GetPagesOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetPages"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetPages"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->GetPages"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (options != null) { if (options.count != null) localVarQueryParams.Add("count", this.ApiClient.ParameterToString(options.count)); // query parameter if (options.dpi != null) localVarQueryParams.Add("dpi", this.ApiClient.ParameterToString(options.dpi)); // query parameter if (options.maxHeight != null) localVarQueryParams.Add("max_height", this.ApiClient.ParameterToString(options.maxHeight)); // query parameter if (options.maxWidth != null) localVarQueryParams.Add("max_width", this.ApiClient.ParameterToString(options.maxWidth)); // query parameter if (options.nocache != null) localVarQueryParams.Add("nocache", this.ApiClient.ParameterToString(options.nocache)); // query parameter if (options.showChanges != null) localVarQueryParams.Add("show_changes", this.ApiClient.ParameterToString(options.showChanges)); // query parameter if (options.startPosition != null) localVarQueryParams.Add("start_position", this.ApiClient.ParameterToString(options.startPosition)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetPages", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (PageImages)this.ApiClient.Deserialize(localVarResponse, typeof(PageImages))); } /// /// Returns document visibility for the recipients This method returns information about document visibility for a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// DocumentVisibilityList public DocumentVisibilityList GetRecipientDocumentVisibility(string accountId, string envelopeId, string recipientId) { ApiResponse localVarResponse = GetRecipientDocumentVisibilityWithHttpInfo(accountId, envelopeId, recipientId); return localVarResponse.Data; } /// /// Returns document visibility for the recipients This method returns information about document visibility for a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// ApiResponse of DocumentVisibilityList public ApiResponse GetRecipientDocumentVisibilityWithHttpInfo(string accountId, string envelopeId, string recipientId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetRecipientDocumentVisibility"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetRecipientDocumentVisibility"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->GetRecipientDocumentVisibility"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/document_visibility"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetRecipientDocumentVisibility", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentVisibilityList)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentVisibilityList))); } /// /// Returns document visibility for the recipients This method returns information about document visibility for a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of DocumentVisibilityList public async System.Threading.Tasks.Task GetRecipientDocumentVisibilityAsync(string accountId, string envelopeId, string recipientId) { ApiResponse localVarResponse = await GetRecipientDocumentVisibilityAsyncWithHttpInfo(accountId, envelopeId, recipientId); return localVarResponse.Data; } /// /// Returns document visibility for the recipients This method returns information about document visibility for a recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of ApiResponse (DocumentVisibilityList) public async System.Threading.Tasks.Task> GetRecipientDocumentVisibilityAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetRecipientDocumentVisibility"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetRecipientDocumentVisibility"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->GetRecipientDocumentVisibility"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/document_visibility"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetRecipientDocumentVisibility", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentVisibilityList)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentVisibilityList))); } /// /// Gets the initials image for a user. Retrieves the initials image for the specified user. The image is returned in the same format as it was uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user id and the user must be a member of the account. The `signatureIdOrName` paramter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only contain chromed images. If getting the non-chromed image fails, try getting the chromed image. /// public class GetRecipientInitialsImageOptions { /// The added line and identifier around the initial image. Note: Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image. public string includeChrome {get; set;} } /// /// Gets the initials image for a user. Retrieves the initials image for the specified user. The image is returned in the same format as it was uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user id and the user must be a member of the account. The `signatureIdOrName` paramter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only contain chromed images. If getting the non-chromed image fails, try getting the chromed image. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// System.IO.Stream public System.IO.Stream GetRecipientInitialsImage(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetRecipientInitialsImageOptions options = null) { ApiResponse localVarResponse = GetRecipientInitialsImageWithHttpInfo(accountId, envelopeId, recipientId, options); return localVarResponse.Data; } /// /// Gets the initials image for a user. Retrieves the initials image for the specified user. The image is returned in the same format as it was uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user id and the user must be a member of the account. The `signatureIdOrName` paramter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only contain chromed images. If getting the non-chromed image fails, try getting the chromed image. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of System.IO.Stream public ApiResponse GetRecipientInitialsImageWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetRecipientInitialsImageOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetRecipientInitialsImage"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetRecipientInitialsImage"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->GetRecipientInitialsImage"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/initials_image"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "image/gif" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (options != null) { if (options.includeChrome != null) localVarQueryParams.Add("include_chrome", this.ApiClient.ParameterToString(options.includeChrome)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetRecipientInitialsImage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (System.IO.Stream)this.ApiClient.Deserialize(localVarResponse, typeof(System.IO.Stream))); } /// /// Gets the initials image for a user. Retrieves the initials image for the specified user. The image is returned in the same format as it was uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user id and the user must be a member of the account. The `signatureIdOrName` paramter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only contain chromed images. If getting the non-chromed image fails, try getting the chromed image. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetRecipientInitialsImageAsync(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetRecipientInitialsImageOptions options = null) { ApiResponse localVarResponse = await GetRecipientInitialsImageAsyncWithHttpInfo(accountId, envelopeId, recipientId, options); return localVarResponse.Data; } /// /// Gets the initials image for a user. Retrieves the initials image for the specified user. The image is returned in the same format as it was uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user id and the user must be a member of the account. The `signatureIdOrName` paramter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only contain chromed images. If getting the non-chromed image fails, try getting the chromed image. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetRecipientInitialsImageAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetRecipientInitialsImageOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetRecipientInitialsImage"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetRecipientInitialsImage"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->GetRecipientInitialsImage"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/initials_image"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "image/gif" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (options != null) { if (options.includeChrome != null) localVarQueryParams.Add("include_chrome", this.ApiClient.ParameterToString(options.includeChrome)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetRecipientInitialsImage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (System.IO.Stream)this.ApiClient.Deserialize(localVarResponse, typeof(System.IO.Stream))); } /// /// Gets signature information for a signer or sign-in-person recipient. Retrieves signature information for a signer or sign-in-person recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// UserSignature public UserSignature GetRecipientSignature(string accountId, string envelopeId, string recipientId) { ApiResponse localVarResponse = GetRecipientSignatureWithHttpInfo(accountId, envelopeId, recipientId); return localVarResponse.Data; } /// /// Gets signature information for a signer or sign-in-person recipient. Retrieves signature information for a signer or sign-in-person recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// ApiResponse of UserSignature public ApiResponse GetRecipientSignatureWithHttpInfo(string accountId, string envelopeId, string recipientId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetRecipientSignature"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetRecipientSignature"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->GetRecipientSignature"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/signature"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetRecipientSignature", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (UserSignature)this.ApiClient.Deserialize(localVarResponse, typeof(UserSignature))); } /// /// Gets signature information for a signer or sign-in-person recipient. Retrieves signature information for a signer or sign-in-person recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of UserSignature public async System.Threading.Tasks.Task GetRecipientSignatureAsync(string accountId, string envelopeId, string recipientId) { ApiResponse localVarResponse = await GetRecipientSignatureAsyncWithHttpInfo(accountId, envelopeId, recipientId); return localVarResponse.Data; } /// /// Gets signature information for a signer or sign-in-person recipient. Retrieves signature information for a signer or sign-in-person recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of ApiResponse (UserSignature) public async System.Threading.Tasks.Task> GetRecipientSignatureAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetRecipientSignature"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetRecipientSignature"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->GetRecipientSignature"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/signature"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetRecipientSignature", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (UserSignature)this.ApiClient.Deserialize(localVarResponse, typeof(UserSignature))); } /// /// Retrieve signature image information for a signer/sign-in-person recipient. Retrieves the specified user signature image. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureIdOrName` parameter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that don't properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image. /// public class GetRecipientSignatureImageOptions { /// When set to **true**, indicates the chromed version of the signature image should be retrieved. public string includeChrome {get; set;} } /// /// Retrieve signature image information for a signer/sign-in-person recipient. Retrieves the specified user signature image. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureIdOrName` parameter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that don't properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// System.IO.Stream public System.IO.Stream GetRecipientSignatureImage(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetRecipientSignatureImageOptions options = null) { ApiResponse localVarResponse = GetRecipientSignatureImageWithHttpInfo(accountId, envelopeId, recipientId, options); return localVarResponse.Data; } /// /// Retrieve signature image information for a signer/sign-in-person recipient. Retrieves the specified user signature image. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureIdOrName` parameter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that don't properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of System.IO.Stream public ApiResponse GetRecipientSignatureImageWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetRecipientSignatureImageOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetRecipientSignatureImage"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetRecipientSignatureImage"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->GetRecipientSignatureImage"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/signature_image"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "image/gif" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (options != null) { if (options.includeChrome != null) localVarQueryParams.Add("include_chrome", this.ApiClient.ParameterToString(options.includeChrome)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetRecipientSignatureImage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (System.IO.Stream)this.ApiClient.Deserialize(localVarResponse, typeof(System.IO.Stream))); } /// /// Retrieve signature image information for a signer/sign-in-person recipient. Retrieves the specified user signature image. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureIdOrName` parameter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that don't properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetRecipientSignatureImageAsync(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetRecipientSignatureImageOptions options = null) { ApiResponse localVarResponse = await GetRecipientSignatureImageAsyncWithHttpInfo(accountId, envelopeId, recipientId, options); return localVarResponse.Data; } /// /// Retrieve signature image information for a signer/sign-in-person recipient. Retrieves the specified user signature image. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureIdOrName` parameter accepts signature ID or signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that don't properly URL encode. If you use the user name, it is likely that the name includes spaces and you might need to URL encode the name before using it in the endpoint. For example: \"Bob Smith\" to \"Bob%20Smith\" Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetRecipientSignatureImageAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.GetRecipientSignatureImageOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetRecipientSignatureImage"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetRecipientSignatureImage"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->GetRecipientSignatureImage"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/signature_image"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "image/gif" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (options != null) { if (options.includeChrome != null) localVarQueryParams.Add("include_chrome", this.ApiClient.ParameterToString(options.includeChrome)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetRecipientSignatureImage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (System.IO.Stream)this.ApiClient.Deserialize(localVarResponse, typeof(System.IO.Stream))); } /// /// Get encrypted tabs for envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// public void GetTabsBlob(string accountId, string envelopeId) { GetTabsBlobWithHttpInfo(accountId, envelopeId); } /// /// Get encrypted tabs for envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of Object(void) public ApiResponse GetTabsBlobWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetTabsBlob"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetTabsBlob"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/tabs_blob"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetTabsBlob", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Get encrypted tabs for envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of void public async System.Threading.Tasks.Task GetTabsBlobAsync(string accountId, string envelopeId) { await GetTabsBlobAsyncWithHttpInfo(accountId, envelopeId); } /// /// Get encrypted tabs for envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse public async System.Threading.Tasks.Task> GetTabsBlobAsyncWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetTabsBlob"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->GetTabsBlob"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/tabs_blob"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetTabsBlob", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Returns the delayed routing rules for a template's workflow step definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// DelayedRouting public DelayedRouting GetTemplateDelayedRoutingDefinition(string accountId, string templateId, string workflowStepId) { ApiResponse localVarResponse = GetTemplateDelayedRoutingDefinitionWithHttpInfo(accountId, templateId, workflowStepId); return localVarResponse.Data; } /// /// Returns the delayed routing rules for a template's workflow step definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// ApiResponse of DelayedRouting public ApiResponse GetTemplateDelayedRoutingDefinitionWithHttpInfo(string accountId, string templateId, string workflowStepId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetTemplateDelayedRoutingDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->GetTemplateDelayedRoutingDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->GetTemplateDelayedRoutingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/steps/{workflowStepId}/delayedRouting"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetTemplateDelayedRoutingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DelayedRouting)this.ApiClient.Deserialize(localVarResponse, typeof(DelayedRouting))); } /// /// Returns the delayed routing rules for a template's workflow step definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// Task of DelayedRouting public async System.Threading.Tasks.Task GetTemplateDelayedRoutingDefinitionAsync(string accountId, string templateId, string workflowStepId) { ApiResponse localVarResponse = await GetTemplateDelayedRoutingDefinitionAsyncWithHttpInfo(accountId, templateId, workflowStepId); return localVarResponse.Data; } /// /// Returns the delayed routing rules for a template's workflow step definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// Task of ApiResponse (DelayedRouting) public async System.Threading.Tasks.Task> GetTemplateDelayedRoutingDefinitionAsyncWithHttpInfo(string accountId, string templateId, string workflowStepId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetTemplateDelayedRoutingDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->GetTemplateDelayedRoutingDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->GetTemplateDelayedRoutingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/steps/{workflowStepId}/delayedRouting"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetTemplateDelayedRoutingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DelayedRouting)this.ApiClient.Deserialize(localVarResponse, typeof(DelayedRouting))); } /// /// Returns document visibility for the recipients This method returns information about document visibility for a template recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// The ID of the recipient being accessed. /// DocumentVisibilityList public DocumentVisibilityList GetTemplateRecipientDocumentVisibility(string accountId, string templateId, string recipientId) { ApiResponse localVarResponse = GetTemplateRecipientDocumentVisibilityWithHttpInfo(accountId, templateId, recipientId); return localVarResponse.Data; } /// /// Returns document visibility for the recipients This method returns information about document visibility for a template recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// The ID of the recipient being accessed. /// ApiResponse of DocumentVisibilityList public ApiResponse GetTemplateRecipientDocumentVisibilityWithHttpInfo(string accountId, string templateId, string recipientId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetTemplateRecipientDocumentVisibility"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->GetTemplateRecipientDocumentVisibility"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->GetTemplateRecipientDocumentVisibility"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/document_visibility"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetTemplateRecipientDocumentVisibility", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentVisibilityList)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentVisibilityList))); } /// /// Returns document visibility for the recipients This method returns information about document visibility for a template recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// The ID of the recipient being accessed. /// Task of DocumentVisibilityList public async System.Threading.Tasks.Task GetTemplateRecipientDocumentVisibilityAsync(string accountId, string templateId, string recipientId) { ApiResponse localVarResponse = await GetTemplateRecipientDocumentVisibilityAsyncWithHttpInfo(accountId, templateId, recipientId); return localVarResponse.Data; } /// /// Returns document visibility for the recipients This method returns information about document visibility for a template recipient. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// The ID of the recipient being accessed. /// Task of ApiResponse (DocumentVisibilityList) public async System.Threading.Tasks.Task> GetTemplateRecipientDocumentVisibilityAsyncWithHttpInfo(string accountId, string templateId, string recipientId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetTemplateRecipientDocumentVisibility"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->GetTemplateRecipientDocumentVisibility"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->GetTemplateRecipientDocumentVisibility"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/document_visibility"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetTemplateRecipientDocumentVisibility", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentVisibilityList)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentVisibilityList))); } /// /// Returns the scheduled sending rules for a template's workflow definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// ScheduledSending public ScheduledSending GetTemplateScheduledSendingDefinition(string accountId, string templateId) { ApiResponse localVarResponse = GetTemplateScheduledSendingDefinitionWithHttpInfo(accountId, templateId); return localVarResponse.Data; } /// /// Returns the scheduled sending rules for a template's workflow definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// ApiResponse of ScheduledSending public ApiResponse GetTemplateScheduledSendingDefinitionWithHttpInfo(string accountId, string templateId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetTemplateScheduledSendingDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->GetTemplateScheduledSendingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/scheduledSending"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetTemplateScheduledSendingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ScheduledSending)this.ApiClient.Deserialize(localVarResponse, typeof(ScheduledSending))); } /// /// Returns the scheduled sending rules for a template's workflow definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Task of ScheduledSending public async System.Threading.Tasks.Task GetTemplateScheduledSendingDefinitionAsync(string accountId, string templateId) { ApiResponse localVarResponse = await GetTemplateScheduledSendingDefinitionAsyncWithHttpInfo(accountId, templateId); return localVarResponse.Data; } /// /// Returns the scheduled sending rules for a template's workflow definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Task of ApiResponse (ScheduledSending) public async System.Threading.Tasks.Task> GetTemplateScheduledSendingDefinitionAsyncWithHttpInfo(string accountId, string templateId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetTemplateScheduledSendingDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->GetTemplateScheduledSendingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/scheduledSending"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetTemplateScheduledSendingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ScheduledSending)this.ApiClient.Deserialize(localVarResponse, typeof(ScheduledSending))); } /// /// Returns the workflow definition for a template. Returns template's workflow definition if the template specified by `templateId` has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Workflow public Workflow GetTemplateWorkflowDefinition(string accountId, string templateId) { ApiResponse localVarResponse = GetTemplateWorkflowDefinitionWithHttpInfo(accountId, templateId); return localVarResponse.Data; } /// /// Returns the workflow definition for a template. Returns template's workflow definition if the template specified by `templateId` has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// ApiResponse of Workflow public ApiResponse GetTemplateWorkflowDefinitionWithHttpInfo(string accountId, string templateId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetTemplateWorkflowDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->GetTemplateWorkflowDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetTemplateWorkflowDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Workflow)this.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); } /// /// Returns the workflow definition for a template. Returns template's workflow definition if the template specified by `templateId` has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Task of Workflow public async System.Threading.Tasks.Task GetTemplateWorkflowDefinitionAsync(string accountId, string templateId) { ApiResponse localVarResponse = await GetTemplateWorkflowDefinitionAsyncWithHttpInfo(accountId, templateId); return localVarResponse.Data; } /// /// Returns the workflow definition for a template. Returns template's workflow definition if the template specified by `templateId` has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// Task of ApiResponse (Workflow) public async System.Threading.Tasks.Task> GetTemplateWorkflowDefinitionAsyncWithHttpInfo(string accountId, string templateId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetTemplateWorkflowDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->GetTemplateWorkflowDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetTemplateWorkflowDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Workflow)this.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); } /// /// Returns the workflow step definition for a template by step id. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// WorkflowStep public WorkflowStep GetTemplateWorkflowStepDefinition(string accountId, string templateId, string workflowStepId) { ApiResponse localVarResponse = GetTemplateWorkflowStepDefinitionWithHttpInfo(accountId, templateId, workflowStepId); return localVarResponse.Data; } /// /// Returns the workflow step definition for a template by step id. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// ApiResponse of WorkflowStep public ApiResponse GetTemplateWorkflowStepDefinitionWithHttpInfo(string accountId, string templateId, string workflowStepId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetTemplateWorkflowStepDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->GetTemplateWorkflowStepDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->GetTemplateWorkflowStepDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/steps/{workflowStepId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetTemplateWorkflowStepDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (WorkflowStep)this.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStep))); } /// /// Returns the workflow step definition for a template by step id. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// Task of WorkflowStep public async System.Threading.Tasks.Task GetTemplateWorkflowStepDefinitionAsync(string accountId, string templateId, string workflowStepId) { ApiResponse localVarResponse = await GetTemplateWorkflowStepDefinitionAsyncWithHttpInfo(accountId, templateId, workflowStepId); return localVarResponse.Data; } /// /// Returns the workflow step definition for a template by step id. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// Task of ApiResponse (WorkflowStep) public async System.Threading.Tasks.Task> GetTemplateWorkflowStepDefinitionAsyncWithHttpInfo(string accountId, string templateId, string workflowStepId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->GetTemplateWorkflowStepDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->GetTemplateWorkflowStepDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->GetTemplateWorkflowStepDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/steps/{workflowStepId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("GetTemplateWorkflowStepDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (WorkflowStep)this.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStep))); } /// /// Gets the envelope audit events for an envelope. Gets the envelope audit events for the specified envelope. /// public class ListAuditEventsOptions { /// Locale setting for the response, e.g., 'en-US'. public string locale {get; set;} } /// /// Gets the envelope audit events for an envelope. Gets the envelope audit events for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// EnvelopeAuditEventResponse public EnvelopeAuditEventResponse ListAuditEvents(string accountId, string envelopeId, EnvelopesApi.ListAuditEventsOptions options = null) { ApiResponse localVarResponse = ListAuditEventsWithHttpInfo(accountId, envelopeId, options); return localVarResponse.Data; } /// /// Gets the envelope audit events for an envelope. Gets the envelope audit events for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of EnvelopeAuditEventResponse public ApiResponse ListAuditEventsWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.ListAuditEventsOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListAuditEvents"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ListAuditEvents"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/audit_events"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.locale != null) localVarQueryParams.Add("locale", this.ApiClient.ParameterToString(options.locale)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListAuditEvents", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeAuditEventResponse)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeAuditEventResponse))); } /// /// Gets the envelope audit events for an envelope. Gets the envelope audit events for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of EnvelopeAuditEventResponse public async System.Threading.Tasks.Task ListAuditEventsAsync(string accountId, string envelopeId, EnvelopesApi.ListAuditEventsOptions options = null) { ApiResponse localVarResponse = await ListAuditEventsAsyncWithHttpInfo(accountId, envelopeId, options); return localVarResponse.Data; } /// /// Gets the envelope audit events for an envelope. Gets the envelope audit events for the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (EnvelopeAuditEventResponse) public async System.Threading.Tasks.Task> ListAuditEventsAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.ListAuditEventsOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListAuditEvents"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ListAuditEvents"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/audit_events"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.locale != null) localVarQueryParams.Add("locale", this.ApiClient.ParameterToString(options.locale)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListAuditEvents", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeAuditEventResponse)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeAuditEventResponse))); } /// /// Gets the custom field information for the specified envelope. Retrieves the custom field information for the specified envelope. You can use these fields in the envelopes for your account to record information about the envelope, help search for envelopes, and track information. The envelope custom fields are shown in the Envelope Settings section when a user is creating an envelope in the DocuSign member console. The envelope custom fields are not seen by the envelope recipients. There are two types of envelope custom fields, text, and list. A text custom field lets the sender enter the value for the field. With a list custom field, the sender selects the value of the field from a pre-made list. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// CustomFieldsEnvelope public CustomFieldsEnvelope ListCustomFields(string accountId, string envelopeId) { ApiResponse localVarResponse = ListCustomFieldsWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Gets the custom field information for the specified envelope. Retrieves the custom field information for the specified envelope. You can use these fields in the envelopes for your account to record information about the envelope, help search for envelopes, and track information. The envelope custom fields are shown in the Envelope Settings section when a user is creating an envelope in the DocuSign member console. The envelope custom fields are not seen by the envelope recipients. There are two types of envelope custom fields, text, and list. A text custom field lets the sender enter the value for the field. With a list custom field, the sender selects the value of the field from a pre-made list. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of CustomFieldsEnvelope public ApiResponse ListCustomFieldsWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListCustomFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ListCustomFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListCustomFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (CustomFieldsEnvelope)this.ApiClient.Deserialize(localVarResponse, typeof(CustomFieldsEnvelope))); } /// /// Gets the custom field information for the specified envelope. Retrieves the custom field information for the specified envelope. You can use these fields in the envelopes for your account to record information about the envelope, help search for envelopes, and track information. The envelope custom fields are shown in the Envelope Settings section when a user is creating an envelope in the DocuSign member console. The envelope custom fields are not seen by the envelope recipients. There are two types of envelope custom fields, text, and list. A text custom field lets the sender enter the value for the field. With a list custom field, the sender selects the value of the field from a pre-made list. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of CustomFieldsEnvelope public async System.Threading.Tasks.Task ListCustomFieldsAsync(string accountId, string envelopeId) { ApiResponse localVarResponse = await ListCustomFieldsAsyncWithHttpInfo(accountId, envelopeId); return localVarResponse.Data; } /// /// Gets the custom field information for the specified envelope. Retrieves the custom field information for the specified envelope. You can use these fields in the envelopes for your account to record information about the envelope, help search for envelopes, and track information. The envelope custom fields are shown in the Envelope Settings section when a user is creating an envelope in the DocuSign member console. The envelope custom fields are not seen by the envelope recipients. There are two types of envelope custom fields, text, and list. A text custom field lets the sender enter the value for the field. With a list custom field, the sender selects the value of the field from a pre-made list. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse (CustomFieldsEnvelope) public async System.Threading.Tasks.Task> ListCustomFieldsAsyncWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListCustomFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ListCustomFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListCustomFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (CustomFieldsEnvelope)this.ApiClient.Deserialize(localVarResponse, typeof(CustomFieldsEnvelope))); } /// /// Gets the custom document fields from an existing envelope document. Retrieves the custom document field information from an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// DocumentFieldsInformation public DocumentFieldsInformation ListDocumentFields(string accountId, string envelopeId, string documentId) { ApiResponse localVarResponse = ListDocumentFieldsWithHttpInfo(accountId, envelopeId, documentId); return localVarResponse.Data; } /// /// Gets the custom document fields from an existing envelope document. Retrieves the custom document field information from an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// ApiResponse of DocumentFieldsInformation public ApiResponse ListDocumentFieldsWithHttpInfo(string accountId, string envelopeId, string documentId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListDocumentFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ListDocumentFields"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->ListDocumentFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListDocumentFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentFieldsInformation)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentFieldsInformation))); } /// /// Gets the custom document fields from an existing envelope document. Retrieves the custom document field information from an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Task of DocumentFieldsInformation public async System.Threading.Tasks.Task ListDocumentFieldsAsync(string accountId, string envelopeId, string documentId) { ApiResponse localVarResponse = await ListDocumentFieldsAsyncWithHttpInfo(accountId, envelopeId, documentId); return localVarResponse.Data; } /// /// Gets the custom document fields from an existing envelope document. Retrieves the custom document field information from an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Task of ApiResponse (DocumentFieldsInformation) public async System.Threading.Tasks.Task> ListDocumentFieldsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListDocumentFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ListDocumentFields"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->ListDocumentFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListDocumentFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentFieldsInformation)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentFieldsInformation))); } /// /// Gets a list of envelope documents. Retrieves a list of documents associated with the specified envelope. /// public class ListDocumentsOptions { /// public string documentsByUserid {get; set;} /// public string includeAgreementType {get; set;} /// public string includeDocgenFormfields {get; set;} /// public string includeDocumentSize {get; set;} /// public string includeMetadata {get; set;} /// public string includeTabs {get; set;} /// public string recipientId {get; set;} /// public string sharedUserId {get; set;} } /// /// Gets a list of envelope documents. Retrieves a list of documents associated with the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// EnvelopeDocumentsResult public EnvelopeDocumentsResult ListDocuments(string accountId, string envelopeId, EnvelopesApi.ListDocumentsOptions options = null) { ApiResponse localVarResponse = ListDocumentsWithHttpInfo(accountId, envelopeId, options); return localVarResponse.Data; } /// /// Gets a list of envelope documents. Retrieves a list of documents associated with the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of EnvelopeDocumentsResult public ApiResponse ListDocumentsWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.ListDocumentsOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListDocuments"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ListDocuments"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.documentsByUserid != null) localVarQueryParams.Add("documents_by_userid", this.ApiClient.ParameterToString(options.documentsByUserid)); // query parameter if (options.includeAgreementType != null) localVarQueryParams.Add("include_agreement_type", this.ApiClient.ParameterToString(options.includeAgreementType)); // query parameter if (options.includeDocgenFormfields != null) localVarQueryParams.Add("include_docgen_formfields", this.ApiClient.ParameterToString(options.includeDocgenFormfields)); // query parameter if (options.includeDocumentSize != null) localVarQueryParams.Add("include_document_size", this.ApiClient.ParameterToString(options.includeDocumentSize)); // query parameter if (options.includeMetadata != null) localVarQueryParams.Add("include_metadata", this.ApiClient.ParameterToString(options.includeMetadata)); // query parameter if (options.includeTabs != null) localVarQueryParams.Add("include_tabs", this.ApiClient.ParameterToString(options.includeTabs)); // query parameter if (options.recipientId != null) localVarQueryParams.Add("recipient_id", this.ApiClient.ParameterToString(options.recipientId)); // query parameter if (options.sharedUserId != null) localVarQueryParams.Add("shared_user_id", this.ApiClient.ParameterToString(options.sharedUserId)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListDocuments", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeDocumentsResult)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeDocumentsResult))); } /// /// Gets a list of envelope documents. Retrieves a list of documents associated with the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of EnvelopeDocumentsResult public async System.Threading.Tasks.Task ListDocumentsAsync(string accountId, string envelopeId, EnvelopesApi.ListDocumentsOptions options = null) { ApiResponse localVarResponse = await ListDocumentsAsyncWithHttpInfo(accountId, envelopeId, options); return localVarResponse.Data; } /// /// Gets a list of envelope documents. Retrieves a list of documents associated with the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (EnvelopeDocumentsResult) public async System.Threading.Tasks.Task> ListDocumentsAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.ListDocumentsOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListDocuments"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ListDocuments"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.documentsByUserid != null) localVarQueryParams.Add("documents_by_userid", this.ApiClient.ParameterToString(options.documentsByUserid)); // query parameter if (options.includeAgreementType != null) localVarQueryParams.Add("include_agreement_type", this.ApiClient.ParameterToString(options.includeAgreementType)); // query parameter if (options.includeDocgenFormfields != null) localVarQueryParams.Add("include_docgen_formfields", this.ApiClient.ParameterToString(options.includeDocgenFormfields)); // query parameter if (options.includeDocumentSize != null) localVarQueryParams.Add("include_document_size", this.ApiClient.ParameterToString(options.includeDocumentSize)); // query parameter if (options.includeMetadata != null) localVarQueryParams.Add("include_metadata", this.ApiClient.ParameterToString(options.includeMetadata)); // query parameter if (options.includeTabs != null) localVarQueryParams.Add("include_tabs", this.ApiClient.ParameterToString(options.includeTabs)); // query parameter if (options.recipientId != null) localVarQueryParams.Add("recipient_id", this.ApiClient.ParameterToString(options.recipientId)); // query parameter if (options.sharedUserId != null) localVarQueryParams.Add("shared_user_id", this.ApiClient.ParameterToString(options.sharedUserId)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListDocuments", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeDocumentsResult)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeDocumentsResult))); } /// /// Gets the status of recipients for an envelope. Retrieves the status of all recipients in a single envelope and identifies the current recipient in the routing list. The `currentRoutingOrder` property of the response contains the `routingOrder` value of the current recipient indicating that the envelope has been sent to the recipient, but the recipient has not completed their actions. /// public class ListRecipientsOptions { /// When set to **true** and `include_tabs` is set to **true**, all tabs with anchor tab properties are included in the response. public string includeAnchorTabLocations {get; set;} /// When set to **true**, the extended properties are included in the response. public string includeExtended {get; set;} /// public string includeMetadata {get; set;} /// When set to **true**, the tab information associated with the recipient is included in the response. public string includeTabs {get; set;} } /// /// Gets the status of recipients for an envelope. Retrieves the status of all recipients in a single envelope and identifies the current recipient in the routing list. The `currentRoutingOrder` property of the response contains the `routingOrder` value of the current recipient indicating that the envelope has been sent to the recipient, but the recipient has not completed their actions. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Recipients public Recipients ListRecipients(string accountId, string envelopeId, EnvelopesApi.ListRecipientsOptions options = null) { ApiResponse localVarResponse = ListRecipientsWithHttpInfo(accountId, envelopeId, options); return localVarResponse.Data; } /// /// Gets the status of recipients for an envelope. Retrieves the status of all recipients in a single envelope and identifies the current recipient in the routing list. The `currentRoutingOrder` property of the response contains the `routingOrder` value of the current recipient indicating that the envelope has been sent to the recipient, but the recipient has not completed their actions. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of Recipients public ApiResponse ListRecipientsWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.ListRecipientsOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListRecipients"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ListRecipients"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.includeAnchorTabLocations != null) localVarQueryParams.Add("include_anchor_tab_locations", this.ApiClient.ParameterToString(options.includeAnchorTabLocations)); // query parameter if (options.includeExtended != null) localVarQueryParams.Add("include_extended", this.ApiClient.ParameterToString(options.includeExtended)); // query parameter if (options.includeMetadata != null) localVarQueryParams.Add("include_metadata", this.ApiClient.ParameterToString(options.includeMetadata)); // query parameter if (options.includeTabs != null) localVarQueryParams.Add("include_tabs", this.ApiClient.ParameterToString(options.includeTabs)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListRecipients", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Recipients)this.ApiClient.Deserialize(localVarResponse, typeof(Recipients))); } /// /// Gets the status of recipients for an envelope. Retrieves the status of all recipients in a single envelope and identifies the current recipient in the routing list. The `currentRoutingOrder` property of the response contains the `routingOrder` value of the current recipient indicating that the envelope has been sent to the recipient, but the recipient has not completed their actions. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of Recipients public async System.Threading.Tasks.Task ListRecipientsAsync(string accountId, string envelopeId, EnvelopesApi.ListRecipientsOptions options = null) { ApiResponse localVarResponse = await ListRecipientsAsyncWithHttpInfo(accountId, envelopeId, options); return localVarResponse.Data; } /// /// Gets the status of recipients for an envelope. Retrieves the status of all recipients in a single envelope and identifies the current recipient in the routing list. The `currentRoutingOrder` property of the response contains the `routingOrder` value of the current recipient indicating that the envelope has been sent to the recipient, but the recipient has not completed their actions. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (Recipients) public async System.Threading.Tasks.Task> ListRecipientsAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.ListRecipientsOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListRecipients"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ListRecipients"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.includeAnchorTabLocations != null) localVarQueryParams.Add("include_anchor_tab_locations", this.ApiClient.ParameterToString(options.includeAnchorTabLocations)); // query parameter if (options.includeExtended != null) localVarQueryParams.Add("include_extended", this.ApiClient.ParameterToString(options.includeExtended)); // query parameter if (options.includeMetadata != null) localVarQueryParams.Add("include_metadata", this.ApiClient.ParameterToString(options.includeMetadata)); // query parameter if (options.includeTabs != null) localVarQueryParams.Add("include_tabs", this.ApiClient.ParameterToString(options.includeTabs)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListRecipients", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Recipients)this.ApiClient.Deserialize(localVarResponse, typeof(Recipients))); } /// /// Gets the envelope status for the specified envelopes. Retrieves the envelope status for the specified envelopes. /// public class ListStatusOptions { /// public string acStatus {get; set;} /// public string block {get; set;} /// public string count {get; set;} /// public string email {get; set;} /// public string envelopeIds {get; set;} /// public string fromDate {get; set;} /// public string fromToStatus {get; set;} /// public string startPosition {get; set;} /// public string status {get; set;} /// public string toDate {get; set;} /// public string transactionIds {get; set;} /// public string userName {get; set;} } /// /// Gets the envelope status for the specified envelopes. Retrieves the envelope status for the specified envelopes. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Options for modifying the behavior of the function. /// EnvelopesInformation public EnvelopesInformation ListStatus(string accountId, EnvelopeIdsRequest envelopeIdsRequest = null, EnvelopesApi.ListStatusOptions options = null) { ApiResponse localVarResponse = ListStatusWithHttpInfo(accountId, envelopeIdsRequest, options); return localVarResponse.Data; } /// /// Gets the envelope status for the specified envelopes. Retrieves the envelope status for the specified envelopes. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Options for modifying the behavior of the function. /// ApiResponse of EnvelopesInformation public ApiResponse ListStatusWithHttpInfo(string accountId, EnvelopeIdsRequest envelopeIdsRequest = null, EnvelopesApi.ListStatusOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListStatus"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/status"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (options != null) { if (options.acStatus != null) localVarQueryParams.Add("ac_status", this.ApiClient.ParameterToString(options.acStatus)); // query parameter if (options.block != null) localVarQueryParams.Add("block", this.ApiClient.ParameterToString(options.block)); // query parameter if (options.count != null) localVarQueryParams.Add("count", this.ApiClient.ParameterToString(options.count)); // query parameter if (options.email != null) localVarQueryParams.Add("email", this.ApiClient.ParameterToString(options.email)); // query parameter if (options.envelopeIds != null) localVarQueryParams.Add("envelope_ids", this.ApiClient.ParameterToString(options.envelopeIds)); // query parameter if (options.fromDate != null) localVarQueryParams.Add("from_date", this.ApiClient.ParameterToString(options.fromDate)); // query parameter if (options.fromToStatus != null) localVarQueryParams.Add("from_to_status", this.ApiClient.ParameterToString(options.fromToStatus)); // query parameter if (options.startPosition != null) localVarQueryParams.Add("start_position", this.ApiClient.ParameterToString(options.startPosition)); // query parameter if (options.status != null) localVarQueryParams.Add("status", this.ApiClient.ParameterToString(options.status)); // query parameter if (options.toDate != null) localVarQueryParams.Add("to_date", this.ApiClient.ParameterToString(options.toDate)); // query parameter if (options.transactionIds != null) localVarQueryParams.Add("transaction_ids", this.ApiClient.ParameterToString(options.transactionIds)); // query parameter if (options.userName != null) localVarQueryParams.Add("user_name", this.ApiClient.ParameterToString(options.userName)); // query parameter } if (envelopeIdsRequest != null && envelopeIdsRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeIdsRequest); // http body (model) parameter } else { localVarPostBody = envelopeIdsRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListStatus", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopesInformation)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopesInformation))); } /// /// Gets the envelope status for the specified envelopes. Retrieves the envelope status for the specified envelopes. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Options for modifying the behavior of the function. /// Task of EnvelopesInformation public async System.Threading.Tasks.Task ListStatusAsync(string accountId, EnvelopeIdsRequest envelopeIdsRequest = null, EnvelopesApi.ListStatusOptions options = null) { ApiResponse localVarResponse = await ListStatusAsyncWithHttpInfo(accountId, envelopeIdsRequest, options); return localVarResponse.Data; } /// /// Gets the envelope status for the specified envelopes. Retrieves the envelope status for the specified envelopes. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Options for modifying the behavior of the function. /// Task of ApiResponse (EnvelopesInformation) public async System.Threading.Tasks.Task> ListStatusAsyncWithHttpInfo(string accountId, EnvelopeIdsRequest envelopeIdsRequest = null, EnvelopesApi.ListStatusOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListStatus"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/status"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (options != null) { if (options.acStatus != null) localVarQueryParams.Add("ac_status", this.ApiClient.ParameterToString(options.acStatus)); // query parameter if (options.block != null) localVarQueryParams.Add("block", this.ApiClient.ParameterToString(options.block)); // query parameter if (options.count != null) localVarQueryParams.Add("count", this.ApiClient.ParameterToString(options.count)); // query parameter if (options.email != null) localVarQueryParams.Add("email", this.ApiClient.ParameterToString(options.email)); // query parameter if (options.envelopeIds != null) localVarQueryParams.Add("envelope_ids", this.ApiClient.ParameterToString(options.envelopeIds)); // query parameter if (options.fromDate != null) localVarQueryParams.Add("from_date", this.ApiClient.ParameterToString(options.fromDate)); // query parameter if (options.fromToStatus != null) localVarQueryParams.Add("from_to_status", this.ApiClient.ParameterToString(options.fromToStatus)); // query parameter if (options.startPosition != null) localVarQueryParams.Add("start_position", this.ApiClient.ParameterToString(options.startPosition)); // query parameter if (options.status != null) localVarQueryParams.Add("status", this.ApiClient.ParameterToString(options.status)); // query parameter if (options.toDate != null) localVarQueryParams.Add("to_date", this.ApiClient.ParameterToString(options.toDate)); // query parameter if (options.transactionIds != null) localVarQueryParams.Add("transaction_ids", this.ApiClient.ParameterToString(options.transactionIds)); // query parameter if (options.userName != null) localVarQueryParams.Add("user_name", this.ApiClient.ParameterToString(options.userName)); // query parameter } if (envelopeIdsRequest != null && envelopeIdsRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeIdsRequest); // http body (model) parameter } else { localVarPostBody = envelopeIdsRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListStatus", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopesInformation)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopesInformation))); } /// /// Gets status changes for one or more envelopes. Retrieves envelope status changes for all envelopes. You can modify the information returned by adding query strings to limit the request to check between certain dates and times, or for certain envelopes, or for certain status codes. It is recommended that you use one or more of the query strings in order to limit the size of the response. ### Important: Unless you are requesting the status for specific envelopes (using the `envelopeIds` or `transactionIds` properties), you must add a set the `from_date` property in the request. Getting envelope status using `transactionIds` is useful for offline signing situations where it can be used determine if an envelope was created or not, for the cases where a network connection was lost, before the envelope status could be returned. ### Request Envelope Status Notes ### The REST API GET /envelopes call uses certain filters to find results. In some cases requests are check for \"any status change\" instead of the just the single status requested. In these cases, more envelopes might be returned by the request than otherwise would be. For example, for a request with the begin date is set to Jan 1st, an end date set to Jan 7th and the status qualifier (`from_to_status`) set to `Delivered` &mdash; the response set might contain envelopes that were created during that time period, but not delivered during the time period. To avoid unnecessary database queries, the DocuSign system checks requests to ensure that the added filters will not result in a zero-size response before acting on the request. The following table shows the valid envelope statuses (in the Valid Current Statuses column) for the status qualifiers 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. For example, a request with a status qualifier (from_to_status) of `Delivered` and a status of \"`Created`,`Sent`\", DocuSign will always return an empty list. This is because the request essentially translates to: find the envelopes that were delivered between the begin and end dates that have a current status of `Created` or `Sent`, and 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 run the request, but just returns the empty list. Client applications should check that the statuses they are requesting make sense for a given status qualifier. /// public class ListStatusChangesOptions { /// Specifies the Authoritative Copy Status for the envelopes. The possible values are: Unknown, Original, Transferred, AuthoritativeCopy, AuthoritativeCopyExportPending, AuthoritativeCopyExported, DepositPending, Deposited, DepositedEO, or DepositFailed. public string acStatus {get; set;} /// public string block {get; set;} /// public string cdseMode {get; set;} /// public string continuationToken {get; set;} /// public string count {get; set;} /// This specifies the envelope custom field name and value searched for in the envelope information. 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 called \"Region\" and you want to search for all envelopes where the value is \"West\" you would use the query: `?custom_field=Region=West`. Example 2: To search for envelopes where the `ApplicationID` custom field has the value or partial value of \"DocuSign\" in field, the query would be: `?custom_field=ApplicationId=%DocuSign%` This would find envelopes where the custom field value is \"DocuSign for Salesforce\" or \"DocuSign envelope.\" public string customField {get; set;} /// public string email {get; set;} /// public string envelopeIds {get; set;} /// public string exclude {get; set;} /// public string folderIds {get; set;} /// public string folderTypes {get; set;} /// The date/time setting that specifies the date/time when the request begins checking for status changes for envelopes in the account. This is required unless 'envelopeId's are used. public string fromDate {get; set;} /// This is the status type checked for in the `from_date`/`to_date` period. If `changed` is specified, then envelopes that changed status during the period are found. If for example, `created` is specified, then envelopes created during the period are found. Default is `changed`. Possible values are: Voided, Changed, Created, Deleted, Sent, Delivered, Signed, Completed, Declined, TimedOut and Processing. public string fromToStatus {get; set;} /// public string include {get; set;} /// public string includePurgeInformation {get; set;} /// public string intersectingFolderIds {get; set;} /// public string lastQueriedDate {get; set;} /// public string order {get; set;} /// public string orderBy {get; set;} /// public string powerformids {get; set;} /// public string queryBudget {get; set;} /// public string requesterDateFormat {get; set;} /// public string searchMode {get; set;} /// public string searchText {get; set;} /// public string startPosition {get; set;} /// The list of current statuses to include in the response. By default, all envelopes found are returned. If values are specified, then of the envelopes found, only those with the current status specified are returned in the results. Possible values are: Voided, Created, Deleted, Sent, Delivered, Signed, Completed, Declined, TimedOut and Processing. public string status {get; set;} /// Optional date/time setting that specifies the date/time when the request stops for status changes for envelopes in the account. If no entry, the system uses the time of the call as the `to_date`. public string toDate {get; set;} /// If included in the query string, this is a comma separated list of envelope `transactionId`s. If included in the `request_body`, this is a list of envelope `transactionId`s. ###### Note: `transactionId`s are only valid in the DocuSign system for seven days. public string transactionIds {get; set;} /// public string userFilter {get; set;} /// public string userId {get; set;} /// public string userName {get; set;} } /// /// Gets status changes for one or more envelopes. Retrieves envelope status changes for all envelopes. You can modify the information returned by adding query strings to limit the request to check between certain dates and times, or for certain envelopes, or for certain status codes. It is recommended that you use one or more of the query strings in order to limit the size of the response. ### Important: Unless you are requesting the status for specific envelopes (using the `envelopeIds` or `transactionIds` properties), you must add a set the `from_date` property in the request. Getting envelope status using `transactionIds` is useful for offline signing situations where it can be used determine if an envelope was created or not, for the cases where a network connection was lost, before the envelope status could be returned. ### Request Envelope Status Notes ### The REST API GET /envelopes call uses certain filters to find results. In some cases requests are check for \"any status change\" instead of the just the single status requested. In these cases, more envelopes might be returned by the request than otherwise would be. For example, for a request with the begin date is set to Jan 1st, an end date set to Jan 7th and the status qualifier (`from_to_status`) set to `Delivered` &mdash; the response set might contain envelopes that were created during that time period, but not delivered during the time period. To avoid unnecessary database queries, the DocuSign system checks requests to ensure that the added filters will not result in a zero-size response before acting on the request. The following table shows the valid envelope statuses (in the Valid Current Statuses column) for the status qualifiers 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. For example, a request with a status qualifier (from_to_status) of `Delivered` and a status of \"`Created`,`Sent`\", DocuSign will always return an empty list. This is because the request essentially translates to: find the envelopes that were delivered between the begin and end dates that have a current status of `Created` or `Sent`, and 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 run the request, but just returns the empty list. Client applications should check that the statuses they are requesting make sense for a given status qualifier. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// Options for modifying the behavior of the function. /// EnvelopesInformation public EnvelopesInformation ListStatusChanges(string accountId, EnvelopesApi.ListStatusChangesOptions options = null) { ApiResponse localVarResponse = ListStatusChangesWithHttpInfo(accountId, options); return localVarResponse.Data; } /// /// Gets status changes for one or more envelopes. Retrieves envelope status changes for all envelopes. You can modify the information returned by adding query strings to limit the request to check between certain dates and times, or for certain envelopes, or for certain status codes. It is recommended that you use one or more of the query strings in order to limit the size of the response. ### Important: Unless you are requesting the status for specific envelopes (using the `envelopeIds` or `transactionIds` properties), you must add a set the `from_date` property in the request. Getting envelope status using `transactionIds` is useful for offline signing situations where it can be used determine if an envelope was created or not, for the cases where a network connection was lost, before the envelope status could be returned. ### Request Envelope Status Notes ### The REST API GET /envelopes call uses certain filters to find results. In some cases requests are check for \"any status change\" instead of the just the single status requested. In these cases, more envelopes might be returned by the request than otherwise would be. For example, for a request with the begin date is set to Jan 1st, an end date set to Jan 7th and the status qualifier (`from_to_status`) set to `Delivered` &mdash; the response set might contain envelopes that were created during that time period, but not delivered during the time period. To avoid unnecessary database queries, the DocuSign system checks requests to ensure that the added filters will not result in a zero-size response before acting on the request. The following table shows the valid envelope statuses (in the Valid Current Statuses column) for the status qualifiers 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. For example, a request with a status qualifier (from_to_status) of `Delivered` and a status of \"`Created`,`Sent`\", DocuSign will always return an empty list. This is because the request essentially translates to: find the envelopes that were delivered between the begin and end dates that have a current status of `Created` or `Sent`, and 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 run the request, but just returns the empty list. Client applications should check that the statuses they are requesting make sense for a given status qualifier. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// Options for modifying the behavior of the function. /// ApiResponse of EnvelopesInformation public ApiResponse ListStatusChangesWithHttpInfo(string accountId, EnvelopesApi.ListStatusChangesOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListStatusChanges"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (options != null) { if (options.acStatus != null) localVarQueryParams.Add("ac_status", this.ApiClient.ParameterToString(options.acStatus)); // query parameter if (options.block != null) localVarQueryParams.Add("block", this.ApiClient.ParameterToString(options.block)); // query parameter if (options.cdseMode != null) localVarQueryParams.Add("cdse_mode", this.ApiClient.ParameterToString(options.cdseMode)); // query parameter if (options.continuationToken != null) localVarQueryParams.Add("continuation_token", this.ApiClient.ParameterToString(options.continuationToken)); // query parameter if (options.count != null) localVarQueryParams.Add("count", this.ApiClient.ParameterToString(options.count)); // query parameter if (options.customField != null) localVarQueryParams.Add("custom_field", this.ApiClient.ParameterToString(options.customField)); // query parameter if (options.email != null) localVarQueryParams.Add("email", this.ApiClient.ParameterToString(options.email)); // query parameter if (options.envelopeIds != null) localVarQueryParams.Add("envelope_ids", this.ApiClient.ParameterToString(options.envelopeIds)); // query parameter if (options.exclude != null) localVarQueryParams.Add("exclude", this.ApiClient.ParameterToString(options.exclude)); // query parameter if (options.folderIds != null) localVarQueryParams.Add("folder_ids", this.ApiClient.ParameterToString(options.folderIds)); // query parameter if (options.folderTypes != null) localVarQueryParams.Add("folder_types", this.ApiClient.ParameterToString(options.folderTypes)); // query parameter if (options.fromDate != null) localVarQueryParams.Add("from_date", this.ApiClient.ParameterToString(options.fromDate)); // query parameter if (options.fromToStatus != null) localVarQueryParams.Add("from_to_status", this.ApiClient.ParameterToString(options.fromToStatus)); // query parameter if (options.include != null) localVarQueryParams.Add("include", this.ApiClient.ParameterToString(options.include)); // query parameter if (options.includePurgeInformation != null) localVarQueryParams.Add("include_purge_information", this.ApiClient.ParameterToString(options.includePurgeInformation)); // query parameter if (options.intersectingFolderIds != null) localVarQueryParams.Add("intersecting_folder_ids", this.ApiClient.ParameterToString(options.intersectingFolderIds)); // query parameter if (options.lastQueriedDate != null) localVarQueryParams.Add("last_queried_date", this.ApiClient.ParameterToString(options.lastQueriedDate)); // query parameter if (options.order != null) localVarQueryParams.Add("order", this.ApiClient.ParameterToString(options.order)); // query parameter if (options.orderBy != null) localVarQueryParams.Add("order_by", this.ApiClient.ParameterToString(options.orderBy)); // query parameter if (options.powerformids != null) localVarQueryParams.Add("powerformids", this.ApiClient.ParameterToString(options.powerformids)); // query parameter if (options.queryBudget != null) localVarQueryParams.Add("query_budget", this.ApiClient.ParameterToString(options.queryBudget)); // query parameter if (options.requesterDateFormat != null) localVarQueryParams.Add("requester_date_format", this.ApiClient.ParameterToString(options.requesterDateFormat)); // query parameter if (options.searchMode != null) localVarQueryParams.Add("search_mode", this.ApiClient.ParameterToString(options.searchMode)); // query parameter if (options.searchText != null) localVarQueryParams.Add("search_text", this.ApiClient.ParameterToString(options.searchText)); // query parameter if (options.startPosition != null) localVarQueryParams.Add("start_position", this.ApiClient.ParameterToString(options.startPosition)); // query parameter if (options.status != null) localVarQueryParams.Add("status", this.ApiClient.ParameterToString(options.status)); // query parameter if (options.toDate != null) localVarQueryParams.Add("to_date", this.ApiClient.ParameterToString(options.toDate)); // query parameter if (options.transactionIds != null) localVarQueryParams.Add("transaction_ids", this.ApiClient.ParameterToString(options.transactionIds)); // query parameter if (options.userFilter != null) localVarQueryParams.Add("user_filter", this.ApiClient.ParameterToString(options.userFilter)); // query parameter if (options.userId != null) localVarQueryParams.Add("user_id", this.ApiClient.ParameterToString(options.userId)); // query parameter if (options.userName != null) localVarQueryParams.Add("user_name", this.ApiClient.ParameterToString(options.userName)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListStatusChanges", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopesInformation)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopesInformation))); } /// /// Gets status changes for one or more envelopes. Retrieves envelope status changes for all envelopes. You can modify the information returned by adding query strings to limit the request to check between certain dates and times, or for certain envelopes, or for certain status codes. It is recommended that you use one or more of the query strings in order to limit the size of the response. ### Important: Unless you are requesting the status for specific envelopes (using the `envelopeIds` or `transactionIds` properties), you must add a set the `from_date` property in the request. Getting envelope status using `transactionIds` is useful for offline signing situations where it can be used determine if an envelope was created or not, for the cases where a network connection was lost, before the envelope status could be returned. ### Request Envelope Status Notes ### The REST API GET /envelopes call uses certain filters to find results. In some cases requests are check for \"any status change\" instead of the just the single status requested. In these cases, more envelopes might be returned by the request than otherwise would be. For example, for a request with the begin date is set to Jan 1st, an end date set to Jan 7th and the status qualifier (`from_to_status`) set to `Delivered` &mdash; the response set might contain envelopes that were created during that time period, but not delivered during the time period. To avoid unnecessary database queries, the DocuSign system checks requests to ensure that the added filters will not result in a zero-size response before acting on the request. The following table shows the valid envelope statuses (in the Valid Current Statuses column) for the status qualifiers 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. For example, a request with a status qualifier (from_to_status) of `Delivered` and a status of \"`Created`,`Sent`\", DocuSign will always return an empty list. This is because the request essentially translates to: find the envelopes that were delivered between the begin and end dates that have a current status of `Created` or `Sent`, and 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 run the request, but just returns the empty list. Client applications should check that the statuses they are requesting make sense for a given status qualifier. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// Options for modifying the behavior of the function. /// Task of EnvelopesInformation public async System.Threading.Tasks.Task ListStatusChangesAsync(string accountId, EnvelopesApi.ListStatusChangesOptions options = null) { ApiResponse localVarResponse = await ListStatusChangesAsyncWithHttpInfo(accountId, options); return localVarResponse.Data; } /// /// Gets status changes for one or more envelopes. Retrieves envelope status changes for all envelopes. You can modify the information returned by adding query strings to limit the request to check between certain dates and times, or for certain envelopes, or for certain status codes. It is recommended that you use one or more of the query strings in order to limit the size of the response. ### Important: Unless you are requesting the status for specific envelopes (using the `envelopeIds` or `transactionIds` properties), you must add a set the `from_date` property in the request. Getting envelope status using `transactionIds` is useful for offline signing situations where it can be used determine if an envelope was created or not, for the cases where a network connection was lost, before the envelope status could be returned. ### Request Envelope Status Notes ### The REST API GET /envelopes call uses certain filters to find results. In some cases requests are check for \"any status change\" instead of the just the single status requested. In these cases, more envelopes might be returned by the request than otherwise would be. For example, for a request with the begin date is set to Jan 1st, an end date set to Jan 7th and the status qualifier (`from_to_status`) set to `Delivered` &mdash; the response set might contain envelopes that were created during that time period, but not delivered during the time period. To avoid unnecessary database queries, the DocuSign system checks requests to ensure that the added filters will not result in a zero-size response before acting on the request. The following table shows the valid envelope statuses (in the Valid Current Statuses column) for the status qualifiers 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. For example, a request with a status qualifier (from_to_status) of `Delivered` and a status of \"`Created`,`Sent`\", DocuSign will always return an empty list. This is because the request essentially translates to: find the envelopes that were delivered between the begin and end dates that have a current status of `Created` or `Sent`, and 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 run the request, but just returns the empty list. Client applications should check that the statuses they are requesting make sense for a given status qualifier. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// Options for modifying the behavior of the function. /// Task of ApiResponse (EnvelopesInformation) public async System.Threading.Tasks.Task> ListStatusChangesAsyncWithHttpInfo(string accountId, EnvelopesApi.ListStatusChangesOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListStatusChanges"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (options != null) { if (options.acStatus != null) localVarQueryParams.Add("ac_status", this.ApiClient.ParameterToString(options.acStatus)); // query parameter if (options.block != null) localVarQueryParams.Add("block", this.ApiClient.ParameterToString(options.block)); // query parameter if (options.cdseMode != null) localVarQueryParams.Add("cdse_mode", this.ApiClient.ParameterToString(options.cdseMode)); // query parameter if (options.continuationToken != null) localVarQueryParams.Add("continuation_token", this.ApiClient.ParameterToString(options.continuationToken)); // query parameter if (options.count != null) localVarQueryParams.Add("count", this.ApiClient.ParameterToString(options.count)); // query parameter if (options.customField != null) localVarQueryParams.Add("custom_field", this.ApiClient.ParameterToString(options.customField)); // query parameter if (options.email != null) localVarQueryParams.Add("email", this.ApiClient.ParameterToString(options.email)); // query parameter if (options.envelopeIds != null) localVarQueryParams.Add("envelope_ids", this.ApiClient.ParameterToString(options.envelopeIds)); // query parameter if (options.exclude != null) localVarQueryParams.Add("exclude", this.ApiClient.ParameterToString(options.exclude)); // query parameter if (options.folderIds != null) localVarQueryParams.Add("folder_ids", this.ApiClient.ParameterToString(options.folderIds)); // query parameter if (options.folderTypes != null) localVarQueryParams.Add("folder_types", this.ApiClient.ParameterToString(options.folderTypes)); // query parameter if (options.fromDate != null) localVarQueryParams.Add("from_date", this.ApiClient.ParameterToString(options.fromDate)); // query parameter if (options.fromToStatus != null) localVarQueryParams.Add("from_to_status", this.ApiClient.ParameterToString(options.fromToStatus)); // query parameter if (options.include != null) localVarQueryParams.Add("include", this.ApiClient.ParameterToString(options.include)); // query parameter if (options.includePurgeInformation != null) localVarQueryParams.Add("include_purge_information", this.ApiClient.ParameterToString(options.includePurgeInformation)); // query parameter if (options.intersectingFolderIds != null) localVarQueryParams.Add("intersecting_folder_ids", this.ApiClient.ParameterToString(options.intersectingFolderIds)); // query parameter if (options.lastQueriedDate != null) localVarQueryParams.Add("last_queried_date", this.ApiClient.ParameterToString(options.lastQueriedDate)); // query parameter if (options.order != null) localVarQueryParams.Add("order", this.ApiClient.ParameterToString(options.order)); // query parameter if (options.orderBy != null) localVarQueryParams.Add("order_by", this.ApiClient.ParameterToString(options.orderBy)); // query parameter if (options.powerformids != null) localVarQueryParams.Add("powerformids", this.ApiClient.ParameterToString(options.powerformids)); // query parameter if (options.queryBudget != null) localVarQueryParams.Add("query_budget", this.ApiClient.ParameterToString(options.queryBudget)); // query parameter if (options.requesterDateFormat != null) localVarQueryParams.Add("requester_date_format", this.ApiClient.ParameterToString(options.requesterDateFormat)); // query parameter if (options.searchMode != null) localVarQueryParams.Add("search_mode", this.ApiClient.ParameterToString(options.searchMode)); // query parameter if (options.searchText != null) localVarQueryParams.Add("search_text", this.ApiClient.ParameterToString(options.searchText)); // query parameter if (options.startPosition != null) localVarQueryParams.Add("start_position", this.ApiClient.ParameterToString(options.startPosition)); // query parameter if (options.status != null) localVarQueryParams.Add("status", this.ApiClient.ParameterToString(options.status)); // query parameter if (options.toDate != null) localVarQueryParams.Add("to_date", this.ApiClient.ParameterToString(options.toDate)); // query parameter if (options.transactionIds != null) localVarQueryParams.Add("transaction_ids", this.ApiClient.ParameterToString(options.transactionIds)); // query parameter if (options.userFilter != null) localVarQueryParams.Add("user_filter", this.ApiClient.ParameterToString(options.userFilter)); // query parameter if (options.userId != null) localVarQueryParams.Add("user_id", this.ApiClient.ParameterToString(options.userId)); // query parameter if (options.userName != null) localVarQueryParams.Add("user_name", this.ApiClient.ParameterToString(options.userName)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListStatusChanges", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopesInformation)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopesInformation))); } /// /// Gets the tabs information for a signer or sign-in-person recipient in an envelope. Retrieves information about the tabs associated with a recipient in a draft envelope. /// public class ListTabsOptions { /// When set to **true**, all tabs with anchor tab properties are included in the response. public string includeAnchorTabLocations {get; set;} /// public string includeMetadata {get; set;} } /// /// Gets the tabs information for a signer or sign-in-person recipient in an envelope. Retrieves information about the tabs associated with a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Tabs public Tabs ListTabs(string accountId, string envelopeId, string recipientId, EnvelopesApi.ListTabsOptions options = null) { ApiResponse localVarResponse = ListTabsWithHttpInfo(accountId, envelopeId, recipientId, options); return localVarResponse.Data; } /// /// Gets the tabs information for a signer or sign-in-person recipient in an envelope. Retrieves information about the tabs associated with a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of Tabs public ApiResponse ListTabsWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.ListTabsOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ListTabs"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->ListTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (options != null) { if (options.includeAnchorTabLocations != null) localVarQueryParams.Add("include_anchor_tab_locations", this.ApiClient.ParameterToString(options.includeAnchorTabLocations)); // query parameter if (options.includeMetadata != null) localVarQueryParams.Add("include_metadata", this.ApiClient.ParameterToString(options.includeMetadata)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Gets the tabs information for a signer or sign-in-person recipient in an envelope. Retrieves information about the tabs associated with a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of Tabs public async System.Threading.Tasks.Task ListTabsAsync(string accountId, string envelopeId, string recipientId, EnvelopesApi.ListTabsOptions options = null) { ApiResponse localVarResponse = await ListTabsAsyncWithHttpInfo(accountId, envelopeId, recipientId, options); return localVarResponse.Data; } /// /// Gets the tabs information for a signer or sign-in-person recipient in an envelope. Retrieves information about the tabs associated with a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (Tabs) public async System.Threading.Tasks.Task> ListTabsAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, EnvelopesApi.ListTabsOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ListTabs"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->ListTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (options != null) { if (options.includeAnchorTabLocations != null) localVarQueryParams.Add("include_anchor_tab_locations", this.ApiClient.ParameterToString(options.includeAnchorTabLocations)); // query parameter if (options.includeMetadata != null) localVarQueryParams.Add("include_metadata", this.ApiClient.ParameterToString(options.includeMetadata)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Get List of Templates used in an Envelope This returns a list of the server-side templates, their name and ID, used in an envelope. /// public class ListTemplatesOptions { /// The possible values are: matching_applied - This returns template matching information for the template. public string include {get; set;} } /// /// Get List of Templates used in an Envelope This returns a list of the server-side templates, their name and ID, used in an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// TemplateInformation public TemplateInformation ListTemplates(string accountId, string envelopeId, EnvelopesApi.ListTemplatesOptions options = null) { ApiResponse localVarResponse = ListTemplatesWithHttpInfo(accountId, envelopeId, options); return localVarResponse.Data; } /// /// Get List of Templates used in an Envelope This returns a list of the server-side templates, their name and ID, used in an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of TemplateInformation public ApiResponse ListTemplatesWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.ListTemplatesOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListTemplates"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ListTemplates"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/templates"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.include != null) localVarQueryParams.Add("include", this.ApiClient.ParameterToString(options.include)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListTemplates", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (TemplateInformation)this.ApiClient.Deserialize(localVarResponse, typeof(TemplateInformation))); } /// /// Get List of Templates used in an Envelope This returns a list of the server-side templates, their name and ID, used in an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of TemplateInformation public async System.Threading.Tasks.Task ListTemplatesAsync(string accountId, string envelopeId, EnvelopesApi.ListTemplatesOptions options = null) { ApiResponse localVarResponse = await ListTemplatesAsyncWithHttpInfo(accountId, envelopeId, options); return localVarResponse.Data; } /// /// Get List of Templates used in an Envelope This returns a list of the server-side templates, their name and ID, used in an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (TemplateInformation) public async System.Threading.Tasks.Task> ListTemplatesAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopesApi.ListTemplatesOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListTemplates"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ListTemplates"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/templates"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.include != null) localVarQueryParams.Add("include", this.ApiClient.ParameterToString(options.include)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListTemplates", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (TemplateInformation)this.ApiClient.Deserialize(localVarResponse, typeof(TemplateInformation))); } /// /// Gets the templates associated with a document in an existing envelope. Retrieves the templates associated with a document in the specified envelope. /// public class ListTemplatesForDocumentOptions { /// public string include {get; set;} } /// /// Gets the templates associated with a document in an existing envelope. Retrieves the templates associated with a document in the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// TemplateInformation public TemplateInformation ListTemplatesForDocument(string accountId, string envelopeId, string documentId, EnvelopesApi.ListTemplatesForDocumentOptions options = null) { ApiResponse localVarResponse = ListTemplatesForDocumentWithHttpInfo(accountId, envelopeId, documentId, options); return localVarResponse.Data; } /// /// Gets the templates associated with a document in an existing envelope. Retrieves the templates associated with a document in the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// ApiResponse of TemplateInformation public ApiResponse ListTemplatesForDocumentWithHttpInfo(string accountId, string envelopeId, string documentId, EnvelopesApi.ListTemplatesForDocumentOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListTemplatesForDocument"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ListTemplatesForDocument"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->ListTemplatesForDocument"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/templates"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (options != null) { if (options.include != null) localVarQueryParams.Add("include", this.ApiClient.ParameterToString(options.include)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListTemplatesForDocument", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (TemplateInformation)this.ApiClient.Deserialize(localVarResponse, typeof(TemplateInformation))); } /// /// Gets the templates associated with a document in an existing envelope. Retrieves the templates associated with a document in the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Task of TemplateInformation public async System.Threading.Tasks.Task ListTemplatesForDocumentAsync(string accountId, string envelopeId, string documentId, EnvelopesApi.ListTemplatesForDocumentOptions options = null) { ApiResponse localVarResponse = await ListTemplatesForDocumentAsyncWithHttpInfo(accountId, envelopeId, documentId, options); return localVarResponse.Data; } /// /// Gets the templates associated with a document in an existing envelope. Retrieves the templates associated with a document in the specified envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Options for modifying the behavior of the function. /// Task of ApiResponse (TemplateInformation) public async System.Threading.Tasks.Task> ListTemplatesForDocumentAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, EnvelopesApi.ListTemplatesForDocumentOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->ListTemplatesForDocument"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->ListTemplatesForDocument"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->ListTemplatesForDocument"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/templates"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (options != null) { if (options.include != null) localVarQueryParams.Add("include", this.ApiClient.ParameterToString(options.include)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("GET"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ListTemplatesForDocument", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (TemplateInformation)this.ApiClient.Deserialize(localVarResponse, typeof(TemplateInformation))); } /// /// Add an attachment to a DRAFT or IN-PROCESS envelope. Adds an attachment to a draft or in-process envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// EnvelopeAttachmentsResult public EnvelopeAttachmentsResult PutAttachment(string accountId, string envelopeId, string attachmentId, Attachment attachment = null) { ApiResponse localVarResponse = PutAttachmentWithHttpInfo(accountId, envelopeId, attachmentId, attachment); return localVarResponse.Data; } /// /// Add an attachment to a DRAFT or IN-PROCESS envelope. Adds an attachment to a draft or in-process envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// ApiResponse of EnvelopeAttachmentsResult public ApiResponse PutAttachmentWithHttpInfo(string accountId, string envelopeId, string attachmentId, Attachment attachment = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->PutAttachment"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->PutAttachment"); // verify the required parameter 'attachmentId' is set if (attachmentId == null) throw new ApiException(400, "Missing required parameter 'attachmentId' when calling EnvelopesApi->PutAttachment"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments/{attachmentId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (attachmentId != null) localVarPathParams.Add("attachmentId", this.ApiClient.ParameterToString(attachmentId)); // path parameter if (attachment != null && attachment.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(attachment); // http body (model) parameter } else { localVarPostBody = attachment; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("PutAttachment", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeAttachmentsResult)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeAttachmentsResult))); } /// /// Add an attachment to a DRAFT or IN-PROCESS envelope. Adds an attachment to a draft or in-process envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// Task of EnvelopeAttachmentsResult public async System.Threading.Tasks.Task PutAttachmentAsync(string accountId, string envelopeId, string attachmentId, Attachment attachment = null) { ApiResponse localVarResponse = await PutAttachmentAsyncWithHttpInfo(accountId, envelopeId, attachmentId, attachment); return localVarResponse.Data; } /// /// Add an attachment to a DRAFT or IN-PROCESS envelope. Adds an attachment to a draft or in-process envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// Task of ApiResponse (EnvelopeAttachmentsResult) public async System.Threading.Tasks.Task> PutAttachmentAsyncWithHttpInfo(string accountId, string envelopeId, string attachmentId, Attachment attachment = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->PutAttachment"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->PutAttachment"); // verify the required parameter 'attachmentId' is set if (attachmentId == null) throw new ApiException(400, "Missing required parameter 'attachmentId' when calling EnvelopesApi->PutAttachment"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments/{attachmentId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (attachmentId != null) localVarPathParams.Add("attachmentId", this.ApiClient.ParameterToString(attachmentId)); // path parameter if (attachment != null && attachment.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(attachment); // http body (model) parameter } else { localVarPostBody = attachment; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("PutAttachment", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeAttachmentsResult)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeAttachmentsResult))); } /// /// Add one or more attachments to a DRAFT or IN-PROCESS envelope. Adds one or more attachments to a draft or in-process envelope. Envelope attachments are files that an application can include in an envelope. They are not converted to PDF. Envelope attachments are available only through the API. There is no user interface in the DocuSign web application for them. For a list of supported file formats, see [Supported File Formats](https://support.docusign.com/guides/ndse-user-guide-supported-file-formats). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// EnvelopeAttachmentsResult public EnvelopeAttachmentsResult PutAttachments(string accountId, string envelopeId, EnvelopeAttachmentsRequest envelopeAttachmentsRequest = null) { ApiResponse localVarResponse = PutAttachmentsWithHttpInfo(accountId, envelopeId, envelopeAttachmentsRequest); return localVarResponse.Data; } /// /// Add one or more attachments to a DRAFT or IN-PROCESS envelope. Adds one or more attachments to a draft or in-process envelope. Envelope attachments are files that an application can include in an envelope. They are not converted to PDF. Envelope attachments are available only through the API. There is no user interface in the DocuSign web application for them. For a list of supported file formats, see [Supported File Formats](https://support.docusign.com/guides/ndse-user-guide-supported-file-formats). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of EnvelopeAttachmentsResult public ApiResponse PutAttachmentsWithHttpInfo(string accountId, string envelopeId, EnvelopeAttachmentsRequest envelopeAttachmentsRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->PutAttachments"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->PutAttachments"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (envelopeAttachmentsRequest != null && envelopeAttachmentsRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeAttachmentsRequest); // http body (model) parameter } else { localVarPostBody = envelopeAttachmentsRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("PutAttachments", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeAttachmentsResult)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeAttachmentsResult))); } /// /// Add one or more attachments to a DRAFT or IN-PROCESS envelope. Adds one or more attachments to a draft or in-process envelope. Envelope attachments are files that an application can include in an envelope. They are not converted to PDF. Envelope attachments are available only through the API. There is no user interface in the DocuSign web application for them. For a list of supported file formats, see [Supported File Formats](https://support.docusign.com/guides/ndse-user-guide-supported-file-formats). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of EnvelopeAttachmentsResult public async System.Threading.Tasks.Task PutAttachmentsAsync(string accountId, string envelopeId, EnvelopeAttachmentsRequest envelopeAttachmentsRequest = null) { ApiResponse localVarResponse = await PutAttachmentsAsyncWithHttpInfo(accountId, envelopeId, envelopeAttachmentsRequest); return localVarResponse.Data; } /// /// Add one or more attachments to a DRAFT or IN-PROCESS envelope. Adds one or more attachments to a draft or in-process envelope. Envelope attachments are files that an application can include in an envelope. They are not converted to PDF. Envelope attachments are available only through the API. There is no user interface in the DocuSign web application for them. For a list of supported file formats, see [Supported File Formats](https://support.docusign.com/guides/ndse-user-guide-supported-file-formats). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (EnvelopeAttachmentsResult) public async System.Threading.Tasks.Task> PutAttachmentsAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopeAttachmentsRequest envelopeAttachmentsRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->PutAttachments"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->PutAttachments"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (envelopeAttachmentsRequest != null && envelopeAttachmentsRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeAttachmentsRequest); // http body (model) parameter } else { localVarPostBody = envelopeAttachmentsRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("PutAttachments", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeAttachmentsResult)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeAttachmentsResult))); } /// /// Rotates page image from an envelope for display. Rotates page image from an envelope for display. The page image can be rotated to the left or right. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// (optional) /// public void RotateDocumentPage(string accountId, string envelopeId, string documentId, string pageNumber, PageRequest pageRequest = null) { RotateDocumentPageWithHttpInfo(accountId, envelopeId, documentId, pageNumber, pageRequest); } /// /// Rotates page image from an envelope for display. Rotates page image from an envelope for display. The page image can be rotated to the left or right. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// (optional) /// ApiResponse of Object(void) public ApiResponse RotateDocumentPageWithHttpInfo(string accountId, string envelopeId, string documentId, string pageNumber, PageRequest pageRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->RotateDocumentPage"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->RotateDocumentPage"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->RotateDocumentPage"); // verify the required parameter 'pageNumber' is set if (pageNumber == null) throw new ApiException(400, "Missing required parameter 'pageNumber' when calling EnvelopesApi->RotateDocumentPage"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages/{pageNumber}/page_image"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (pageNumber != null) localVarPathParams.Add("pageNumber", this.ApiClient.ParameterToString(pageNumber)); // path parameter if (pageRequest != null && pageRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(pageRequest); // http body (model) parameter } else { localVarPostBody = pageRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("RotateDocumentPage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Rotates page image from an envelope for display. Rotates page image from an envelope for display. The page image can be rotated to the left or right. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// (optional) /// Task of void public async System.Threading.Tasks.Task RotateDocumentPageAsync(string accountId, string envelopeId, string documentId, string pageNumber, PageRequest pageRequest = null) { await RotateDocumentPageAsyncWithHttpInfo(accountId, envelopeId, documentId, pageNumber, pageRequest); } /// /// Rotates page image from an envelope for display. Rotates page image from an envelope for display. The page image can be rotated to the left or right. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// The page number being accessed. /// (optional) /// Task of ApiResponse public async System.Threading.Tasks.Task> RotateDocumentPageAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, string pageNumber, PageRequest pageRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->RotateDocumentPage"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->RotateDocumentPage"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->RotateDocumentPage"); // verify the required parameter 'pageNumber' is set if (pageNumber == null) throw new ApiException(400, "Missing required parameter 'pageNumber' when calling EnvelopesApi->RotateDocumentPage"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/pages/{pageNumber}/page_image"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (pageNumber != null) localVarPathParams.Add("pageNumber", this.ApiClient.ParameterToString(pageNumber)); // path parameter if (pageRequest != null && pageRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(pageRequest); // http body (model) parameter } else { localVarPostBody = pageRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("RotateDocumentPage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Send Draft Envelope/Void Envelope/Move/Purge Envelope/Modify draft The Put Envelopes endpoint provides the following functionality: * Sends the specified single draft envelope. Add {\"status\":\"sent\"} to the request body to send the envelope. * Voids the specified in-process envelope. Add {\"status\":\"voided\", \"voidedReason\":\"The reason for voiding the envelope\"} to the request body to void the envelope. * Replaces the current email subject and message for a draft envelope. Add {\"emailSubject\":\"subject\", \"emailBlurb\":\"message\"} to the request body to modify the subject and message. * Place the envelope documents and envelope metadata in a purge queue so that this information is removed from the DocuSign system. Add {\"purgeState\":\"purge type\"} to the request body. *Additional information on purging documents* The purge request can only be used for completed envelopes that are not marked as the authoritative copy. The requesting user must have permission to purge documents and must be the sender (the requesting user can act as the sender using Send On Behalf Of). ###### Note: If you have set the Document Retention policy on your account, envelope documents are automatically placed in the purge queue and the warning emails are sent at the end of the retention period. ###### Note: You can set the Document Retention policy in the Classic DocuSign Experience by specifying the number of days to retain documents. ###### Note: Setting a Document Retention policy is the same as setting a schedule for purging documents. When the purge request is initiated the envelope documents, or documents and envelope metadata, are placed in a purge queue for deletion in 14 days. A warning email notification is sent to the sender and recipients associated with the envelope, notifying them that the envelope documents will be deleted in 14 days and providing a link to the documents. A second email is sent 7 days later with the same message. At the end of the 14-day period, the envelope documents are deleted from the system. If `purgeState=\"documents_queued\"` is used in the request, then only the documents are deleted and any corresponding attachments and tabs remain in the DocuSign system. If `purgeState= \"documents_and_metadata_queued\"` is used in the request, then the documents, attachments, and tabs are deleted. /// public class UpdateOptions { /// When set to **true**, allows the caller to update recipients, tabs, custom fields, notification, email settings and other envelope attributes. public string advancedUpdate {get; set;} /// public string recycleOnVoid {get; set;} /// When set to **true**, sends the specified envelope again. public string resendEnvelope {get; set;} } /// /// Send Draft Envelope/Void Envelope/Move/Purge Envelope/Modify draft The Put Envelopes endpoint provides the following functionality: * Sends the specified single draft envelope. Add {\"status\":\"sent\"} to the request body to send the envelope. * Voids the specified in-process envelope. Add {\"status\":\"voided\", \"voidedReason\":\"The reason for voiding the envelope\"} to the request body to void the envelope. * Replaces the current email subject and message for a draft envelope. Add {\"emailSubject\":\"subject\", \"emailBlurb\":\"message\"} to the request body to modify the subject and message. * Place the envelope documents and envelope metadata in a purge queue so that this information is removed from the DocuSign system. Add {\"purgeState\":\"purge type\"} to the request body. *Additional information on purging documents* The purge request can only be used for completed envelopes that are not marked as the authoritative copy. The requesting user must have permission to purge documents and must be the sender (the requesting user can act as the sender using Send On Behalf Of). ###### Note: If you have set the Document Retention policy on your account, envelope documents are automatically placed in the purge queue and the warning emails are sent at the end of the retention period. ###### Note: You can set the Document Retention policy in the Classic DocuSign Experience by specifying the number of days to retain documents. ###### Note: Setting a Document Retention policy is the same as setting a schedule for purging documents. When the purge request is initiated the envelope documents, or documents and envelope metadata, are placed in a purge queue for deletion in 14 days. A warning email notification is sent to the sender and recipients associated with the envelope, notifying them that the envelope documents will be deleted in 14 days and providing a link to the documents. A second email is sent 7 days later with the same message. At the end of the 14-day period, the envelope documents are deleted from the system. If `purgeState=\"documents_queued\"` is used in the request, then only the documents are deleted and any corresponding attachments and tabs remain in the DocuSign system. If `purgeState= \"documents_and_metadata_queued\"` is used in the request, then the documents, attachments, and tabs are deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// EnvelopeUpdateSummary public EnvelopeUpdateSummary Update(string accountId, string envelopeId, Envelope envelope = null, EnvelopesApi.UpdateOptions options = null) { ApiResponse localVarResponse = UpdateWithHttpInfo(accountId, envelopeId, envelope, options); return localVarResponse.Data; } /// /// Send Draft Envelope/Void Envelope/Move/Purge Envelope/Modify draft The Put Envelopes endpoint provides the following functionality: * Sends the specified single draft envelope. Add {\"status\":\"sent\"} to the request body to send the envelope. * Voids the specified in-process envelope. Add {\"status\":\"voided\", \"voidedReason\":\"The reason for voiding the envelope\"} to the request body to void the envelope. * Replaces the current email subject and message for a draft envelope. Add {\"emailSubject\":\"subject\", \"emailBlurb\":\"message\"} to the request body to modify the subject and message. * Place the envelope documents and envelope metadata in a purge queue so that this information is removed from the DocuSign system. Add {\"purgeState\":\"purge type\"} to the request body. *Additional information on purging documents* The purge request can only be used for completed envelopes that are not marked as the authoritative copy. The requesting user must have permission to purge documents and must be the sender (the requesting user can act as the sender using Send On Behalf Of). ###### Note: If you have set the Document Retention policy on your account, envelope documents are automatically placed in the purge queue and the warning emails are sent at the end of the retention period. ###### Note: You can set the Document Retention policy in the Classic DocuSign Experience by specifying the number of days to retain documents. ###### Note: Setting a Document Retention policy is the same as setting a schedule for purging documents. When the purge request is initiated the envelope documents, or documents and envelope metadata, are placed in a purge queue for deletion in 14 days. A warning email notification is sent to the sender and recipients associated with the envelope, notifying them that the envelope documents will be deleted in 14 days and providing a link to the documents. A second email is sent 7 days later with the same message. At the end of the 14-day period, the envelope documents are deleted from the system. If `purgeState=\"documents_queued\"` is used in the request, then only the documents are deleted and any corresponding attachments and tabs remain in the DocuSign system. If `purgeState= \"documents_and_metadata_queued\"` is used in the request, then the documents, attachments, and tabs are deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// ApiResponse of EnvelopeUpdateSummary public ApiResponse UpdateWithHttpInfo(string accountId, string envelopeId, Envelope envelope = null, EnvelopesApi.UpdateOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->Update"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->Update"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.advancedUpdate != null) localVarQueryParams.Add("advanced_update", this.ApiClient.ParameterToString(options.advancedUpdate)); // query parameter if (options.recycleOnVoid != null) localVarQueryParams.Add("recycle_on_void", this.ApiClient.ParameterToString(options.recycleOnVoid)); // query parameter if (options.resendEnvelope != null) localVarQueryParams.Add("resend_envelope", this.ApiClient.ParameterToString(options.resendEnvelope)); // query parameter } if (envelope != null && envelope.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelope); // http body (model) parameter } else { localVarPostBody = envelope; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("Update", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeUpdateSummary)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeUpdateSummary))); } /// /// Send Draft Envelope/Void Envelope/Move/Purge Envelope/Modify draft The Put Envelopes endpoint provides the following functionality: * Sends the specified single draft envelope. Add {\"status\":\"sent\"} to the request body to send the envelope. * Voids the specified in-process envelope. Add {\"status\":\"voided\", \"voidedReason\":\"The reason for voiding the envelope\"} to the request body to void the envelope. * Replaces the current email subject and message for a draft envelope. Add {\"emailSubject\":\"subject\", \"emailBlurb\":\"message\"} to the request body to modify the subject and message. * Place the envelope documents and envelope metadata in a purge queue so that this information is removed from the DocuSign system. Add {\"purgeState\":\"purge type\"} to the request body. *Additional information on purging documents* The purge request can only be used for completed envelopes that are not marked as the authoritative copy. The requesting user must have permission to purge documents and must be the sender (the requesting user can act as the sender using Send On Behalf Of). ###### Note: If you have set the Document Retention policy on your account, envelope documents are automatically placed in the purge queue and the warning emails are sent at the end of the retention period. ###### Note: You can set the Document Retention policy in the Classic DocuSign Experience by specifying the number of days to retain documents. ###### Note: Setting a Document Retention policy is the same as setting a schedule for purging documents. When the purge request is initiated the envelope documents, or documents and envelope metadata, are placed in a purge queue for deletion in 14 days. A warning email notification is sent to the sender and recipients associated with the envelope, notifying them that the envelope documents will be deleted in 14 days and providing a link to the documents. A second email is sent 7 days later with the same message. At the end of the 14-day period, the envelope documents are deleted from the system. If `purgeState=\"documents_queued\"` is used in the request, then only the documents are deleted and any corresponding attachments and tabs remain in the DocuSign system. If `purgeState= \"documents_and_metadata_queued\"` is used in the request, then the documents, attachments, and tabs are deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of EnvelopeUpdateSummary public async System.Threading.Tasks.Task UpdateAsync(string accountId, string envelopeId, Envelope envelope = null, EnvelopesApi.UpdateOptions options = null) { ApiResponse localVarResponse = await UpdateAsyncWithHttpInfo(accountId, envelopeId, envelope, options); return localVarResponse.Data; } /// /// Send Draft Envelope/Void Envelope/Move/Purge Envelope/Modify draft The Put Envelopes endpoint provides the following functionality: * Sends the specified single draft envelope. Add {\"status\":\"sent\"} to the request body to send the envelope. * Voids the specified in-process envelope. Add {\"status\":\"voided\", \"voidedReason\":\"The reason for voiding the envelope\"} to the request body to void the envelope. * Replaces the current email subject and message for a draft envelope. Add {\"emailSubject\":\"subject\", \"emailBlurb\":\"message\"} to the request body to modify the subject and message. * Place the envelope documents and envelope metadata in a purge queue so that this information is removed from the DocuSign system. Add {\"purgeState\":\"purge type\"} to the request body. *Additional information on purging documents* The purge request can only be used for completed envelopes that are not marked as the authoritative copy. The requesting user must have permission to purge documents and must be the sender (the requesting user can act as the sender using Send On Behalf Of). ###### Note: If you have set the Document Retention policy on your account, envelope documents are automatically placed in the purge queue and the warning emails are sent at the end of the retention period. ###### Note: You can set the Document Retention policy in the Classic DocuSign Experience by specifying the number of days to retain documents. ###### Note: Setting a Document Retention policy is the same as setting a schedule for purging documents. When the purge request is initiated the envelope documents, or documents and envelope metadata, are placed in a purge queue for deletion in 14 days. A warning email notification is sent to the sender and recipients associated with the envelope, notifying them that the envelope documents will be deleted in 14 days and providing a link to the documents. A second email is sent 7 days later with the same message. At the end of the 14-day period, the envelope documents are deleted from the system. If `purgeState=\"documents_queued\"` is used in the request, then only the documents are deleted and any corresponding attachments and tabs remain in the DocuSign system. If `purgeState= \"documents_and_metadata_queued\"` is used in the request, then the documents, attachments, and tabs are deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of ApiResponse (EnvelopeUpdateSummary) public async System.Threading.Tasks.Task> UpdateAsyncWithHttpInfo(string accountId, string envelopeId, Envelope envelope = null, EnvelopesApi.UpdateOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->Update"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->Update"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.advancedUpdate != null) localVarQueryParams.Add("advanced_update", this.ApiClient.ParameterToString(options.advancedUpdate)); // query parameter if (options.recycleOnVoid != null) localVarQueryParams.Add("recycle_on_void", this.ApiClient.ParameterToString(options.recycleOnVoid)); // query parameter if (options.resendEnvelope != null) localVarQueryParams.Add("resend_envelope", this.ApiClient.ParameterToString(options.resendEnvelope)); // query parameter } if (envelope != null && envelope.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelope); // http body (model) parameter } else { localVarPostBody = envelope; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("Update", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeUpdateSummary)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeUpdateSummary))); } /// /// Integrity-Check and Commit a ChunkedUpload, readying it for use elsewhere. This method checks the integrity of a chunked upload and then commits it. When this request is successful, the chunked upload is then ready to be referenced in other API calls. If the request is unsuccessful, ensure that you have uploaded all of the parts by using the Update method. **Note:** After you commit a chunked upload, it no longer accepts additional parts. /// public class UpdateChunkedUploadOptions { /// public string action {get; set;} } /// /// Integrity-Check and Commit a ChunkedUpload, readying it for use elsewhere. This method checks the integrity of a chunked upload and then commits it. When this request is successful, the chunked upload is then ready to be referenced in other API calls. If the request is unsuccessful, ensure that you have uploaded all of the parts by using the Update method. **Note:** After you commit a chunked upload, it no longer accepts additional parts. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Options for modifying the behavior of the function. /// ChunkedUploadResponse public ChunkedUploadResponse UpdateChunkedUpload(string accountId, string chunkedUploadId, EnvelopesApi.UpdateChunkedUploadOptions options = null) { ApiResponse localVarResponse = UpdateChunkedUploadWithHttpInfo(accountId, chunkedUploadId, options); return localVarResponse.Data; } /// /// Integrity-Check and Commit a ChunkedUpload, readying it for use elsewhere. This method checks the integrity of a chunked upload and then commits it. When this request is successful, the chunked upload is then ready to be referenced in other API calls. If the request is unsuccessful, ensure that you have uploaded all of the parts by using the Update method. **Note:** After you commit a chunked upload, it no longer accepts additional parts. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Options for modifying the behavior of the function. /// ApiResponse of ChunkedUploadResponse public ApiResponse UpdateChunkedUploadWithHttpInfo(string accountId, string chunkedUploadId, EnvelopesApi.UpdateChunkedUploadOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateChunkedUpload"); // verify the required parameter 'chunkedUploadId' is set if (chunkedUploadId == null) throw new ApiException(400, "Missing required parameter 'chunkedUploadId' when calling EnvelopesApi->UpdateChunkedUpload"); var localVarPath = "/v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (chunkedUploadId != null) localVarPathParams.Add("chunkedUploadId", this.ApiClient.ParameterToString(chunkedUploadId)); // path parameter if (options != null) { if (options.action != null) localVarQueryParams.Add("action", this.ApiClient.ParameterToString(options.action)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateChunkedUpload", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ChunkedUploadResponse)this.ApiClient.Deserialize(localVarResponse, typeof(ChunkedUploadResponse))); } /// /// Integrity-Check and Commit a ChunkedUpload, readying it for use elsewhere. This method checks the integrity of a chunked upload and then commits it. When this request is successful, the chunked upload is then ready to be referenced in other API calls. If the request is unsuccessful, ensure that you have uploaded all of the parts by using the Update method. **Note:** After you commit a chunked upload, it no longer accepts additional parts. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Options for modifying the behavior of the function. /// Task of ChunkedUploadResponse public async System.Threading.Tasks.Task UpdateChunkedUploadAsync(string accountId, string chunkedUploadId, EnvelopesApi.UpdateChunkedUploadOptions options = null) { ApiResponse localVarResponse = await UpdateChunkedUploadAsyncWithHttpInfo(accountId, chunkedUploadId, options); return localVarResponse.Data; } /// /// Integrity-Check and Commit a ChunkedUpload, readying it for use elsewhere. This method checks the integrity of a chunked upload and then commits it. When this request is successful, the chunked upload is then ready to be referenced in other API calls. If the request is unsuccessful, ensure that you have uploaded all of the parts by using the Update method. **Note:** After you commit a chunked upload, it no longer accepts additional parts. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// Options for modifying the behavior of the function. /// Task of ApiResponse (ChunkedUploadResponse) public async System.Threading.Tasks.Task> UpdateChunkedUploadAsyncWithHttpInfo(string accountId, string chunkedUploadId, EnvelopesApi.UpdateChunkedUploadOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateChunkedUpload"); // verify the required parameter 'chunkedUploadId' is set if (chunkedUploadId == null) throw new ApiException(400, "Missing required parameter 'chunkedUploadId' when calling EnvelopesApi->UpdateChunkedUpload"); var localVarPath = "/v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (chunkedUploadId != null) localVarPathParams.Add("chunkedUploadId", this.ApiClient.ParameterToString(chunkedUploadId)); // path parameter if (options != null) { if (options.action != null) localVarQueryParams.Add("action", this.ApiClient.ParameterToString(options.action)); // query parameter } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateChunkedUpload", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ChunkedUploadResponse)this.ApiClient.Deserialize(localVarResponse, typeof(ChunkedUploadResponse))); } /// /// Add a chunk, a chunk 'part', to an existing ChunkedUpload. Adds a chunk or part to an existing chunked upload. After you use the Create method to initiate a new chunked upload and upload the first part, use this method to upload subsequent parts. For simplicity, DocuSign recommends that you upload the parts in their sequential order ( 1,2, 3, 4, etc.). The Create method adds the first part and assigns it the `sequence` value `0`. As a result, DocuSign recommends that you start with a `sequence` value of `1` when you use this method, and continue uploading parts contiguously until you have uploaded the entirety of the original content to DocuSign. Example: ``` PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/1 PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/2 PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/3 ``` **Note:** You cannot replace a part that DocuSign has already received, or add parts to a chunked upload that is already successfully committed. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// /// (optional) /// ChunkedUploadResponse public ChunkedUploadResponse UpdateChunkedUploadPart(string accountId, string chunkedUploadId, string chunkedUploadPartSeq, ChunkedUploadRequest chunkedUploadRequest = null) { ApiResponse localVarResponse = UpdateChunkedUploadPartWithHttpInfo(accountId, chunkedUploadId, chunkedUploadPartSeq, chunkedUploadRequest); return localVarResponse.Data; } /// /// Add a chunk, a chunk 'part', to an existing ChunkedUpload. Adds a chunk or part to an existing chunked upload. After you use the Create method to initiate a new chunked upload and upload the first part, use this method to upload subsequent parts. For simplicity, DocuSign recommends that you upload the parts in their sequential order ( 1,2, 3, 4, etc.). The Create method adds the first part and assigns it the `sequence` value `0`. As a result, DocuSign recommends that you start with a `sequence` value of `1` when you use this method, and continue uploading parts contiguously until you have uploaded the entirety of the original content to DocuSign. Example: ``` PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/1 PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/2 PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/3 ``` **Note:** You cannot replace a part that DocuSign has already received, or add parts to a chunked upload that is already successfully committed. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// /// (optional) /// ApiResponse of ChunkedUploadResponse public ApiResponse UpdateChunkedUploadPartWithHttpInfo(string accountId, string chunkedUploadId, string chunkedUploadPartSeq, ChunkedUploadRequest chunkedUploadRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateChunkedUploadPart"); // verify the required parameter 'chunkedUploadId' is set if (chunkedUploadId == null) throw new ApiException(400, "Missing required parameter 'chunkedUploadId' when calling EnvelopesApi->UpdateChunkedUploadPart"); // verify the required parameter 'chunkedUploadPartSeq' is set if (chunkedUploadPartSeq == null) throw new ApiException(400, "Missing required parameter 'chunkedUploadPartSeq' when calling EnvelopesApi->UpdateChunkedUploadPart"); var localVarPath = "/v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/{chunkedUploadPartSeq}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (chunkedUploadId != null) localVarPathParams.Add("chunkedUploadId", this.ApiClient.ParameterToString(chunkedUploadId)); // path parameter if (chunkedUploadPartSeq != null) localVarPathParams.Add("chunkedUploadPartSeq", this.ApiClient.ParameterToString(chunkedUploadPartSeq)); // path parameter if (chunkedUploadRequest != null && chunkedUploadRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(chunkedUploadRequest); // http body (model) parameter } else { localVarPostBody = chunkedUploadRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateChunkedUploadPart", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ChunkedUploadResponse)this.ApiClient.Deserialize(localVarResponse, typeof(ChunkedUploadResponse))); } /// /// Add a chunk, a chunk 'part', to an existing ChunkedUpload. Adds a chunk or part to an existing chunked upload. After you use the Create method to initiate a new chunked upload and upload the first part, use this method to upload subsequent parts. For simplicity, DocuSign recommends that you upload the parts in their sequential order ( 1,2, 3, 4, etc.). The Create method adds the first part and assigns it the `sequence` value `0`. As a result, DocuSign recommends that you start with a `sequence` value of `1` when you use this method, and continue uploading parts contiguously until you have uploaded the entirety of the original content to DocuSign. Example: ``` PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/1 PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/2 PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/3 ``` **Note:** You cannot replace a part that DocuSign has already received, or add parts to a chunked upload that is already successfully committed. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// /// (optional) /// Task of ChunkedUploadResponse public async System.Threading.Tasks.Task UpdateChunkedUploadPartAsync(string accountId, string chunkedUploadId, string chunkedUploadPartSeq, ChunkedUploadRequest chunkedUploadRequest = null) { ApiResponse localVarResponse = await UpdateChunkedUploadPartAsyncWithHttpInfo(accountId, chunkedUploadId, chunkedUploadPartSeq, chunkedUploadRequest); return localVarResponse.Data; } /// /// Add a chunk, a chunk 'part', to an existing ChunkedUpload. Adds a chunk or part to an existing chunked upload. After you use the Create method to initiate a new chunked upload and upload the first part, use this method to upload subsequent parts. For simplicity, DocuSign recommends that you upload the parts in their sequential order ( 1,2, 3, 4, etc.). The Create method adds the first part and assigns it the `sequence` value `0`. As a result, DocuSign recommends that you start with a `sequence` value of `1` when you use this method, and continue uploading parts contiguously until you have uploaded the entirety of the original content to DocuSign. Example: ``` PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/1 PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/2 PUT /v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/3 ``` **Note:** You cannot replace a part that DocuSign has already received, or add parts to a chunked upload that is already successfully committed. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// /// (optional) /// Task of ApiResponse (ChunkedUploadResponse) public async System.Threading.Tasks.Task> UpdateChunkedUploadPartAsyncWithHttpInfo(string accountId, string chunkedUploadId, string chunkedUploadPartSeq, ChunkedUploadRequest chunkedUploadRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateChunkedUploadPart"); // verify the required parameter 'chunkedUploadId' is set if (chunkedUploadId == null) throw new ApiException(400, "Missing required parameter 'chunkedUploadId' when calling EnvelopesApi->UpdateChunkedUploadPart"); // verify the required parameter 'chunkedUploadPartSeq' is set if (chunkedUploadPartSeq == null) throw new ApiException(400, "Missing required parameter 'chunkedUploadPartSeq' when calling EnvelopesApi->UpdateChunkedUploadPart"); var localVarPath = "/v2.1/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/{chunkedUploadPartSeq}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (chunkedUploadId != null) localVarPathParams.Add("chunkedUploadId", this.ApiClient.ParameterToString(chunkedUploadId)); // path parameter if (chunkedUploadPartSeq != null) localVarPathParams.Add("chunkedUploadPartSeq", this.ApiClient.ParameterToString(chunkedUploadPartSeq)); // path parameter if (chunkedUploadRequest != null && chunkedUploadRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(chunkedUploadRequest); // http body (model) parameter } else { localVarPostBody = chunkedUploadRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateChunkedUploadPart", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ChunkedUploadResponse)this.ApiClient.Deserialize(localVarResponse, typeof(ChunkedUploadResponse))); } /// /// Updates envelope custom fields in an envelope. Updates the envelope custom fields in draft and in-process envelopes. Each custom field used in an envelope must have a unique name. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// CustomFields public CustomFields UpdateCustomFields(string accountId, string envelopeId, CustomFields customFields = null) { ApiResponse localVarResponse = UpdateCustomFieldsWithHttpInfo(accountId, envelopeId, customFields); return localVarResponse.Data; } /// /// Updates envelope custom fields in an envelope. Updates the envelope custom fields in draft and in-process envelopes. Each custom field used in an envelope must have a unique name. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of CustomFields public ApiResponse UpdateCustomFieldsWithHttpInfo(string accountId, string envelopeId, CustomFields customFields = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateCustomFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateCustomFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (customFields != null && customFields.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(customFields); // http body (model) parameter } else { localVarPostBody = customFields; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateCustomFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (CustomFields)this.ApiClient.Deserialize(localVarResponse, typeof(CustomFields))); } /// /// Updates envelope custom fields in an envelope. Updates the envelope custom fields in draft and in-process envelopes. Each custom field used in an envelope must have a unique name. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of CustomFields public async System.Threading.Tasks.Task UpdateCustomFieldsAsync(string accountId, string envelopeId, CustomFields customFields = null) { ApiResponse localVarResponse = await UpdateCustomFieldsAsyncWithHttpInfo(accountId, envelopeId, customFields); return localVarResponse.Data; } /// /// Updates envelope custom fields in an envelope. Updates the envelope custom fields in draft and in-process envelopes. Each custom field used in an envelope must have a unique name. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (CustomFields) public async System.Threading.Tasks.Task> UpdateCustomFieldsAsyncWithHttpInfo(string accountId, string envelopeId, CustomFields customFields = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateCustomFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateCustomFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (customFields != null && customFields.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(customFields); // http body (model) parameter } else { localVarPostBody = customFields; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateCustomFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (CustomFields)this.ApiClient.Deserialize(localVarResponse, typeof(CustomFields))); } /// /// Adds a document to an existing draft envelope. Adds a document to an existing draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Updated document content. /// EnvelopeDocument public EnvelopeDocument UpdateDocument(string accountId, string envelopeId, string documentId, byte[] documentFileBytes) { ApiResponse localVarResponse = UpdateDocumentWithHttpInfo(accountId, envelopeId, documentId, documentFileBytes); return localVarResponse.Data; } /// /// Adds a document to an existing draft envelope. Adds a document to an existing draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Updated document content. /// ApiResponse of EnvelopeDocument public ApiResponse UpdateDocumentWithHttpInfo(string accountId, string envelopeId, string documentId, byte[] documentFileBytes) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateDocument"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateDocument"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->UpdateDocument"); // verify the required parameter 'documentFileBytes' is set if (documentFileBytes == null) throw new ApiException(400, "Missing required parameter 'documentFileBytes' when calling EnvelopesApi->UpdateDocument"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "application/pdf" }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (documentFileBytes != null && documentFileBytes.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentFileBytes); // http body (model) parameter } else { localVarPostBody = documentFileBytes; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateDocument", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeDocument)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeDocument))); } /// /// Adds a document to an existing draft envelope. Adds a document to an existing draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Updated document content. /// Task of EnvelopeDocument public async System.Threading.Tasks.Task UpdateDocumentAsync(string accountId, string envelopeId, string documentId, byte[] documentFileBytes) { ApiResponse localVarResponse = await UpdateDocumentAsyncWithHttpInfo(accountId, envelopeId, documentId, documentFileBytes); return localVarResponse.Data; } /// /// Adds a document to an existing draft envelope. Adds a document to an existing draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// Updated document content. /// Task of ApiResponse (EnvelopeDocument) public async System.Threading.Tasks.Task> UpdateDocumentAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, byte[] documentFileBytes) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateDocument"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateDocument"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->UpdateDocument"); // verify the required parameter 'documentFileBytes' is set if (documentFileBytes == null) throw new ApiException(400, "Missing required parameter 'documentFileBytes' when calling EnvelopesApi->UpdateDocument"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "application/pdf" }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (documentFileBytes != null && documentFileBytes.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentFileBytes); // http body (model) parameter } else { localVarPostBody = documentFileBytes; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateDocument", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeDocument)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeDocument))); } /// /// Updates existing custom document fields in an existing envelope document. Updates existing custom document fields in an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// DocumentFieldsInformation public DocumentFieldsInformation UpdateDocumentFields(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null) { ApiResponse localVarResponse = UpdateDocumentFieldsWithHttpInfo(accountId, envelopeId, documentId, documentFieldsInformation); return localVarResponse.Data; } /// /// Updates existing custom document fields in an existing envelope document. Updates existing custom document fields in an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// ApiResponse of DocumentFieldsInformation public ApiResponse UpdateDocumentFieldsWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateDocumentFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateDocumentFields"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->UpdateDocumentFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (documentFieldsInformation != null && documentFieldsInformation.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentFieldsInformation); // http body (model) parameter } else { localVarPostBody = documentFieldsInformation; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateDocumentFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentFieldsInformation)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentFieldsInformation))); } /// /// Updates existing custom document fields in an existing envelope document. Updates existing custom document fields in an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of DocumentFieldsInformation public async System.Threading.Tasks.Task UpdateDocumentFieldsAsync(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null) { ApiResponse localVarResponse = await UpdateDocumentFieldsAsyncWithHttpInfo(accountId, envelopeId, documentId, documentFieldsInformation); return localVarResponse.Data; } /// /// Updates existing custom document fields in an existing envelope document. Updates existing custom document fields in an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of ApiResponse (DocumentFieldsInformation) public async System.Threading.Tasks.Task> UpdateDocumentFieldsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, DocumentFieldsInformation documentFieldsInformation = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateDocumentFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateDocumentFields"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->UpdateDocumentFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (documentFieldsInformation != null && documentFieldsInformation.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentFieldsInformation); // http body (model) parameter } else { localVarPostBody = documentFieldsInformation; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateDocumentFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentFieldsInformation)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentFieldsInformation))); } /// /// Updates the tabs for an envelope document Updates tabs in the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Tabs public Tabs UpdateDocumentTabs(string accountId, string envelopeId, string documentId, Tabs tabs = null) { ApiResponse localVarResponse = UpdateDocumentTabsWithHttpInfo(accountId, envelopeId, documentId, tabs); return localVarResponse.Data; } /// /// Updates the tabs for an envelope document Updates tabs in the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// ApiResponse of Tabs public ApiResponse UpdateDocumentTabsWithHttpInfo(string accountId, string envelopeId, string documentId, Tabs tabs = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateDocumentTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateDocumentTabs"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->UpdateDocumentTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (tabs != null && tabs.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(tabs); // http body (model) parameter } else { localVarPostBody = tabs; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateDocumentTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Updates the tabs for an envelope document Updates tabs in the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of Tabs public async System.Threading.Tasks.Task UpdateDocumentTabsAsync(string accountId, string envelopeId, string documentId, Tabs tabs = null) { ApiResponse localVarResponse = await UpdateDocumentTabsAsyncWithHttpInfo(accountId, envelopeId, documentId, tabs); return localVarResponse.Data; } /// /// Updates the tabs for an envelope document Updates tabs in the document specified by `documentId` in the envelope specified by `envelopeId`. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the document being accessed. /// (optional) /// Task of ApiResponse (Tabs) public async System.Threading.Tasks.Task> UpdateDocumentTabsAsyncWithHttpInfo(string accountId, string envelopeId, string documentId, Tabs tabs = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateDocumentTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateDocumentTabs"); // verify the required parameter 'documentId' is set if (documentId == null) throw new ApiException(400, "Missing required parameter 'documentId' when calling EnvelopesApi->UpdateDocumentTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentId != null) localVarPathParams.Add("documentId", this.ApiClient.ParameterToString(documentId)); // path parameter if (tabs != null && tabs.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(tabs); // http body (model) parameter } else { localVarPostBody = tabs; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateDocumentTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Adds one or more documents to an existing envelope document. Adds one or more documents to an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// EnvelopeDocumentsResult public EnvelopeDocumentsResult UpdateDocuments(string accountId, string envelopeId, EnvelopeDefinition envelopeDefinition = null) { ApiResponse localVarResponse = UpdateDocumentsWithHttpInfo(accountId, envelopeId, envelopeDefinition); return localVarResponse.Data; } /// /// Adds one or more documents to an existing envelope document. Adds one or more documents to an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of EnvelopeDocumentsResult public ApiResponse UpdateDocumentsWithHttpInfo(string accountId, string envelopeId, EnvelopeDefinition envelopeDefinition = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateDocuments"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateDocuments"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (envelopeDefinition != null && envelopeDefinition.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeDefinition); // http body (model) parameter } else { localVarPostBody = envelopeDefinition; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateDocuments", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeDocumentsResult)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeDocumentsResult))); } /// /// Adds one or more documents to an existing envelope document. Adds one or more documents to an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of EnvelopeDocumentsResult public async System.Threading.Tasks.Task UpdateDocumentsAsync(string accountId, string envelopeId, EnvelopeDefinition envelopeDefinition = null) { ApiResponse localVarResponse = await UpdateDocumentsAsyncWithHttpInfo(accountId, envelopeId, envelopeDefinition); return localVarResponse.Data; } /// /// Adds one or more documents to an existing envelope document. Adds one or more documents to an existing envelope document. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (EnvelopeDocumentsResult) public async System.Threading.Tasks.Task> UpdateDocumentsAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopeDefinition envelopeDefinition = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateDocuments"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateDocuments"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (envelopeDefinition != null && envelopeDefinition.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeDefinition); // http body (model) parameter } else { localVarPostBody = envelopeDefinition; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateDocuments", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeDocumentsResult)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeDocumentsResult))); } /// /// Updates the email setting overrides for an envelope. Updates the existing email override settings for the specified envelope. Note that modifying email settings will only affect email communications that occur after the modification was made. This can also be used to delete an individual email override setting by using an empty string for the value to be deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// EmailSettings public EmailSettings UpdateEmailSettings(string accountId, string envelopeId, EmailSettings emailSettings = null) { ApiResponse localVarResponse = UpdateEmailSettingsWithHttpInfo(accountId, envelopeId, emailSettings); return localVarResponse.Data; } /// /// Updates the email setting overrides for an envelope. Updates the existing email override settings for the specified envelope. Note that modifying email settings will only affect email communications that occur after the modification was made. This can also be used to delete an individual email override setting by using an empty string for the value to be deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of EmailSettings public ApiResponse UpdateEmailSettingsWithHttpInfo(string accountId, string envelopeId, EmailSettings emailSettings = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateEmailSettings"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateEmailSettings"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/email_settings"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (emailSettings != null && emailSettings.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(emailSettings); // http body (model) parameter } else { localVarPostBody = emailSettings; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateEmailSettings", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EmailSettings)this.ApiClient.Deserialize(localVarResponse, typeof(EmailSettings))); } /// /// Updates the email setting overrides for an envelope. Updates the existing email override settings for the specified envelope. Note that modifying email settings will only affect email communications that occur after the modification was made. This can also be used to delete an individual email override setting by using an empty string for the value to be deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of EmailSettings public async System.Threading.Tasks.Task UpdateEmailSettingsAsync(string accountId, string envelopeId, EmailSettings emailSettings = null) { ApiResponse localVarResponse = await UpdateEmailSettingsAsyncWithHttpInfo(accountId, envelopeId, emailSettings); return localVarResponse.Data; } /// /// Updates the email setting overrides for an envelope. Updates the existing email override settings for the specified envelope. Note that modifying email settings will only affect email communications that occur after the modification was made. This can also be used to delete an individual email override setting by using an empty string for the value to be deleted. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (EmailSettings) public async System.Threading.Tasks.Task> UpdateEmailSettingsAsyncWithHttpInfo(string accountId, string envelopeId, EmailSettings emailSettings = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateEmailSettings"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateEmailSettings"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/email_settings"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (emailSettings != null && emailSettings.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(emailSettings); // http body (model) parameter } else { localVarPostBody = emailSettings; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateEmailSettings", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EmailSettings)this.ApiClient.Deserialize(localVarResponse, typeof(EmailSettings))); } /// /// Updates the delayed routing rules for an envelope's workflow step definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// DelayedRouting public DelayedRouting UpdateEnvelopeDelayedRoutingDefinition(string accountId, string envelopeId, string workflowStepId, DelayedRouting delayedRouting = null) { ApiResponse localVarResponse = UpdateEnvelopeDelayedRoutingDefinitionWithHttpInfo(accountId, envelopeId, workflowStepId, delayedRouting); return localVarResponse.Data; } /// /// Updates the delayed routing rules for an envelope's workflow step definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// ApiResponse of DelayedRouting public ApiResponse UpdateEnvelopeDelayedRoutingDefinitionWithHttpInfo(string accountId, string envelopeId, string workflowStepId, DelayedRouting delayedRouting = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateEnvelopeDelayedRoutingDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateEnvelopeDelayedRoutingDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->UpdateEnvelopeDelayedRoutingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/steps/{workflowStepId}/delayedRouting"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter if (delayedRouting != null && delayedRouting.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(delayedRouting); // http body (model) parameter } else { localVarPostBody = delayedRouting; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateEnvelopeDelayedRoutingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DelayedRouting)this.ApiClient.Deserialize(localVarResponse, typeof(DelayedRouting))); } /// /// Updates the delayed routing rules for an envelope's workflow step definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// Task of DelayedRouting public async System.Threading.Tasks.Task UpdateEnvelopeDelayedRoutingDefinitionAsync(string accountId, string envelopeId, string workflowStepId, DelayedRouting delayedRouting = null) { ApiResponse localVarResponse = await UpdateEnvelopeDelayedRoutingDefinitionAsyncWithHttpInfo(accountId, envelopeId, workflowStepId, delayedRouting); return localVarResponse.Data; } /// /// Updates the delayed routing rules for an envelope's workflow step definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// Task of ApiResponse (DelayedRouting) public async System.Threading.Tasks.Task> UpdateEnvelopeDelayedRoutingDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, string workflowStepId, DelayedRouting delayedRouting = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateEnvelopeDelayedRoutingDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateEnvelopeDelayedRoutingDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->UpdateEnvelopeDelayedRoutingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/steps/{workflowStepId}/delayedRouting"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter if (delayedRouting != null && delayedRouting.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(delayedRouting); // http body (model) parameter } else { localVarPostBody = delayedRouting; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateEnvelopeDelayedRoutingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DelayedRouting)this.ApiClient.Deserialize(localVarResponse, typeof(DelayedRouting))); } /// /// Updates formfields for an envelope /// public class UpdateEnvelopeDocGenFormFieldsOptions { /// public string updateDocgenFormfieldsOnly {get; set;} } /// /// Updates formfields for an envelope /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// DocGenFormFieldResponse public DocGenFormFieldResponse UpdateEnvelopeDocGenFormFields(string accountId, string envelopeId, DocGenFormFieldRequest docGenFormFieldRequest = null, EnvelopesApi.UpdateEnvelopeDocGenFormFieldsOptions options = null) { ApiResponse localVarResponse = UpdateEnvelopeDocGenFormFieldsWithHttpInfo(accountId, envelopeId, docGenFormFieldRequest, options); return localVarResponse.Data; } /// /// Updates formfields for an envelope /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// ApiResponse of DocGenFormFieldResponse public ApiResponse UpdateEnvelopeDocGenFormFieldsWithHttpInfo(string accountId, string envelopeId, DocGenFormFieldRequest docGenFormFieldRequest = null, EnvelopesApi.UpdateEnvelopeDocGenFormFieldsOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateEnvelopeDocGenFormFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateEnvelopeDocGenFormFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/docGenFormFields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.updateDocgenFormfieldsOnly != null) localVarQueryParams.Add("update_docgen_formfields_only", this.ApiClient.ParameterToString(options.updateDocgenFormfieldsOnly)); // query parameter } if (docGenFormFieldRequest != null && docGenFormFieldRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(docGenFormFieldRequest); // http body (model) parameter } else { localVarPostBody = docGenFormFieldRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateEnvelopeDocGenFormFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocGenFormFieldResponse)this.ApiClient.Deserialize(localVarResponse, typeof(DocGenFormFieldResponse))); } /// /// Updates formfields for an envelope /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of DocGenFormFieldResponse public async System.Threading.Tasks.Task UpdateEnvelopeDocGenFormFieldsAsync(string accountId, string envelopeId, DocGenFormFieldRequest docGenFormFieldRequest = null, EnvelopesApi.UpdateEnvelopeDocGenFormFieldsOptions options = null) { ApiResponse localVarResponse = await UpdateEnvelopeDocGenFormFieldsAsyncWithHttpInfo(accountId, envelopeId, docGenFormFieldRequest, options); return localVarResponse.Data; } /// /// Updates formfields for an envelope /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of ApiResponse (DocGenFormFieldResponse) public async System.Threading.Tasks.Task> UpdateEnvelopeDocGenFormFieldsAsyncWithHttpInfo(string accountId, string envelopeId, DocGenFormFieldRequest docGenFormFieldRequest = null, EnvelopesApi.UpdateEnvelopeDocGenFormFieldsOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateEnvelopeDocGenFormFields"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateEnvelopeDocGenFormFields"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/docGenFormFields"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.updateDocgenFormfieldsOnly != null) localVarQueryParams.Add("update_docgen_formfields_only", this.ApiClient.ParameterToString(options.updateDocgenFormfieldsOnly)); // query parameter } if (docGenFormFieldRequest != null && docGenFormFieldRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(docGenFormFieldRequest); // http body (model) parameter } else { localVarPostBody = docGenFormFieldRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateEnvelopeDocGenFormFields", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocGenFormFieldResponse)this.ApiClient.Deserialize(localVarResponse, typeof(DocGenFormFieldResponse))); } /// /// Updates the scheduled sending rules for an envelope's workflow definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ScheduledSending public ScheduledSending UpdateEnvelopeScheduledSendingDefinition(string accountId, string envelopeId, ScheduledSending scheduledSending = null) { ApiResponse localVarResponse = UpdateEnvelopeScheduledSendingDefinitionWithHttpInfo(accountId, envelopeId, scheduledSending); return localVarResponse.Data; } /// /// Updates the scheduled sending rules for an envelope's workflow definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of ScheduledSending public ApiResponse UpdateEnvelopeScheduledSendingDefinitionWithHttpInfo(string accountId, string envelopeId, ScheduledSending scheduledSending = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateEnvelopeScheduledSendingDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateEnvelopeScheduledSendingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/scheduledSending"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (scheduledSending != null && scheduledSending.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(scheduledSending); // http body (model) parameter } else { localVarPostBody = scheduledSending; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateEnvelopeScheduledSendingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ScheduledSending)this.ApiClient.Deserialize(localVarResponse, typeof(ScheduledSending))); } /// /// Updates the scheduled sending rules for an envelope's workflow definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ScheduledSending public async System.Threading.Tasks.Task UpdateEnvelopeScheduledSendingDefinitionAsync(string accountId, string envelopeId, ScheduledSending scheduledSending = null) { ApiResponse localVarResponse = await UpdateEnvelopeScheduledSendingDefinitionAsyncWithHttpInfo(accountId, envelopeId, scheduledSending); return localVarResponse.Data; } /// /// Updates the scheduled sending rules for an envelope's workflow definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (ScheduledSending) public async System.Threading.Tasks.Task> UpdateEnvelopeScheduledSendingDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, ScheduledSending scheduledSending = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateEnvelopeScheduledSendingDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateEnvelopeScheduledSendingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/scheduledSending"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (scheduledSending != null && scheduledSending.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(scheduledSending); // http body (model) parameter } else { localVarPostBody = scheduledSending; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateEnvelopeScheduledSendingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ScheduledSending)this.ApiClient.Deserialize(localVarResponse, typeof(ScheduledSending))); } /// /// Update an envelope transfer rule for an account. This method changes the status of an envelope transfer rule. You use this method to change whether or not the rule is enabled. You must include the `envelopeTransferRuleId` both as a query parameter, and in the request body. **Note:** You cannot change any other information about the envelope transfer rule. Only Administrators can update an envelope transfer rule. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// (optional) /// EnvelopeTransferRule public EnvelopeTransferRule UpdateEnvelopeTransferRule(string accountId, string envelopeTransferRuleId, EnvelopeTransferRule envelopeTransferRule = null) { ApiResponse localVarResponse = UpdateEnvelopeTransferRuleWithHttpInfo(accountId, envelopeTransferRuleId, envelopeTransferRule); return localVarResponse.Data; } /// /// Update an envelope transfer rule for an account. This method changes the status of an envelope transfer rule. You use this method to change whether or not the rule is enabled. You must include the `envelopeTransferRuleId` both as a query parameter, and in the request body. **Note:** You cannot change any other information about the envelope transfer rule. Only Administrators can update an envelope transfer rule. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// (optional) /// ApiResponse of EnvelopeTransferRule public ApiResponse UpdateEnvelopeTransferRuleWithHttpInfo(string accountId, string envelopeTransferRuleId, EnvelopeTransferRule envelopeTransferRule = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateEnvelopeTransferRule"); // verify the required parameter 'envelopeTransferRuleId' is set if (envelopeTransferRuleId == null) throw new ApiException(400, "Missing required parameter 'envelopeTransferRuleId' when calling EnvelopesApi->UpdateEnvelopeTransferRule"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/transfer_rules/{envelopeTransferRuleId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeTransferRuleId != null) localVarPathParams.Add("envelopeTransferRuleId", this.ApiClient.ParameterToString(envelopeTransferRuleId)); // path parameter if (envelopeTransferRule != null && envelopeTransferRule.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeTransferRule); // http body (model) parameter } else { localVarPostBody = envelopeTransferRule; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateEnvelopeTransferRule", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeTransferRule)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeTransferRule))); } /// /// Update an envelope transfer rule for an account. This method changes the status of an envelope transfer rule. You use this method to change whether or not the rule is enabled. You must include the `envelopeTransferRuleId` both as a query parameter, and in the request body. **Note:** You cannot change any other information about the envelope transfer rule. Only Administrators can update an envelope transfer rule. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// (optional) /// Task of EnvelopeTransferRule public async System.Threading.Tasks.Task UpdateEnvelopeTransferRuleAsync(string accountId, string envelopeTransferRuleId, EnvelopeTransferRule envelopeTransferRule = null) { ApiResponse localVarResponse = await UpdateEnvelopeTransferRuleAsyncWithHttpInfo(accountId, envelopeTransferRuleId, envelopeTransferRule); return localVarResponse.Data; } /// /// Update an envelope transfer rule for an account. This method changes the status of an envelope transfer rule. You use this method to change whether or not the rule is enabled. You must include the `envelopeTransferRuleId` both as a query parameter, and in the request body. **Note:** You cannot change any other information about the envelope transfer rule. Only Administrators can update an envelope transfer rule. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// /// (optional) /// Task of ApiResponse (EnvelopeTransferRule) public async System.Threading.Tasks.Task> UpdateEnvelopeTransferRuleAsyncWithHttpInfo(string accountId, string envelopeTransferRuleId, EnvelopeTransferRule envelopeTransferRule = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateEnvelopeTransferRule"); // verify the required parameter 'envelopeTransferRuleId' is set if (envelopeTransferRuleId == null) throw new ApiException(400, "Missing required parameter 'envelopeTransferRuleId' when calling EnvelopesApi->UpdateEnvelopeTransferRule"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/transfer_rules/{envelopeTransferRuleId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeTransferRuleId != null) localVarPathParams.Add("envelopeTransferRuleId", this.ApiClient.ParameterToString(envelopeTransferRuleId)); // path parameter if (envelopeTransferRule != null && envelopeTransferRule.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeTransferRule); // http body (model) parameter } else { localVarPostBody = envelopeTransferRule; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateEnvelopeTransferRule", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeTransferRule)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeTransferRule))); } /// /// Update envelope transfer rules for an account. This method changes the status for one or more envelope transfer rules based on the `envelopeTransferRuleId`s in the request body. You use this method to change whether or not the rules are enabled. **Note:** You cannot change any other information about the envelope transfer rule. Only Administrators can update envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// EnvelopeTransferRuleInformation public EnvelopeTransferRuleInformation UpdateEnvelopeTransferRules(string accountId, EnvelopeTransferRuleInformation envelopeTransferRuleInformation = null) { ApiResponse localVarResponse = UpdateEnvelopeTransferRulesWithHttpInfo(accountId, envelopeTransferRuleInformation); return localVarResponse.Data; } /// /// Update envelope transfer rules for an account. This method changes the status for one or more envelope transfer rules based on the `envelopeTransferRuleId`s in the request body. You use this method to change whether or not the rules are enabled. **Note:** You cannot change any other information about the envelope transfer rule. Only Administrators can update envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// ApiResponse of EnvelopeTransferRuleInformation public ApiResponse UpdateEnvelopeTransferRulesWithHttpInfo(string accountId, EnvelopeTransferRuleInformation envelopeTransferRuleInformation = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateEnvelopeTransferRules"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/transfer_rules"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeTransferRuleInformation != null && envelopeTransferRuleInformation.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeTransferRuleInformation); // http body (model) parameter } else { localVarPostBody = envelopeTransferRuleInformation; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateEnvelopeTransferRules", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeTransferRuleInformation)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeTransferRuleInformation))); } /// /// Update envelope transfer rules for an account. This method changes the status for one or more envelope transfer rules based on the `envelopeTransferRuleId`s in the request body. You use this method to change whether or not the rules are enabled. **Note:** You cannot change any other information about the envelope transfer rule. Only Administrators can update envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of EnvelopeTransferRuleInformation public async System.Threading.Tasks.Task UpdateEnvelopeTransferRulesAsync(string accountId, EnvelopeTransferRuleInformation envelopeTransferRuleInformation = null) { ApiResponse localVarResponse = await UpdateEnvelopeTransferRulesAsyncWithHttpInfo(accountId, envelopeTransferRuleInformation); return localVarResponse.Data; } /// /// Update envelope transfer rules for an account. This method changes the status for one or more envelope transfer rules based on the `envelopeTransferRuleId`s in the request body. You use this method to change whether or not the rules are enabled. **Note:** You cannot change any other information about the envelope transfer rule. Only Administrators can update envelope transfer rules. In addition, to use envelope transfer rules, the **Transfer Custody** feature must be enabled for your account. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// (optional) /// Task of ApiResponse (EnvelopeTransferRuleInformation) public async System.Threading.Tasks.Task> UpdateEnvelopeTransferRulesAsyncWithHttpInfo(string accountId, EnvelopeTransferRuleInformation envelopeTransferRuleInformation = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateEnvelopeTransferRules"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/transfer_rules"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeTransferRuleInformation != null && envelopeTransferRuleInformation.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeTransferRuleInformation); // http body (model) parameter } else { localVarPostBody = envelopeTransferRuleInformation; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateEnvelopeTransferRules", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (EnvelopeTransferRuleInformation)this.ApiClient.Deserialize(localVarResponse, typeof(EnvelopeTransferRuleInformation))); } /// /// Updates the envelope workflow definition for an envelope. Updates the specified envelope's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Workflow public Workflow UpdateEnvelopeWorkflowDefinition(string accountId, string envelopeId, Workflow workflow = null) { ApiResponse localVarResponse = UpdateEnvelopeWorkflowDefinitionWithHttpInfo(accountId, envelopeId, workflow); return localVarResponse.Data; } /// /// Updates the envelope workflow definition for an envelope. Updates the specified envelope's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of Workflow public ApiResponse UpdateEnvelopeWorkflowDefinitionWithHttpInfo(string accountId, string envelopeId, Workflow workflow = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateEnvelopeWorkflowDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateEnvelopeWorkflowDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (workflow != null && workflow.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(workflow); // http body (model) parameter } else { localVarPostBody = workflow; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateEnvelopeWorkflowDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Workflow)this.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); } /// /// Updates the envelope workflow definition for an envelope. Updates the specified envelope's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of Workflow public async System.Threading.Tasks.Task UpdateEnvelopeWorkflowDefinitionAsync(string accountId, string envelopeId, Workflow workflow = null) { ApiResponse localVarResponse = await UpdateEnvelopeWorkflowDefinitionAsyncWithHttpInfo(accountId, envelopeId, workflow); return localVarResponse.Data; } /// /// Updates the envelope workflow definition for an envelope. Updates the specified envelope's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (Workflow) public async System.Threading.Tasks.Task> UpdateEnvelopeWorkflowDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, Workflow workflow = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateEnvelopeWorkflowDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateEnvelopeWorkflowDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (workflow != null && workflow.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(workflow); // http body (model) parameter } else { localVarPostBody = workflow; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateEnvelopeWorkflowDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Workflow)this.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); } /// /// Updates the envelope workflow step definition for an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// WorkflowStep public WorkflowStep UpdateEnvelopeWorkflowStepDefinition(string accountId, string envelopeId, string workflowStepId, WorkflowStep workflowStep = null) { ApiResponse localVarResponse = UpdateEnvelopeWorkflowStepDefinitionWithHttpInfo(accountId, envelopeId, workflowStepId, workflowStep); return localVarResponse.Data; } /// /// Updates the envelope workflow step definition for an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// ApiResponse of WorkflowStep public ApiResponse UpdateEnvelopeWorkflowStepDefinitionWithHttpInfo(string accountId, string envelopeId, string workflowStepId, WorkflowStep workflowStep = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateEnvelopeWorkflowStepDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateEnvelopeWorkflowStepDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->UpdateEnvelopeWorkflowStepDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/steps/{workflowStepId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter if (workflowStep != null && workflowStep.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(workflowStep); // http body (model) parameter } else { localVarPostBody = workflowStep; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateEnvelopeWorkflowStepDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (WorkflowStep)this.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStep))); } /// /// Updates the envelope workflow step definition for an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// Task of WorkflowStep public async System.Threading.Tasks.Task UpdateEnvelopeWorkflowStepDefinitionAsync(string accountId, string envelopeId, string workflowStepId, WorkflowStep workflowStep = null) { ApiResponse localVarResponse = await UpdateEnvelopeWorkflowStepDefinitionAsyncWithHttpInfo(accountId, envelopeId, workflowStepId, workflowStep); return localVarResponse.Data; } /// /// Updates the envelope workflow step definition for an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// /// (optional) /// Task of ApiResponse (WorkflowStep) public async System.Threading.Tasks.Task> UpdateEnvelopeWorkflowStepDefinitionAsyncWithHttpInfo(string accountId, string envelopeId, string workflowStepId, WorkflowStep workflowStep = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateEnvelopeWorkflowStepDefinition"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateEnvelopeWorkflowStepDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->UpdateEnvelopeWorkflowStepDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/steps/{workflowStepId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter if (workflowStep != null && workflowStep.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(workflowStep); // http body (model) parameter } else { localVarPostBody = workflowStep; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateEnvelopeWorkflowStepDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (WorkflowStep)this.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStep))); } /// /// Updates an envelope lock. Updates the lock duration time or update the `lockedByApp` property information for the specified envelope. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// LockInformation public LockInformation UpdateLock(string accountId, string envelopeId, LockRequest lockRequest = null) { ApiResponse localVarResponse = UpdateLockWithHttpInfo(accountId, envelopeId, lockRequest); return localVarResponse.Data; } /// /// Updates an envelope lock. Updates the lock duration time or update the `lockedByApp` property information for the specified envelope. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of LockInformation public ApiResponse UpdateLockWithHttpInfo(string accountId, string envelopeId, LockRequest lockRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateLock"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateLock"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (lockRequest != null && lockRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(lockRequest); // http body (model) parameter } else { localVarPostBody = lockRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateLock", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (LockInformation)this.ApiClient.Deserialize(localVarResponse, typeof(LockInformation))); } /// /// Updates an envelope lock. Updates the lock duration time or update the `lockedByApp` property information for the specified envelope. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of LockInformation public async System.Threading.Tasks.Task UpdateLockAsync(string accountId, string envelopeId, LockRequest lockRequest = null) { ApiResponse localVarResponse = await UpdateLockAsyncWithHttpInfo(accountId, envelopeId, lockRequest); return localVarResponse.Data; } /// /// Updates an envelope lock. Updates the lock duration time or update the `lockedByApp` property information for the specified envelope. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (LockInformation) public async System.Threading.Tasks.Task> UpdateLockAsyncWithHttpInfo(string accountId, string envelopeId, LockRequest lockRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateLock"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateLock"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (lockRequest != null && lockRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(lockRequest); // http body (model) parameter } else { localVarPostBody = lockRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateLock", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (LockInformation)this.ApiClient.Deserialize(localVarResponse, typeof(LockInformation))); } /// /// Sets envelope notification (Reminders/Expirations) structure for an existing envelope. This method sets the notifications (reminders and expirations) for an existing envelope. The request body sends a structure containing reminders and expirations settings. It also specifies whether to use the settings specified in the request, or the account default notification settings for the envelope. Note that this request only specifies when notifications are sent; it does not initiate sending of email messages. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Notification public Notification UpdateNotificationSettings(string accountId, string envelopeId, EnvelopeNotificationRequest envelopeNotificationRequest = null) { ApiResponse localVarResponse = UpdateNotificationSettingsWithHttpInfo(accountId, envelopeId, envelopeNotificationRequest); return localVarResponse.Data; } /// /// Sets envelope notification (Reminders/Expirations) structure for an existing envelope. This method sets the notifications (reminders and expirations) for an existing envelope. The request body sends a structure containing reminders and expirations settings. It also specifies whether to use the settings specified in the request, or the account default notification settings for the envelope. Note that this request only specifies when notifications are sent; it does not initiate sending of email messages. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of Notification public ApiResponse UpdateNotificationSettingsWithHttpInfo(string accountId, string envelopeId, EnvelopeNotificationRequest envelopeNotificationRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateNotificationSettings"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateNotificationSettings"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/notification"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (envelopeNotificationRequest != null && envelopeNotificationRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeNotificationRequest); // http body (model) parameter } else { localVarPostBody = envelopeNotificationRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateNotificationSettings", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Notification)this.ApiClient.Deserialize(localVarResponse, typeof(Notification))); } /// /// Sets envelope notification (Reminders/Expirations) structure for an existing envelope. This method sets the notifications (reminders and expirations) for an existing envelope. The request body sends a structure containing reminders and expirations settings. It also specifies whether to use the settings specified in the request, or the account default notification settings for the envelope. Note that this request only specifies when notifications are sent; it does not initiate sending of email messages. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of Notification public async System.Threading.Tasks.Task UpdateNotificationSettingsAsync(string accountId, string envelopeId, EnvelopeNotificationRequest envelopeNotificationRequest = null) { ApiResponse localVarResponse = await UpdateNotificationSettingsAsyncWithHttpInfo(accountId, envelopeId, envelopeNotificationRequest); return localVarResponse.Data; } /// /// Sets envelope notification (Reminders/Expirations) structure for an existing envelope. This method sets the notifications (reminders and expirations) for an existing envelope. The request body sends a structure containing reminders and expirations settings. It also specifies whether to use the settings specified in the request, or the account default notification settings for the envelope. Note that this request only specifies when notifications are sent; it does not initiate sending of email messages. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (Notification) public async System.Threading.Tasks.Task> UpdateNotificationSettingsAsyncWithHttpInfo(string accountId, string envelopeId, EnvelopeNotificationRequest envelopeNotificationRequest = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateNotificationSettings"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateNotificationSettings"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/notification"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (envelopeNotificationRequest != null && envelopeNotificationRequest.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(envelopeNotificationRequest); // http body (model) parameter } else { localVarPostBody = envelopeNotificationRequest; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateNotificationSettings", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Notification)this.ApiClient.Deserialize(localVarResponse, typeof(Notification))); } /// /// Updates document visibility for the recipients This method updates document visibility for a recipient. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// DocumentVisibilityList public DocumentVisibilityList UpdateRecipientDocumentVisibility(string accountId, string envelopeId, string recipientId, DocumentVisibilityList documentVisibilityList = null) { ApiResponse localVarResponse = UpdateRecipientDocumentVisibilityWithHttpInfo(accountId, envelopeId, recipientId, documentVisibilityList); return localVarResponse.Data; } /// /// Updates document visibility for the recipients This method updates document visibility for a recipient. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// ApiResponse of DocumentVisibilityList public ApiResponse UpdateRecipientDocumentVisibilityWithHttpInfo(string accountId, string envelopeId, string recipientId, DocumentVisibilityList documentVisibilityList = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateRecipientDocumentVisibility"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateRecipientDocumentVisibility"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->UpdateRecipientDocumentVisibility"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/document_visibility"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (documentVisibilityList != null && documentVisibilityList.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentVisibilityList); // http body (model) parameter } else { localVarPostBody = documentVisibilityList; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateRecipientDocumentVisibility", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentVisibilityList)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentVisibilityList))); } /// /// Updates document visibility for the recipients This method updates document visibility for a recipient. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of DocumentVisibilityList public async System.Threading.Tasks.Task UpdateRecipientDocumentVisibilityAsync(string accountId, string envelopeId, string recipientId, DocumentVisibilityList documentVisibilityList = null) { ApiResponse localVarResponse = await UpdateRecipientDocumentVisibilityAsyncWithHttpInfo(accountId, envelopeId, recipientId, documentVisibilityList); return localVarResponse.Data; } /// /// Updates document visibility for the recipients This method updates document visibility for a recipient. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of ApiResponse (DocumentVisibilityList) public async System.Threading.Tasks.Task> UpdateRecipientDocumentVisibilityAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, DocumentVisibilityList documentVisibilityList = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateRecipientDocumentVisibility"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateRecipientDocumentVisibility"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->UpdateRecipientDocumentVisibility"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/document_visibility"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (documentVisibilityList != null && documentVisibilityList.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentVisibilityList); // http body (model) parameter } else { localVarPostBody = documentVisibilityList; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateRecipientDocumentVisibility", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentVisibilityList)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentVisibilityList))); } /// /// Sets the initials image for an accountless signer. Updates the initials image for a signer that does not have a DocuSign account. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K. For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// public void UpdateRecipientInitialsImage(string accountId, string envelopeId, string recipientId) { UpdateRecipientInitialsImageWithHttpInfo(accountId, envelopeId, recipientId); } /// /// Sets the initials image for an accountless signer. Updates the initials image for a signer that does not have a DocuSign account. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K. For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// ApiResponse of Object(void) public ApiResponse UpdateRecipientInitialsImageWithHttpInfo(string accountId, string envelopeId, string recipientId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateRecipientInitialsImage"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateRecipientInitialsImage"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->UpdateRecipientInitialsImage"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/initials_image"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "image/gif" }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateRecipientInitialsImage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Sets the initials image for an accountless signer. Updates the initials image for a signer that does not have a DocuSign account. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K. For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of void public async System.Threading.Tasks.Task UpdateRecipientInitialsImageAsync(string accountId, string envelopeId, string recipientId) { await UpdateRecipientInitialsImageAsyncWithHttpInfo(accountId, envelopeId, recipientId); } /// /// Sets the initials image for an accountless signer. Updates the initials image for a signer that does not have a DocuSign account. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K. For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of ApiResponse public async System.Threading.Tasks.Task> UpdateRecipientInitialsImageAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateRecipientInitialsImage"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateRecipientInitialsImage"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->UpdateRecipientInitialsImage"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/initials_image"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "image/gif" }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateRecipientInitialsImage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Sets the signature image for an accountless signer. Updates the signature image for an accountless signer. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K. For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// public void UpdateRecipientSignatureImage(string accountId, string envelopeId, string recipientId) { UpdateRecipientSignatureImageWithHttpInfo(accountId, envelopeId, recipientId); } /// /// Sets the signature image for an accountless signer. Updates the signature image for an accountless signer. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K. For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// ApiResponse of Object(void) public ApiResponse UpdateRecipientSignatureImageWithHttpInfo(string accountId, string envelopeId, string recipientId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateRecipientSignatureImage"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateRecipientSignatureImage"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->UpdateRecipientSignatureImage"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/signature_image"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "image/gif" }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateRecipientSignatureImage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Sets the signature image for an accountless signer. Updates the signature image for an accountless signer. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K. For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of void public async System.Threading.Tasks.Task UpdateRecipientSignatureImageAsync(string accountId, string envelopeId, string recipientId) { await UpdateRecipientSignatureImageAsyncWithHttpInfo(accountId, envelopeId, recipientId); } /// /// Sets the signature image for an accountless signer. Updates the signature image for an accountless signer. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K. For the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the `CanSendEnvelope` property set to **true** and the `ExpressSendOnly` property in `SendingUser` structure must be set to **false**. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// Task of ApiResponse public async System.Threading.Tasks.Task> UpdateRecipientSignatureImageAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateRecipientSignatureImage"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateRecipientSignatureImage"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->UpdateRecipientSignatureImage"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/signature_image"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "image/gif" }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateRecipientSignatureImage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Updates recipients in a draft envelope or corrects recipient information for an in process envelope. Updates recipients in a draft envelope or corrects recipient information for an in process envelope. For draft envelopes, you can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`. Once an envelope has been sent, you can only edit: `email`, `userName`, `signerName`, `routingOrder`, `faxNumber`, and `deliveryMethod`. You can also select to resend an envelope by using the `resend_envelope` option. If you send information for a recipient that does not already exist in a draft envelope, the recipient is added to the envelope (similar to the POST). /// public class UpdateRecipientsOptions { /// public string combineSameOrderRecipients {get; set;} /// public string offlineSigning {get; set;} /// When set to **true**, resends the envelope if the new recipient's routing order is before or the same as the envelope's next recipient. public string resendEnvelope {get; set;} } /// /// Updates recipients in a draft envelope or corrects recipient information for an in process envelope. Updates recipients in a draft envelope or corrects recipient information for an in process envelope. For draft envelopes, you can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`. Once an envelope has been sent, you can only edit: `email`, `userName`, `signerName`, `routingOrder`, `faxNumber`, and `deliveryMethod`. You can also select to resend an envelope by using the `resend_envelope` option. If you send information for a recipient that does not already exist in a draft envelope, the recipient is added to the envelope (similar to the POST). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// RecipientsUpdateSummary public RecipientsUpdateSummary UpdateRecipients(string accountId, string envelopeId, Recipients recipients = null, EnvelopesApi.UpdateRecipientsOptions options = null) { ApiResponse localVarResponse = UpdateRecipientsWithHttpInfo(accountId, envelopeId, recipients, options); return localVarResponse.Data; } /// /// Updates recipients in a draft envelope or corrects recipient information for an in process envelope. Updates recipients in a draft envelope or corrects recipient information for an in process envelope. For draft envelopes, you can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`. Once an envelope has been sent, you can only edit: `email`, `userName`, `signerName`, `routingOrder`, `faxNumber`, and `deliveryMethod`. You can also select to resend an envelope by using the `resend_envelope` option. If you send information for a recipient that does not already exist in a draft envelope, the recipient is added to the envelope (similar to the POST). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// ApiResponse of RecipientsUpdateSummary public ApiResponse UpdateRecipientsWithHttpInfo(string accountId, string envelopeId, Recipients recipients = null, EnvelopesApi.UpdateRecipientsOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateRecipients"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateRecipients"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.combineSameOrderRecipients != null) localVarQueryParams.Add("combine_same_order_recipients", this.ApiClient.ParameterToString(options.combineSameOrderRecipients)); // query parameter if (options.offlineSigning != null) localVarQueryParams.Add("offline_signing", this.ApiClient.ParameterToString(options.offlineSigning)); // query parameter if (options.resendEnvelope != null) localVarQueryParams.Add("resend_envelope", this.ApiClient.ParameterToString(options.resendEnvelope)); // query parameter } if (recipients != null && recipients.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(recipients); // http body (model) parameter } else { localVarPostBody = recipients; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateRecipients", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (RecipientsUpdateSummary)this.ApiClient.Deserialize(localVarResponse, typeof(RecipientsUpdateSummary))); } /// /// Updates recipients in a draft envelope or corrects recipient information for an in process envelope. Updates recipients in a draft envelope or corrects recipient information for an in process envelope. For draft envelopes, you can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`. Once an envelope has been sent, you can only edit: `email`, `userName`, `signerName`, `routingOrder`, `faxNumber`, and `deliveryMethod`. You can also select to resend an envelope by using the `resend_envelope` option. If you send information for a recipient that does not already exist in a draft envelope, the recipient is added to the envelope (similar to the POST). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of RecipientsUpdateSummary public async System.Threading.Tasks.Task UpdateRecipientsAsync(string accountId, string envelopeId, Recipients recipients = null, EnvelopesApi.UpdateRecipientsOptions options = null) { ApiResponse localVarResponse = await UpdateRecipientsAsyncWithHttpInfo(accountId, envelopeId, recipients, options); return localVarResponse.Data; } /// /// Updates recipients in a draft envelope or corrects recipient information for an in process envelope. Updates recipients in a draft envelope or corrects recipient information for an in process envelope. For draft envelopes, you can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`. Once an envelope has been sent, you can only edit: `email`, `userName`, `signerName`, `routingOrder`, `faxNumber`, and `deliveryMethod`. You can also select to resend an envelope by using the `resend_envelope` option. If you send information for a recipient that does not already exist in a draft envelope, the recipient is added to the envelope (similar to the POST). /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Options for modifying the behavior of the function. /// Task of ApiResponse (RecipientsUpdateSummary) public async System.Threading.Tasks.Task> UpdateRecipientsAsyncWithHttpInfo(string accountId, string envelopeId, Recipients recipients = null, EnvelopesApi.UpdateRecipientsOptions options = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateRecipients"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateRecipients"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (options != null) { if (options.combineSameOrderRecipients != null) localVarQueryParams.Add("combine_same_order_recipients", this.ApiClient.ParameterToString(options.combineSameOrderRecipients)); // query parameter if (options.offlineSigning != null) localVarQueryParams.Add("offline_signing", this.ApiClient.ParameterToString(options.offlineSigning)); // query parameter if (options.resendEnvelope != null) localVarQueryParams.Add("resend_envelope", this.ApiClient.ParameterToString(options.resendEnvelope)); // query parameter } if (recipients != null && recipients.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(recipients); // http body (model) parameter } else { localVarPostBody = recipients; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateRecipients", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (RecipientsUpdateSummary)this.ApiClient.Deserialize(localVarResponse, typeof(RecipientsUpdateSummary))); } /// /// Updates document visibility for the recipients This method updates document visibility for one or more recipients based on the `recipientId` and `visible` values that you include in the request body. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// DocumentVisibilityList public DocumentVisibilityList UpdateRecipientsDocumentVisibility(string accountId, string envelopeId, DocumentVisibilityList documentVisibilityList = null) { ApiResponse localVarResponse = UpdateRecipientsDocumentVisibilityWithHttpInfo(accountId, envelopeId, documentVisibilityList); return localVarResponse.Data; } /// /// Updates document visibility for the recipients This method updates document visibility for one or more recipients based on the `recipientId` and `visible` values that you include in the request body. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// ApiResponse of DocumentVisibilityList public ApiResponse UpdateRecipientsDocumentVisibilityWithHttpInfo(string accountId, string envelopeId, DocumentVisibilityList documentVisibilityList = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateRecipientsDocumentVisibility"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateRecipientsDocumentVisibility"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/document_visibility"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentVisibilityList != null && documentVisibilityList.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentVisibilityList); // http body (model) parameter } else { localVarPostBody = documentVisibilityList; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateRecipientsDocumentVisibility", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentVisibilityList)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentVisibilityList))); } /// /// Updates document visibility for the recipients This method updates document visibility for one or more recipients based on the `recipientId` and `visible` values that you include in the request body. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of DocumentVisibilityList public async System.Threading.Tasks.Task UpdateRecipientsDocumentVisibilityAsync(string accountId, string envelopeId, DocumentVisibilityList documentVisibilityList = null) { ApiResponse localVarResponse = await UpdateRecipientsDocumentVisibilityAsyncWithHttpInfo(accountId, envelopeId, documentVisibilityList); return localVarResponse.Data; } /// /// Updates document visibility for the recipients This method updates document visibility for one or more recipients based on the `recipientId` and `visible` values that you include in the request body. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// (optional) /// Task of ApiResponse (DocumentVisibilityList) public async System.Threading.Tasks.Task> UpdateRecipientsDocumentVisibilityAsyncWithHttpInfo(string accountId, string envelopeId, DocumentVisibilityList documentVisibilityList = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateRecipientsDocumentVisibility"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateRecipientsDocumentVisibility"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/document_visibility"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (documentVisibilityList != null && documentVisibilityList.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(documentVisibilityList); // http body (model) parameter } else { localVarPostBody = documentVisibilityList; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateRecipientsDocumentVisibility", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DocumentVisibilityList)this.ApiClient.Deserialize(localVarResponse, typeof(DocumentVisibilityList))); } /// /// Updates the tabs for a recipient. Updates one or more tabs for a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Tabs public Tabs UpdateTabs(string accountId, string envelopeId, string recipientId, Tabs tabs = null) { ApiResponse localVarResponse = UpdateTabsWithHttpInfo(accountId, envelopeId, recipientId, tabs); return localVarResponse.Data; } /// /// Updates the tabs for a recipient. Updates one or more tabs for a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// ApiResponse of Tabs public ApiResponse UpdateTabsWithHttpInfo(string accountId, string envelopeId, string recipientId, Tabs tabs = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateTabs"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->UpdateTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (tabs != null && tabs.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(tabs); // http body (model) parameter } else { localVarPostBody = tabs; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Updates the tabs for a recipient. Updates one or more tabs for a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of Tabs public async System.Threading.Tasks.Task UpdateTabsAsync(string accountId, string envelopeId, string recipientId, Tabs tabs = null) { ApiResponse localVarResponse = await UpdateTabsAsyncWithHttpInfo(accountId, envelopeId, recipientId, tabs); return localVarResponse.Data; } /// /// Updates the tabs for a recipient. Updates one or more tabs for a recipient in a draft envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of ApiResponse (Tabs) public async System.Threading.Tasks.Task> UpdateTabsAsyncWithHttpInfo(string accountId, string envelopeId, string recipientId, Tabs tabs = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateTabs"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateTabs"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->UpdateTabs"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (tabs != null && tabs.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(tabs); // http body (model) parameter } else { localVarPostBody = tabs; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateTabs", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Tabs)this.ApiClient.Deserialize(localVarResponse, typeof(Tabs))); } /// /// Update encrypted tabs for envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// public void UpdateTabsBlob(string accountId, string envelopeId) { UpdateTabsBlobWithHttpInfo(accountId, envelopeId); } /// /// Update encrypted tabs for envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// ApiResponse of Object(void) public ApiResponse UpdateTabsBlobWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateTabsBlob"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateTabsBlob"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/tabs_blob"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateTabsBlob", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Update encrypted tabs for envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of void public async System.Threading.Tasks.Task UpdateTabsBlobAsync(string accountId, string envelopeId) { await UpdateTabsBlobAsyncWithHttpInfo(accountId, envelopeId); } /// /// Update encrypted tabs for envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The envelopeId Guid of the envelope being accessed. /// Task of ApiResponse public async System.Threading.Tasks.Task> UpdateTabsBlobAsyncWithHttpInfo(string accountId, string envelopeId) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateTabsBlob"); // verify the required parameter 'envelopeId' is set if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling EnvelopesApi->UpdateTabsBlob"); var localVarPath = "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/tabs_blob"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (envelopeId != null) localVarPathParams.Add("envelopeId", this.ApiClient.ParameterToString(envelopeId)); // path parameter // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateTabsBlob", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// Updates the delayed routing rules for a template's workflow step definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// (optional) /// DelayedRouting public DelayedRouting UpdateTemplateDelayedRoutingDefinition(string accountId, string templateId, string workflowStepId, DelayedRouting delayedRouting = null) { ApiResponse localVarResponse = UpdateTemplateDelayedRoutingDefinitionWithHttpInfo(accountId, templateId, workflowStepId, delayedRouting); return localVarResponse.Data; } /// /// Updates the delayed routing rules for a template's workflow step definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// (optional) /// ApiResponse of DelayedRouting public ApiResponse UpdateTemplateDelayedRoutingDefinitionWithHttpInfo(string accountId, string templateId, string workflowStepId, DelayedRouting delayedRouting = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateTemplateDelayedRoutingDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->UpdateTemplateDelayedRoutingDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->UpdateTemplateDelayedRoutingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/steps/{workflowStepId}/delayedRouting"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter if (delayedRouting != null && delayedRouting.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(delayedRouting); // http body (model) parameter } else { localVarPostBody = delayedRouting; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateTemplateDelayedRoutingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DelayedRouting)this.ApiClient.Deserialize(localVarResponse, typeof(DelayedRouting))); } /// /// Updates the delayed routing rules for a template's workflow step definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// (optional) /// Task of DelayedRouting public async System.Threading.Tasks.Task UpdateTemplateDelayedRoutingDefinitionAsync(string accountId, string templateId, string workflowStepId, DelayedRouting delayedRouting = null) { ApiResponse localVarResponse = await UpdateTemplateDelayedRoutingDefinitionAsyncWithHttpInfo(accountId, templateId, workflowStepId, delayedRouting); return localVarResponse.Data; } /// /// Updates the delayed routing rules for a template's workflow step definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// (optional) /// Task of ApiResponse (DelayedRouting) public async System.Threading.Tasks.Task> UpdateTemplateDelayedRoutingDefinitionAsyncWithHttpInfo(string accountId, string templateId, string workflowStepId, DelayedRouting delayedRouting = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateTemplateDelayedRoutingDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->UpdateTemplateDelayedRoutingDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->UpdateTemplateDelayedRoutingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/steps/{workflowStepId}/delayedRouting"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter if (delayedRouting != null && delayedRouting.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(delayedRouting); // http body (model) parameter } else { localVarPostBody = delayedRouting; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateTemplateDelayedRoutingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (DelayedRouting)this.ApiClient.Deserialize(localVarResponse, typeof(DelayedRouting))); } /// /// Updates document visibility for the recipients This method updates the document visibility for a template recipient. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// The ID of the recipient being accessed. /// (optional) /// TemplateDocumentVisibilityList public TemplateDocumentVisibilityList UpdateTemplateRecipientDocumentVisibility(string accountId, string templateId, string recipientId, TemplateDocumentVisibilityList templateDocumentVisibilityList = null) { ApiResponse localVarResponse = UpdateTemplateRecipientDocumentVisibilityWithHttpInfo(accountId, templateId, recipientId, templateDocumentVisibilityList); return localVarResponse.Data; } /// /// Updates document visibility for the recipients This method updates the document visibility for a template recipient. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// The ID of the recipient being accessed. /// (optional) /// ApiResponse of TemplateDocumentVisibilityList public ApiResponse UpdateTemplateRecipientDocumentVisibilityWithHttpInfo(string accountId, string templateId, string recipientId, TemplateDocumentVisibilityList templateDocumentVisibilityList = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateTemplateRecipientDocumentVisibility"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->UpdateTemplateRecipientDocumentVisibility"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->UpdateTemplateRecipientDocumentVisibility"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/document_visibility"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (templateDocumentVisibilityList != null && templateDocumentVisibilityList.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(templateDocumentVisibilityList); // http body (model) parameter } else { localVarPostBody = templateDocumentVisibilityList; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateTemplateRecipientDocumentVisibility", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (TemplateDocumentVisibilityList)this.ApiClient.Deserialize(localVarResponse, typeof(TemplateDocumentVisibilityList))); } /// /// Updates document visibility for the recipients This method updates the document visibility for a template recipient. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of TemplateDocumentVisibilityList public async System.Threading.Tasks.Task UpdateTemplateRecipientDocumentVisibilityAsync(string accountId, string templateId, string recipientId, TemplateDocumentVisibilityList templateDocumentVisibilityList = null) { ApiResponse localVarResponse = await UpdateTemplateRecipientDocumentVisibilityAsyncWithHttpInfo(accountId, templateId, recipientId, templateDocumentVisibilityList); return localVarResponse.Data; } /// /// Updates document visibility for the recipients This method updates the document visibility for a template recipient. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// The ID of the recipient being accessed. /// (optional) /// Task of ApiResponse (TemplateDocumentVisibilityList) public async System.Threading.Tasks.Task> UpdateTemplateRecipientDocumentVisibilityAsyncWithHttpInfo(string accountId, string templateId, string recipientId, TemplateDocumentVisibilityList templateDocumentVisibilityList = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateTemplateRecipientDocumentVisibility"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->UpdateTemplateRecipientDocumentVisibility"); // verify the required parameter 'recipientId' is set if (recipientId == null) throw new ApiException(400, "Missing required parameter 'recipientId' when calling EnvelopesApi->UpdateTemplateRecipientDocumentVisibility"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/document_visibility"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (recipientId != null) localVarPathParams.Add("recipientId", this.ApiClient.ParameterToString(recipientId)); // path parameter if (templateDocumentVisibilityList != null && templateDocumentVisibilityList.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(templateDocumentVisibilityList); // http body (model) parameter } else { localVarPostBody = templateDocumentVisibilityList; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateTemplateRecipientDocumentVisibility", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (TemplateDocumentVisibilityList)this.ApiClient.Deserialize(localVarResponse, typeof(TemplateDocumentVisibilityList))); } /// /// Updates document visibility for the recipients This method updates document visibility for one or more template recipients based on the `recipientId` and `visible` values that you include in the request body. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// TemplateDocumentVisibilityList public TemplateDocumentVisibilityList UpdateTemplateRecipientsDocumentVisibility(string accountId, string templateId, TemplateDocumentVisibilityList templateDocumentVisibilityList = null) { ApiResponse localVarResponse = UpdateTemplateRecipientsDocumentVisibilityWithHttpInfo(accountId, templateId, templateDocumentVisibilityList); return localVarResponse.Data; } /// /// Updates document visibility for the recipients This method updates document visibility for one or more template recipients based on the `recipientId` and `visible` values that you include in the request body. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// ApiResponse of TemplateDocumentVisibilityList public ApiResponse UpdateTemplateRecipientsDocumentVisibilityWithHttpInfo(string accountId, string templateId, TemplateDocumentVisibilityList templateDocumentVisibilityList = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateTemplateRecipientsDocumentVisibility"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->UpdateTemplateRecipientsDocumentVisibility"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/recipients/document_visibility"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (templateDocumentVisibilityList != null && templateDocumentVisibilityList.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(templateDocumentVisibilityList); // http body (model) parameter } else { localVarPostBody = templateDocumentVisibilityList; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateTemplateRecipientsDocumentVisibility", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (TemplateDocumentVisibilityList)this.ApiClient.Deserialize(localVarResponse, typeof(TemplateDocumentVisibilityList))); } /// /// Updates document visibility for the recipients This method updates document visibility for one or more template recipients based on the `recipientId` and `visible` values that you include in the request body. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Task of TemplateDocumentVisibilityList public async System.Threading.Tasks.Task UpdateTemplateRecipientsDocumentVisibilityAsync(string accountId, string templateId, TemplateDocumentVisibilityList templateDocumentVisibilityList = null) { ApiResponse localVarResponse = await UpdateTemplateRecipientsDocumentVisibilityAsyncWithHttpInfo(accountId, templateId, templateDocumentVisibilityList); return localVarResponse.Data; } /// /// Updates document visibility for the recipients This method updates document visibility for one or more template recipients based on the `recipientId` and `visible` values that you include in the request body. **Note:** A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Task of ApiResponse (TemplateDocumentVisibilityList) public async System.Threading.Tasks.Task> UpdateTemplateRecipientsDocumentVisibilityAsyncWithHttpInfo(string accountId, string templateId, TemplateDocumentVisibilityList templateDocumentVisibilityList = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateTemplateRecipientsDocumentVisibility"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->UpdateTemplateRecipientsDocumentVisibility"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/recipients/document_visibility"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (templateDocumentVisibilityList != null && templateDocumentVisibilityList.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(templateDocumentVisibilityList); // http body (model) parameter } else { localVarPostBody = templateDocumentVisibilityList; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateTemplateRecipientsDocumentVisibility", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (TemplateDocumentVisibilityList)this.ApiClient.Deserialize(localVarResponse, typeof(TemplateDocumentVisibilityList))); } /// /// Updates the scheduled sending rules for a template's workflow definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// ScheduledSending public ScheduledSending UpdateTemplateScheduledSendingDefinition(string accountId, string templateId, ScheduledSending scheduledSending = null) { ApiResponse localVarResponse = UpdateTemplateScheduledSendingDefinitionWithHttpInfo(accountId, templateId, scheduledSending); return localVarResponse.Data; } /// /// Updates the scheduled sending rules for a template's workflow definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// ApiResponse of ScheduledSending public ApiResponse UpdateTemplateScheduledSendingDefinitionWithHttpInfo(string accountId, string templateId, ScheduledSending scheduledSending = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateTemplateScheduledSendingDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->UpdateTemplateScheduledSendingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/scheduledSending"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (scheduledSending != null && scheduledSending.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(scheduledSending); // http body (model) parameter } else { localVarPostBody = scheduledSending; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateTemplateScheduledSendingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ScheduledSending)this.ApiClient.Deserialize(localVarResponse, typeof(ScheduledSending))); } /// /// Updates the scheduled sending rules for a template's workflow definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Task of ScheduledSending public async System.Threading.Tasks.Task UpdateTemplateScheduledSendingDefinitionAsync(string accountId, string templateId, ScheduledSending scheduledSending = null) { ApiResponse localVarResponse = await UpdateTemplateScheduledSendingDefinitionAsyncWithHttpInfo(accountId, templateId, scheduledSending); return localVarResponse.Data; } /// /// Updates the scheduled sending rules for a template's workflow definition. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Task of ApiResponse (ScheduledSending) public async System.Threading.Tasks.Task> UpdateTemplateScheduledSendingDefinitionAsyncWithHttpInfo(string accountId, string templateId, ScheduledSending scheduledSending = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateTemplateScheduledSendingDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->UpdateTemplateScheduledSendingDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/scheduledSending"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (scheduledSending != null && scheduledSending.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(scheduledSending); // http body (model) parameter } else { localVarPostBody = scheduledSending; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateTemplateScheduledSendingDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (ScheduledSending)this.ApiClient.Deserialize(localVarResponse, typeof(ScheduledSending))); } /// /// Updates the workflow definition for a template. Updates the specified template's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Workflow public Workflow UpdateTemplateWorkflowDefinition(string accountId, string templateId, Workflow workflow = null) { ApiResponse localVarResponse = UpdateTemplateWorkflowDefinitionWithHttpInfo(accountId, templateId, workflow); return localVarResponse.Data; } /// /// Updates the workflow definition for a template. Updates the specified template's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// ApiResponse of Workflow public ApiResponse UpdateTemplateWorkflowDefinitionWithHttpInfo(string accountId, string templateId, Workflow workflow = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateTemplateWorkflowDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->UpdateTemplateWorkflowDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (workflow != null && workflow.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(workflow); // http body (model) parameter } else { localVarPostBody = workflow; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateTemplateWorkflowDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Workflow)this.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); } /// /// Updates the workflow definition for a template. Updates the specified template's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Task of Workflow public async System.Threading.Tasks.Task UpdateTemplateWorkflowDefinitionAsync(string accountId, string templateId, Workflow workflow = null) { ApiResponse localVarResponse = await UpdateTemplateWorkflowDefinitionAsyncWithHttpInfo(accountId, templateId, workflow); return localVarResponse.Data; } /// /// Updates the workflow definition for a template. Updates the specified template's workflow definition if it has one. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// (optional) /// Task of ApiResponse (Workflow) public async System.Threading.Tasks.Task> UpdateTemplateWorkflowDefinitionAsyncWithHttpInfo(string accountId, string templateId, Workflow workflow = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateTemplateWorkflowDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->UpdateTemplateWorkflowDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (workflow != null && workflow.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(workflow); // http body (model) parameter } else { localVarPostBody = workflow; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateTemplateWorkflowDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Workflow)this.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); } /// /// Updates the template workflow step definition for an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// (optional) /// WorkflowStep public WorkflowStep UpdateTemplateWorkflowStepDefinition(string accountId, string templateId, string workflowStepId, WorkflowStep workflowStep = null) { ApiResponse localVarResponse = UpdateTemplateWorkflowStepDefinitionWithHttpInfo(accountId, templateId, workflowStepId, workflowStep); return localVarResponse.Data; } /// /// Updates the template workflow step definition for an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// (optional) /// ApiResponse of WorkflowStep public ApiResponse UpdateTemplateWorkflowStepDefinitionWithHttpInfo(string accountId, string templateId, string workflowStepId, WorkflowStep workflowStep = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateTemplateWorkflowStepDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->UpdateTemplateWorkflowStepDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->UpdateTemplateWorkflowStepDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/steps/{workflowStepId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter if (workflowStep != null && workflowStep.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(workflowStep); // http body (model) parameter } else { localVarPostBody = workflowStep; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = this.ApiClient.CallApi(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateTemplateWorkflowStepDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (WorkflowStep)this.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStep))); } /// /// Updates the template workflow step definition for an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// (optional) /// Task of WorkflowStep public async System.Threading.Tasks.Task UpdateTemplateWorkflowStepDefinitionAsync(string accountId, string templateId, string workflowStepId, WorkflowStep workflowStep = null) { ApiResponse localVarResponse = await UpdateTemplateWorkflowStepDefinitionAsyncWithHttpInfo(accountId, templateId, workflowStepId, workflowStep); return localVarResponse.Data; } /// /// Updates the template workflow step definition for an envelope. /// /// Thrown when fails to make API call /// The external account number (int) or account ID Guid. /// The ID of the template being accessed. /// /// (optional) /// Task of ApiResponse (WorkflowStep) public async System.Threading.Tasks.Task> UpdateTemplateWorkflowStepDefinitionAsyncWithHttpInfo(string accountId, string templateId, string workflowStepId, WorkflowStep workflowStep = null) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling EnvelopesApi->UpdateTemplateWorkflowStepDefinition"); // verify the required parameter 'templateId' is set if (templateId == null) throw new ApiException(400, "Missing required parameter 'templateId' when calling EnvelopesApi->UpdateTemplateWorkflowStepDefinition"); // verify the required parameter 'workflowStepId' is set if (workflowStepId == null) throw new ApiException(400, "Missing required parameter 'workflowStepId' when calling EnvelopesApi->UpdateTemplateWorkflowStepDefinition"); var localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/workflow/steps/{workflowStepId}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(this.ApiClient.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new List(); Object localVarPostBody = null; String localVarHttpContentDisposition = string.Empty; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter if (templateId != null) localVarPathParams.Add("templateId", this.ApiClient.ParameterToString(templateId)); // path parameter if (workflowStepId != null) localVarPathParams.Add("workflowStepId", this.ApiClient.ParameterToString(workflowStepId)); // path parameter if (workflowStep != null && workflowStep.GetType() != typeof(byte[])) { localVarPostBody = this.ApiClient.Serialize(workflowStep); // http body (model) parameter } else { localVarPostBody = workflowStep; // byte array } // authentication (docusignAccessCode) required // oauth required if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken; } // make the HTTP request DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, new HttpMethod("PUT"), localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition); DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdateTemplateWorkflowStepDefinition", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (WorkflowStep)this.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStep))); } } }