eSign.AIeSign.AI
Developer Center

Download File

GET /esignglobal/v1/envelope/files/download

Interface Description

When the envelope is being signed or has been completed, files within the envelope can be downloaded. Downloads during the signing process are subject to flow download configuration, download permissions, and file visibility rules. If watermark asynchronous synthesis is required for files during signing, the interface returns a download task ID. Customers can obtain the file results through the download task query interface or via the download task completion callback.

Request Parameters

Parameter Name

Type

Required

Description

envelopeId

string

true

Envelope ID

downloadType

stringfalse

File download format type:  

  • zip (default): Returns a download link for the compressed package
  • list: Returns a list of files 

Request Example

GET https://……/esignglobal/v1/envelope/files/download?envelopeId=flow1234567890&downloadType=list

Response Parameters

Parameter Name

Type

Description

envelopeId

string

Envelope ID

envelopeStatus

int

Envelope Status

0- Created (Draft)

1- Signing in Progress

2- Completed

3- Expired

5- Revoked

taskId

string

Download Task ID. Returned only when the envelope is signing in progress and files require asynchronous watermark composition.

[Note] When taskId is returned, file result fields such as downloadUrl and envelopeFiles are not returned.

downloadUrl

string

File Download URL

[Note] Valid for 30 minutes. Please re-request the API to obtain the download URL after expiration.

Returned when downloadType=zip and file results can be returned synchronously; this field is not returned when taskId is returned.

envelopeFiles

array

Envelope File Collection

[Note] Returned when downloadType=list and file results can be returned synchronously; this field is not returned when taskId is returned.

 

fileType

string

File Type

CONTRACT- Signed Document

ATTACHMENT- Attachment

CERTIFICATE- Certificate

COMBINED- PDF file that merges the 'Signed Document' and 'Proof of Completion', returned when 'Envelope File Merge Download' is enabled

 

fileName

string

File Name

 

downloadUrl

string

File Download URL (valid for 60 minutes)

Response Example

{
    "code": "0",
    "data": {
    "envelopeId": "xxxx",
      "downloadUrl": "下载地址",
      "envelopeStatus": 2
  },
  "message": "success"
}

When the document is being signed and requires asynchronous watermark synthesis, the response example is as follows:

{
    "code": "0",
    "data": {
      "envelopeId": "xxxx",
      "envelopeStatus": 1,
      "taskId": "task1234567890"
  },
  "message": "success"
}