/** * Dropsigner *

Authentication

In order to call this APIs, you will need an API key. Set the API key in the header X-Api-Key:

X-Api-Key: your-app|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

HTTP Codes

The APIs will return the following HTTP codes:

Code Description
200 (OK) Request processed successfully. The response is different for each API, please refer to the operation's documentation
400 (Bad Request) Syntax error. For instance, when a required field was not provided
401 (Unauthorized) API key not provided or invalid
403 (Forbidden) API key is valid, but the application has insufficient permissions to complete the requested operation
422 (Unprocessable Entity) API error. The response is as defined in ErrorModel

Error Codes

Some of the error codes returned in a 422 response are provided bellow*:

*The codes shown above are the main error codes. Nonetheless, this list is not comprehensive. New codes may be added anytime without previous warning.


Webhooks

It is recomended to subscribe to Webhook events instead of polling APIs. To do so, enable webhooks and register an URL that will receive a POST request whenever one of the events bellow occur.

All requests have the format described in Webhooks.WebhookModel. The data field varies according to the webhook event type:

Event type Description Payload
DocumentSigned Triggered when a document is signed. Webhooks.DocumentSignedModel
DocumentApproved Triggered when a document is approved. Webhooks.DocumentApprovedModel
DocumentRefused Triggered when a document is refused. Webhooks.DocumentRefusedModel
DocumentConcluded Triggered when the flow of a document is concluded. Webhooks.DocumentConcludedModel
DocumentCanceled Triggered when the document is canceled. Webhooks.DocumentCanceledModel
DocumentExpired (v1.33.0) Triggered when the document is expired. Webhooks.DocumentExpiredModel
DocumentsCreated (v1.50.0) Triggered when one or more documents are created. Webhooks.DocumentsCreatedModel
DocumentsDeleted (v1.78.0) Triggered when one or more documents are deleted. Webhooks.DocumentsDeletedModel

To register your application URL and enable Webhooks, access the integrations section in your organization's details page.

* * OpenAPI spec version: 2.6.0 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ import { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../configuration'; import { RequestArgs, BaseAPI } from '../base'; import { BatchItemResultModel } from '../models'; import { DocumentDownloadTypes } from '../models'; import { DocumentFilterStatus } from '../models'; import { DocumentQueryTypes } from '../models'; import { DocumentTicketType } from '../models'; import { DocumentTypes } from '../models'; import { DocumentsActionUrlRequest } from '../models'; import { DocumentsActionUrlResponse } from '../models'; import { DocumentsCancelDocumentRequest } from '../models'; import { DocumentsCreateDocumentRequest } from '../models'; import { DocumentsCreateDocumentResult } from '../models'; import { DocumentsDocumentAddVersionRequest } from '../models'; import { DocumentsDocumentContentModel } from '../models'; import { DocumentsDocumentFlowEditRequest } from '../models'; import { DocumentsDocumentModel } from '../models'; import { DocumentsDocumentNotifiedEmailsEditRequest } from '../models'; import { DocumentsDocumentSignaturesInfoModel } from '../models'; import { DocumentsEnvelopeAddVersionRequest } from '../models'; import { DocumentsMoveDocumentBatchRequest } from '../models'; import { DocumentsMoveDocumentRequest } from '../models'; import { FlowActionsDocumentFlowEditResponse } from '../models'; import { FolderType } from '../models'; import { PaginatedSearchResponseDocumentsDocumentListModel } from '../models'; import { PaginationOrders } from '../models'; import { ParticipantQueryTypes } from '../models'; import { RefusalRefusalRequest } from '../models'; import { SignatureSignaturesInfoRequest } from '../models'; import { SignerModel } from '../models'; import { TicketModel } from '../models'; /** * DocumentsApi - axios parameter creator * @export */ export declare const DocumentsApiAxiosParamCreator: (configuration?: Configuration) => { /** * * @summary Moves a batch of documents to a folder. * @param {DocumentsMoveDocumentBatchRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsBatchFolderPost: (body?: DocumentsMoveDocumentBatchRequest, options?: AxiosRequestConfig) => Promise; /** * You may filter the documents by folder and document type. * @summary Retrieves the documents of the organization paginating the response. * @param {boolean} [isConcluded] (DEPRECATED) Please use \"Status\" parameter instead. Set to true to list concluded documents, false to list pending documents. * @param {DocumentFilterStatus} [status] Filters by document status. Will override the \"IsConcluded\" property. * @param {string} [folderId] * @param {FolderType} [folderType] * @param {DocumentTypes} [documentType] * @param {boolean} [filterByDocumentType] True if the documents should be filtered by type, use documentType to specify the document type. If you want to filter only documents without a type, set this parameter to true and the documentType to null. * @param {boolean} [filterByPendingSignature] True if documents should be filtered only for those that have FlowAction of the type Signer or SignRule * @param {DocumentQueryTypes} [queryType] * @param {string} [participantQ] Query to filter by participant * @param {ParticipantQueryTypes} [participantQueryType] * @param {string} [tags] Label/value pairs are separated by \"|\" (optional) and Tags separated by \",\". Only the first 10 pairs will be considered. To search by tag value only, do not use the \"|\". * @param {boolean} [isDeleted] Returns deleted documents that had the specified document status when deleted. * @param {string} [Q] Query to filter items. * @param {number} [limit] Number of items to return. * @param {number} [offset] The offset of the searched page (starting with 0). * @param {PaginationOrders} [order] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsGet: (isConcluded?: boolean, status?: DocumentFilterStatus, folderId?: string, folderType?: FolderType, documentType?: DocumentTypes, filterByDocumentType?: boolean, filterByPendingSignature?: boolean, queryType?: DocumentQueryTypes, participantQ?: string, participantQueryType?: ParticipantQueryTypes, tags?: string, isDeleted?: boolean, Q?: string, limit?: number, offset?: number, order?: PaginationOrders, options?: AxiosRequestConfig) => Promise; /** * This API will return an URL that allows an user to sign or approve the document without having to wait to receive an email notification. If the document has multiple pending actions, this API will return the URL of the first pending action for the matched user. After the action has been completed, you may call this API again to retrieve the URL for the next action (if any). Please note that using the URL returned will be recorded in the evidences of the action as an Application Authentication. * @summary Retrieves an URL to redirect the user to the first pending action of the document. * @param {string} id Document Id * @param {DocumentsActionUrlRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdActionUrlPost: (id: string, body?: DocumentsActionUrlRequest, options?: AxiosRequestConfig) => Promise; /** * CAUTION: This action cannot be reverted. * @summary Cancels the document by providing a reason for the cancellation. * @param {string} id * @param {DocumentsCancelDocumentRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdCancellationPost: (id: string, body?: DocumentsCancelDocumentRequest, options?: AxiosRequestConfig) => Promise; /** * * @summary Downloads a specific version type of the document encoding the bytes in Base 64 format. * @param {string} id Document id * @param {DocumentDownloadTypes} [type] The version type to download * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdContentB64Get: (id: string, type?: DocumentDownloadTypes, options?: AxiosRequestConfig) => Promise; /** * * @summary Downloads a specific version type of the document. * @param {string} id Document id * @param {DocumentDownloadTypes} [type] The version type to download * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdContentGet: (id: string, type?: DocumentDownloadTypes, options?: AxiosRequestConfig) => Promise; /** * * @summary Deletes a specific document using it's id. * @param {string} id Document id * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdDelete: (id: string, options?: AxiosRequestConfig) => Promise; /** * The flow of the document will be restarted. * @summary Adds a new version for an envelope. * @param {string} id * @param {DocumentsEnvelopeAddVersionRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdEnvelopeVersionsPost: (id: string, body?: DocumentsEnvelopeAddVersionRequest, options?: AxiosRequestConfig) => Promise; /** * * @summary Updates the document's flow. * @param {string} id Id of the document * @param {DocumentsDocumentFlowEditRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdFlowPost: (id: string, body?: DocumentsDocumentFlowEditRequest, options?: AxiosRequestConfig) => Promise; /** * * @summary Moves a document to a folder. * @param {string} id * @param {DocumentsMoveDocumentRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdFolderPost: (id: string, body?: DocumentsMoveDocumentRequest, options?: AxiosRequestConfig) => Promise; /** * * @summary Retrieves the document's details. * @param {string} id Document id * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdGet: (id: string, options?: AxiosRequestConfig) => Promise; /** * The notified emails are the ones that will be notified after the document is concluded. * @summary Updates the document's notified emails * @param {string} id Id of the document * @param {DocumentsDocumentNotifiedEmailsEditRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdNotifiedEmailsPut: (id: string, body?: DocumentsDocumentNotifiedEmailsEditRequest, options?: AxiosRequestConfig) => Promise; /** * The document's flow will pause and can only be resumed by adding a new version of the document (see Add Version API). * @summary Refuses a document by providing a reason for the refusal. * @param {string} id * @param {RefusalRefusalRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdRefusalPost: (id: string, body?: RefusalRefusalRequest, options?: AxiosRequestConfig) => Promise; /** * This will perform the same validations as verifying the document signatures using the verification code. * @summary Retrieves the details of the document's signatures. * @param {string} id The Id of the document * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdSignaturesDetailsGet: (id: string, options?: AxiosRequestConfig) => Promise; /** * The URL does not require authentication and will be available for 1 hour.
  • Original: the original file provided when the document was created.
  • OriginalWithMarks: the original file with all marks added (for example when an user approves the document and includes its signature image).
  • PrinterFriendlyVersion: if the original document is PDF, the version with marks and a appended signature manifest, otherwise a PDF file with the signature manifest.
  • Signatures: if the original document is PDF, the signed PDF file, otherwise the .p7s file.
* @summary Generates a URL (ticket) to download a specific version type of the document. * @param {string} id Document id * @param {DocumentTicketType} [type] The version type to download * @param {boolean} [preview] If true, when downloading the document, the response will not include the name of the file (useful when embedding the document inside a web page for previewing) * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdTicketGet: (id: string, type?: DocumentTicketType, preview?: boolean, options?: AxiosRequestConfig) => Promise; /** * The flow of the document will be restarted. If the document was created as an envelope, please use the Add Envelope Version API * @summary Adds a new version for the document. * @param {string} id * @param {DocumentsDocumentAddVersionRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdVersionsPost: (id: string, body?: DocumentsDocumentAddVersionRequest, options?: AxiosRequestConfig) => Promise; /** * * @summary Validates each signature in a document using the verification code * @param {string} key The verification code presented in the document * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsKeysKeySignaturesGet: (key: string, options?: AxiosRequestConfig) => Promise; /** * Before calling this API you need to upload the file(s) using the Upload API or the Upload Bytes API. When creating a big batch of documents, it is recommended to send multiple requests instead of one big request. For instance, if you want to create 100 documents, send 10 requests of 10 documents. In this case it is recommended to use the disablePendingActionNotifications option and, when all requests are finished, use the users/notify-pending API to notify participants. Returns a list of ids of each document created. * @summary Creates one or multiple documents. * @param {DocumentsCreateDocumentRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsPost: (body?: DocumentsCreateDocumentRequest, options?: AxiosRequestConfig) => Promise; /** * Before calling this API you need to upload the file using the Upload API or the Upload Bytes API. * @summary Validates each signature in the uploaded document * @param {SignatureSignaturesInfoRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsValidateSignaturesPost: (body?: SignatureSignaturesInfoRequest, options?: AxiosRequestConfig) => Promise; }; /** * DocumentsApi - functional programming interface * @export */ export declare const DocumentsApiFp: (configuration?: Configuration) => { /** * * @summary Moves a batch of documents to a folder. * @param {DocumentsMoveDocumentBatchRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsBatchFolderPost(body?: DocumentsMoveDocumentBatchRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>>; /** * You may filter the documents by folder and document type. * @summary Retrieves the documents of the organization paginating the response. * @param {boolean} [isConcluded] (DEPRECATED) Please use \"Status\" parameter instead. Set to true to list concluded documents, false to list pending documents. * @param {DocumentFilterStatus} [status] Filters by document status. Will override the \"IsConcluded\" property. * @param {string} [folderId] * @param {FolderType} [folderType] * @param {DocumentTypes} [documentType] * @param {boolean} [filterByDocumentType] True if the documents should be filtered by type, use documentType to specify the document type. If you want to filter only documents without a type, set this parameter to true and the documentType to null. * @param {boolean} [filterByPendingSignature] True if documents should be filtered only for those that have FlowAction of the type Signer or SignRule * @param {DocumentQueryTypes} [queryType] * @param {string} [participantQ] Query to filter by participant * @param {ParticipantQueryTypes} [participantQueryType] * @param {string} [tags] Label/value pairs are separated by \"|\" (optional) and Tags separated by \",\". Only the first 10 pairs will be considered. To search by tag value only, do not use the \"|\". * @param {boolean} [isDeleted] Returns deleted documents that had the specified document status when deleted. * @param {string} [Q] Query to filter items. * @param {number} [limit] Number of items to return. * @param {number} [offset] The offset of the searched page (starting with 0). * @param {PaginationOrders} [order] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsGet(isConcluded?: boolean, status?: DocumentFilterStatus, folderId?: string, folderType?: FolderType, documentType?: DocumentTypes, filterByDocumentType?: boolean, filterByPendingSignature?: boolean, queryType?: DocumentQueryTypes, participantQ?: string, participantQueryType?: ParticipantQueryTypes, tags?: string, isDeleted?: boolean, Q?: string, limit?: number, offset?: number, order?: PaginationOrders, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>; /** * This API will return an URL that allows an user to sign or approve the document without having to wait to receive an email notification. If the document has multiple pending actions, this API will return the URL of the first pending action for the matched user. After the action has been completed, you may call this API again to retrieve the URL for the next action (if any). Please note that using the URL returned will be recorded in the evidences of the action as an Application Authentication. * @summary Retrieves an URL to redirect the user to the first pending action of the document. * @param {string} id Document Id * @param {DocumentsActionUrlRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdActionUrlPost(id: string, body?: DocumentsActionUrlRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>; /** * CAUTION: This action cannot be reverted. * @summary Cancels the document by providing a reason for the cancellation. * @param {string} id * @param {DocumentsCancelDocumentRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdCancellationPost(id: string, body?: DocumentsCancelDocumentRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>; /** * * @summary Downloads a specific version type of the document encoding the bytes in Base 64 format. * @param {string} id Document id * @param {DocumentDownloadTypes} [type] The version type to download * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdContentB64Get(id: string, type?: DocumentDownloadTypes, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>; /** * * @summary Downloads a specific version type of the document. * @param {string} id Document id * @param {DocumentDownloadTypes} [type] The version type to download * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdContentGet(id: string, type?: DocumentDownloadTypes, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>; /** * * @summary Deletes a specific document using it's id. * @param {string} id Document id * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdDelete(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>; /** * The flow of the document will be restarted. * @summary Adds a new version for an envelope. * @param {string} id * @param {DocumentsEnvelopeAddVersionRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdEnvelopeVersionsPost(id: string, body?: DocumentsEnvelopeAddVersionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>; /** * * @summary Updates the document's flow. * @param {string} id Id of the document * @param {DocumentsDocumentFlowEditRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdFlowPost(id: string, body?: DocumentsDocumentFlowEditRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>; /** * * @summary Moves a document to a folder. * @param {string} id * @param {DocumentsMoveDocumentRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdFolderPost(id: string, body?: DocumentsMoveDocumentRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>; /** * * @summary Retrieves the document's details. * @param {string} id Document id * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdGet(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>; /** * The notified emails are the ones that will be notified after the document is concluded. * @summary Updates the document's notified emails * @param {string} id Id of the document * @param {DocumentsDocumentNotifiedEmailsEditRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdNotifiedEmailsPut(id: string, body?: DocumentsDocumentNotifiedEmailsEditRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>; /** * The document's flow will pause and can only be resumed by adding a new version of the document (see Add Version API). * @summary Refuses a document by providing a reason for the refusal. * @param {string} id * @param {RefusalRefusalRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdRefusalPost(id: string, body?: RefusalRefusalRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>; /** * This will perform the same validations as verifying the document signatures using the verification code. * @summary Retrieves the details of the document's signatures. * @param {string} id The Id of the document * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdSignaturesDetailsGet(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>; /** * The URL does not require authentication and will be available for 1 hour.
  • Original: the original file provided when the document was created.
  • OriginalWithMarks: the original file with all marks added (for example when an user approves the document and includes its signature image).
  • PrinterFriendlyVersion: if the original document is PDF, the version with marks and a appended signature manifest, otherwise a PDF file with the signature manifest.
  • Signatures: if the original document is PDF, the signed PDF file, otherwise the .p7s file.
* @summary Generates a URL (ticket) to download a specific version type of the document. * @param {string} id Document id * @param {DocumentTicketType} [type] The version type to download * @param {boolean} [preview] If true, when downloading the document, the response will not include the name of the file (useful when embedding the document inside a web page for previewing) * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdTicketGet(id: string, type?: DocumentTicketType, preview?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>; /** * The flow of the document will be restarted. If the document was created as an envelope, please use the Add Envelope Version API * @summary Adds a new version for the document. * @param {string} id * @param {DocumentsDocumentAddVersionRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdVersionsPost(id: string, body?: DocumentsDocumentAddVersionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>; /** * * @summary Validates each signature in a document using the verification code * @param {string} key The verification code presented in the document * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsKeysKeySignaturesGet(key: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>; /** * Before calling this API you need to upload the file(s) using the Upload API or the Upload Bytes API. When creating a big batch of documents, it is recommended to send multiple requests instead of one big request. For instance, if you want to create 100 documents, send 10 requests of 10 documents. In this case it is recommended to use the disablePendingActionNotifications option and, when all requests are finished, use the users/notify-pending API to notify participants. Returns a list of ids of each document created. * @summary Creates one or multiple documents. * @param {DocumentsCreateDocumentRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsPost(body?: DocumentsCreateDocumentRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>>; /** * Before calling this API you need to upload the file using the Upload API or the Upload Bytes API. * @summary Validates each signature in the uploaded document * @param {SignatureSignaturesInfoRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsValidateSignaturesPost(body?: SignatureSignaturesInfoRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>>; }; /** * DocumentsApi - factory interface * @export */ export declare const DocumentsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * * @summary Moves a batch of documents to a folder. * @param {DocumentsMoveDocumentBatchRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsBatchFolderPost(body?: DocumentsMoveDocumentBatchRequest, options?: AxiosRequestConfig): Promise>>; /** * You may filter the documents by folder and document type. * @summary Retrieves the documents of the organization paginating the response. * @param {boolean} [isConcluded] (DEPRECATED) Please use \"Status\" parameter instead. Set to true to list concluded documents, false to list pending documents. * @param {DocumentFilterStatus} [status] Filters by document status. Will override the \"IsConcluded\" property. * @param {string} [folderId] * @param {FolderType} [folderType] * @param {DocumentTypes} [documentType] * @param {boolean} [filterByDocumentType] True if the documents should be filtered by type, use documentType to specify the document type. If you want to filter only documents without a type, set this parameter to true and the documentType to null. * @param {boolean} [filterByPendingSignature] True if documents should be filtered only for those that have FlowAction of the type Signer or SignRule * @param {DocumentQueryTypes} [queryType] * @param {string} [participantQ] Query to filter by participant * @param {ParticipantQueryTypes} [participantQueryType] * @param {string} [tags] Label/value pairs are separated by \"|\" (optional) and Tags separated by \",\". Only the first 10 pairs will be considered. To search by tag value only, do not use the \"|\". * @param {boolean} [isDeleted] Returns deleted documents that had the specified document status when deleted. * @param {string} [Q] Query to filter items. * @param {number} [limit] Number of items to return. * @param {number} [offset] The offset of the searched page (starting with 0). * @param {PaginationOrders} [order] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsGet(isConcluded?: boolean, status?: DocumentFilterStatus, folderId?: string, folderType?: FolderType, documentType?: DocumentTypes, filterByDocumentType?: boolean, filterByPendingSignature?: boolean, queryType?: DocumentQueryTypes, participantQ?: string, participantQueryType?: ParticipantQueryTypes, tags?: string, isDeleted?: boolean, Q?: string, limit?: number, offset?: number, order?: PaginationOrders, options?: AxiosRequestConfig): Promise>; /** * This API will return an URL that allows an user to sign or approve the document without having to wait to receive an email notification. If the document has multiple pending actions, this API will return the URL of the first pending action for the matched user. After the action has been completed, you may call this API again to retrieve the URL for the next action (if any). Please note that using the URL returned will be recorded in the evidences of the action as an Application Authentication. * @summary Retrieves an URL to redirect the user to the first pending action of the document. * @param {string} id Document Id * @param {DocumentsActionUrlRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdActionUrlPost(id: string, body?: DocumentsActionUrlRequest, options?: AxiosRequestConfig): Promise>; /** * CAUTION: This action cannot be reverted. * @summary Cancels the document by providing a reason for the cancellation. * @param {string} id * @param {DocumentsCancelDocumentRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdCancellationPost(id: string, body?: DocumentsCancelDocumentRequest, options?: AxiosRequestConfig): Promise>; /** * * @summary Downloads a specific version type of the document encoding the bytes in Base 64 format. * @param {string} id Document id * @param {DocumentDownloadTypes} [type] The version type to download * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdContentB64Get(id: string, type?: DocumentDownloadTypes, options?: AxiosRequestConfig): Promise>; /** * * @summary Downloads a specific version type of the document. * @param {string} id Document id * @param {DocumentDownloadTypes} [type] The version type to download * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdContentGet(id: string, type?: DocumentDownloadTypes, options?: AxiosRequestConfig): Promise>; /** * * @summary Deletes a specific document using it's id. * @param {string} id Document id * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdDelete(id: string, options?: AxiosRequestConfig): Promise>; /** * The flow of the document will be restarted. * @summary Adds a new version for an envelope. * @param {string} id * @param {DocumentsEnvelopeAddVersionRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdEnvelopeVersionsPost(id: string, body?: DocumentsEnvelopeAddVersionRequest, options?: AxiosRequestConfig): Promise>; /** * * @summary Updates the document's flow. * @param {string} id Id of the document * @param {DocumentsDocumentFlowEditRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdFlowPost(id: string, body?: DocumentsDocumentFlowEditRequest, options?: AxiosRequestConfig): Promise>; /** * * @summary Moves a document to a folder. * @param {string} id * @param {DocumentsMoveDocumentRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdFolderPost(id: string, body?: DocumentsMoveDocumentRequest, options?: AxiosRequestConfig): Promise>; /** * * @summary Retrieves the document's details. * @param {string} id Document id * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdGet(id: string, options?: AxiosRequestConfig): Promise>; /** * The notified emails are the ones that will be notified after the document is concluded. * @summary Updates the document's notified emails * @param {string} id Id of the document * @param {DocumentsDocumentNotifiedEmailsEditRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdNotifiedEmailsPut(id: string, body?: DocumentsDocumentNotifiedEmailsEditRequest, options?: AxiosRequestConfig): Promise>; /** * The document's flow will pause and can only be resumed by adding a new version of the document (see Add Version API). * @summary Refuses a document by providing a reason for the refusal. * @param {string} id * @param {RefusalRefusalRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdRefusalPost(id: string, body?: RefusalRefusalRequest, options?: AxiosRequestConfig): Promise>; /** * This will perform the same validations as verifying the document signatures using the verification code. * @summary Retrieves the details of the document's signatures. * @param {string} id The Id of the document * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdSignaturesDetailsGet(id: string, options?: AxiosRequestConfig): Promise>; /** * The URL does not require authentication and will be available for 1 hour.
  • Original: the original file provided when the document was created.
  • OriginalWithMarks: the original file with all marks added (for example when an user approves the document and includes its signature image).
  • PrinterFriendlyVersion: if the original document is PDF, the version with marks and a appended signature manifest, otherwise a PDF file with the signature manifest.
  • Signatures: if the original document is PDF, the signed PDF file, otherwise the .p7s file.
* @summary Generates a URL (ticket) to download a specific version type of the document. * @param {string} id Document id * @param {DocumentTicketType} [type] The version type to download * @param {boolean} [preview] If true, when downloading the document, the response will not include the name of the file (useful when embedding the document inside a web page for previewing) * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdTicketGet(id: string, type?: DocumentTicketType, preview?: boolean, options?: AxiosRequestConfig): Promise>; /** * The flow of the document will be restarted. If the document was created as an envelope, please use the Add Envelope Version API * @summary Adds a new version for the document. * @param {string} id * @param {DocumentsDocumentAddVersionRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsIdVersionsPost(id: string, body?: DocumentsDocumentAddVersionRequest, options?: AxiosRequestConfig): Promise>; /** * * @summary Validates each signature in a document using the verification code * @param {string} key The verification code presented in the document * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsKeysKeySignaturesGet(key: string, options?: AxiosRequestConfig): Promise>; /** * Before calling this API you need to upload the file(s) using the Upload API or the Upload Bytes API. When creating a big batch of documents, it is recommended to send multiple requests instead of one big request. For instance, if you want to create 100 documents, send 10 requests of 10 documents. In this case it is recommended to use the disablePendingActionNotifications option and, when all requests are finished, use the users/notify-pending API to notify participants. Returns a list of ids of each document created. * @summary Creates one or multiple documents. * @param {DocumentsCreateDocumentRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsPost(body?: DocumentsCreateDocumentRequest, options?: AxiosRequestConfig): Promise>>; /** * Before calling this API you need to upload the file using the Upload API or the Upload Bytes API. * @summary Validates each signature in the uploaded document * @param {SignatureSignaturesInfoRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiDocumentsValidateSignaturesPost(body?: SignatureSignaturesInfoRequest, options?: AxiosRequestConfig): Promise>>; }; /** * DocumentsApi - object-oriented interface * @export * @class DocumentsApi * @extends {BaseAPI} */ export declare class DocumentsApi extends BaseAPI { /** * * @summary Moves a batch of documents to a folder. * @param {DocumentsMoveDocumentBatchRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsBatchFolderPost(body?: DocumentsMoveDocumentBatchRequest, options?: AxiosRequestConfig): Promise>>; /** * You may filter the documents by folder and document type. * @summary Retrieves the documents of the organization paginating the response. * @param {boolean} [isConcluded] (DEPRECATED) Please use \"Status\" parameter instead. Set to true to list concluded documents, false to list pending documents. * @param {DocumentFilterStatus} [status] Filters by document status. Will override the \"IsConcluded\" property. * @param {string} [folderId] * @param {FolderType} [folderType] * @param {DocumentTypes} [documentType] * @param {boolean} [filterByDocumentType] True if the documents should be filtered by type, use documentType to specify the document type. If you want to filter only documents without a type, set this parameter to true and the documentType to null. * @param {boolean} [filterByPendingSignature] True if documents should be filtered only for those that have FlowAction of the type Signer or SignRule * @param {DocumentQueryTypes} [queryType] * @param {string} [participantQ] Query to filter by participant * @param {ParticipantQueryTypes} [participantQueryType] * @param {string} [tags] Label/value pairs are separated by \"|\" (optional) and Tags separated by \",\". Only the first 10 pairs will be considered. To search by tag value only, do not use the \"|\". * @param {boolean} [isDeleted] Returns deleted documents that had the specified document status when deleted. * @param {string} [Q] Query to filter items. * @param {number} [limit] Number of items to return. * @param {number} [offset] The offset of the searched page (starting with 0). * @param {PaginationOrders} [order] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsGet(isConcluded?: boolean, status?: DocumentFilterStatus, folderId?: string, folderType?: FolderType, documentType?: DocumentTypes, filterByDocumentType?: boolean, filterByPendingSignature?: boolean, queryType?: DocumentQueryTypes, participantQ?: string, participantQueryType?: ParticipantQueryTypes, tags?: string, isDeleted?: boolean, Q?: string, limit?: number, offset?: number, order?: PaginationOrders, options?: AxiosRequestConfig): Promise>; /** * This API will return an URL that allows an user to sign or approve the document without having to wait to receive an email notification. If the document has multiple pending actions, this API will return the URL of the first pending action for the matched user. After the action has been completed, you may call this API again to retrieve the URL for the next action (if any). Please note that using the URL returned will be recorded in the evidences of the action as an Application Authentication. * @summary Retrieves an URL to redirect the user to the first pending action of the document. * @param {string} id Document Id * @param {DocumentsActionUrlRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsIdActionUrlPost(id: string, body?: DocumentsActionUrlRequest, options?: AxiosRequestConfig): Promise>; /** * CAUTION: This action cannot be reverted. * @summary Cancels the document by providing a reason for the cancellation. * @param {string} id * @param {DocumentsCancelDocumentRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsIdCancellationPost(id: string, body?: DocumentsCancelDocumentRequest, options?: AxiosRequestConfig): Promise>; /** * * @summary Downloads a specific version type of the document encoding the bytes in Base 64 format. * @param {string} id Document id * @param {DocumentDownloadTypes} [type] The version type to download * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsIdContentB64Get(id: string, type?: DocumentDownloadTypes, options?: AxiosRequestConfig): Promise>; /** * * @summary Downloads a specific version type of the document. * @param {string} id Document id * @param {DocumentDownloadTypes} [type] The version type to download * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsIdContentGet(id: string, type?: DocumentDownloadTypes, options?: AxiosRequestConfig): Promise>; /** * * @summary Deletes a specific document using it's id. * @param {string} id Document id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsIdDelete(id: string, options?: AxiosRequestConfig): Promise>; /** * The flow of the document will be restarted. * @summary Adds a new version for an envelope. * @param {string} id * @param {DocumentsEnvelopeAddVersionRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsIdEnvelopeVersionsPost(id: string, body?: DocumentsEnvelopeAddVersionRequest, options?: AxiosRequestConfig): Promise>; /** * * @summary Updates the document's flow. * @param {string} id Id of the document * @param {DocumentsDocumentFlowEditRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsIdFlowPost(id: string, body?: DocumentsDocumentFlowEditRequest, options?: AxiosRequestConfig): Promise>; /** * * @summary Moves a document to a folder. * @param {string} id * @param {DocumentsMoveDocumentRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsIdFolderPost(id: string, body?: DocumentsMoveDocumentRequest, options?: AxiosRequestConfig): Promise>; /** * * @summary Retrieves the document's details. * @param {string} id Document id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsIdGet(id: string, options?: AxiosRequestConfig): Promise>; /** * The notified emails are the ones that will be notified after the document is concluded. * @summary Updates the document's notified emails * @param {string} id Id of the document * @param {DocumentsDocumentNotifiedEmailsEditRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsIdNotifiedEmailsPut(id: string, body?: DocumentsDocumentNotifiedEmailsEditRequest, options?: AxiosRequestConfig): Promise>; /** * The document's flow will pause and can only be resumed by adding a new version of the document (see Add Version API). * @summary Refuses a document by providing a reason for the refusal. * @param {string} id * @param {RefusalRefusalRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsIdRefusalPost(id: string, body?: RefusalRefusalRequest, options?: AxiosRequestConfig): Promise>; /** * This will perform the same validations as verifying the document signatures using the verification code. * @summary Retrieves the details of the document's signatures. * @param {string} id The Id of the document * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsIdSignaturesDetailsGet(id: string, options?: AxiosRequestConfig): Promise>; /** * The URL does not require authentication and will be available for 1 hour.
  • Original: the original file provided when the document was created.
  • OriginalWithMarks: the original file with all marks added (for example when an user approves the document and includes its signature image).
  • PrinterFriendlyVersion: if the original document is PDF, the version with marks and a appended signature manifest, otherwise a PDF file with the signature manifest.
  • Signatures: if the original document is PDF, the signed PDF file, otherwise the .p7s file.
* @summary Generates a URL (ticket) to download a specific version type of the document. * @param {string} id Document id * @param {DocumentTicketType} [type] The version type to download * @param {boolean} [preview] If true, when downloading the document, the response will not include the name of the file (useful when embedding the document inside a web page for previewing) * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsIdTicketGet(id: string, type?: DocumentTicketType, preview?: boolean, options?: AxiosRequestConfig): Promise>; /** * The flow of the document will be restarted. If the document was created as an envelope, please use the Add Envelope Version API * @summary Adds a new version for the document. * @param {string} id * @param {DocumentsDocumentAddVersionRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsIdVersionsPost(id: string, body?: DocumentsDocumentAddVersionRequest, options?: AxiosRequestConfig): Promise>; /** * * @summary Validates each signature in a document using the verification code * @param {string} key The verification code presented in the document * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsKeysKeySignaturesGet(key: string, options?: AxiosRequestConfig): Promise>; /** * Before calling this API you need to upload the file(s) using the Upload API or the Upload Bytes API. When creating a big batch of documents, it is recommended to send multiple requests instead of one big request. For instance, if you want to create 100 documents, send 10 requests of 10 documents. In this case it is recommended to use the disablePendingActionNotifications option and, when all requests are finished, use the users/notify-pending API to notify participants. Returns a list of ids of each document created. * @summary Creates one or multiple documents. * @param {DocumentsCreateDocumentRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsPost(body?: DocumentsCreateDocumentRequest, options?: AxiosRequestConfig): Promise>>; /** * Before calling this API you need to upload the file using the Upload API or the Upload Bytes API. * @summary Validates each signature in the uploaded document * @param {SignatureSignaturesInfoRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DocumentsApi */ apiDocumentsValidateSignaturesPost(body?: SignatureSignaturesInfoRequest, options?: AxiosRequestConfig): Promise>>; }