Uploading & Deleting Documents
This topic includes the following:
- How to upload a document
- How to replace an existing document
- How to update the metadata in a document
- How to delete a document after you have created a package
Uploading Documents
Uploading a Single Document
To upload a document after creating a package, you will need to make a multipart-form POST request.
HTTP Request
HTTP Headers
Request Payload
For a complete description of each field, see the Request Payload Table section below.
Response Payload
Uploading Multiple Documents
To upload multiple documents in one call, you would use the same API URL but modify the request body in the following way:
HTTP Request
HTTP Headers
Request Payload
Replacing an Existing Document
Replacing an existing document in a transaction can also be done using the upload document API. This is useful, for example, if you would like to replace the document, but still keep the layout of the fields and signatures.
To do so, make a multipart-form POST request where the document JSON payload carries the same document ID as the original document:
HTTP Request
HTTP Headers
Request Payload
Similarly, you can replace multiple documents using the following request:
Request Payload
Updating Document Metadata
To update the metadata for a document, you will need to create your JSON using the updated document metadata:
Then use the following command:
The call above will only update the document level attributes you defined in your new JSON payload and not any other embedded attributes that can be updated.
Deleting a Document
To delete a document, make a DELETE request to the following URI:
Results
After running your code, if you log in to Sign and navigate to your transaction, you will be able to log into your Sign account and view the documents you just added.
Request Payload Table
Property |
Type |
Editable |
Required |
Default |
Sample Values |
---|---|---|---|---|---|
name |
string |
Yes |
No |
n/a |
|
description |
string |
Yes |
No |
n/a |
|
id |
string |
Yes |
No |
n/a |
|