Document attributes are customized data related to a document in a transaction, or to all data in a transaction. This data is not interpreted by Conga Sign. As such, the users of this data are free to store and interpret whatever data they want.
Customized data can also be applied at the transaction level. For more information, see Custom Transaction Data.
The following code sample illustrates the simplest way to create a package with customized document attributes. This example illustrates how to create customized attributes with the keys Department, and Employee. The customized attribute data is constructed as a map.
HTTP Request
HTTP Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: Bearer access_token
JS
Request Payload
------WebKitFormBoundary1bNO60n7FqP5WO4t Content-Disposition: form-data; name="file"; filename="testDocumentExtraction.pdf" Content-Type: application/pdf %PDF-1.5 %µµµµ 1 0 obj <>>> endobj.... ------WebKitFormBoundary1bNO60n7FqP5WO4t Content-Disposition: form-data; name="payload" { "autocomplete": true, "documents": [ { "approvals": [ { "fields": [ { "extract": false, "height": 50, "left": 100, "page": 0, "subtype": "FULLNAME", "top": 100, "type": "SIGNATURE", "width": 200 } ], "role": "Client1" } ], "data": { "Department": "1806", "Employee": "135526" }, "name": "sample doc" } ], "name": "Document Attributes Example", "roles": [ { "id": "Client1", "name": "Client1", "signers": [ { "company": "Acme Inc.", "email": "signer1@example.com", "firstName": "John", "id": "Client1", "lastName": "Smith", "title": "Managing Director" } ] } ], "trashed": false, "type": "PACKAGE", "visibility": "ACCOUNT" } ------WebKitFormBoundary1bNO60n7FqP5WO4t--
JS
For a complete description of each field, see the Request Payload Table below.
Response Payload
{ "id": "9sKhW-h-qS9m6Ho3zRv3n2a-rkI=" }
JS
If you want to retrieve your attributes at a later stage, you can do so by simply retrieving your document JSON:
GET https://services.congamerge.com/api/cs-packages/{packageId}/documents/{documentId}
JS
Then loop through the data filed property.
Request Payload Table
Property | Type | Editable | Required | Default | Sample Values |
---|
status | string | Yes | No | DRAFT | DRAFT/SENT/COMPLETED/ARCHIVED/
DECLINED/OPTED_OUT/EXPIRED |
autoComplete | boolean | Yes | No | true | true/false |
type | string | Yes | No | PACKAGE | PACKAGE/TEMPLATE/LAYOUT |
name | string | Yes | Yes | n/a | Document Attributes Example |
trashed | boolean | Yes | No | false | true/false |
visibility | string | Yes | No | ACCOUNT | ACCOUNT/SENDER |
documents |
name | string | Yes | No | n/a | sample doc |
approvals |
fields |
subtype | string | Yes | No | n/a | FULLNAME/INITIALS/CAPTURE/
MOBILE_CAPTURE/LABEL/TEXTFIELD/
TEXTAREA/CHECKBOX/DATE/RADIO/
LIST |
type | string | Yes | No | n/a | SIGNATURE/INPUT |
extract | boolean | Yes | No | false | true/false |
height | integer | Yes | No | 50 | 50/100/150... |
left | integer | Yes | No | 0 | 50/100/150... |
page | integer | Yes | No | 0 | 0/1/2... |
top | integer | Yes | No | 0 | 50/100/150... |
width | integer | Yes | No | 200 | 50/100/150... |
role | string | Yes | No | n/a | Client1 |
data |
Department | string | Yes | No | n/a | 1806 |
Employee | string | Yes | No | n/a | 135526 |
roles |
id | string | Yes | No | n/a | Client1 |
name | string | Yes | No | n/a | Client1 |
type | string | Yes | No | SIGNER | SIGNER/SENDER |
signers |
email | string | Yes | Yes | n/a | john.smith@example.com |
firstName | string | Yes | Yes | n/a | John |
lastName | string | Yes | Yes | n/a | Smith |
phone | string | Yes | No | n/a | 514-555-8888 |
id | string | Yes | No | n/a | Client1 |
company | string | Yes | No | n/a | Acme Inc |
title | string | Yes | No | n/a | Managing Director |