Documents API
Endpoint Index
| Action | Endpoint |
|---|---|
| Fetch a Document instance | GET /document/{tenantLocator}/documents/{locator} |
| Fetch the Rendered artifact for a Document | GET /document/{tenantLocator}/documents/{locator}/document |
| Fetch the Source for a Document | GET /document/{tenantLocator}/documents/{locator}/source |
| Fetch Documents for a Policy Segment | GET /document/{tenantLocator}/documents/segment/{locator}/list |
| Fetch Documents for a Policy Transaction | GET /document/{tenantLocator}/documents/transaction/{locator}/list |
| Fetch Documents for a Quote | GET /document/{tenantLocator}/documents/quote/{locator}/list |
| Fetch Document for an Invoice | GET /document/{tenantLocator}/documents/invoices/{locator} |
| Attach Document | POST /document/{tenantLocator}/documents/attach |
| Replace Document | PATCH /document/{tenantLocator}/documents/{locator} |
| Render Document | POST /document/{tenantLocator}/documents/render |
Fetch
GET /document/{tenantLocator}/documents/{locator}Request Parameters:
| Name | Position | Type | Required |
|---|---|---|---|
| tenantLocator | path | uuid | required |
| locator | path | string | required |
Response:DocumentInstanceResponse
Security Group:documents  Permission:read
DocumentInstanceResponse
¶requiredlocator stringreferenceLocator stringdocumentInstanceState Enum draft | dataReady | ready | dataError | renderError | conversionErrorexternal booleanreferenceType Enum quote | policy | invoice | transaction | segment | termcreatedAt datetimeconsolidatedFrom string[]consolidatedTo string[]metadata map<string,object>renderingData map<string,object>optionalpolicyLocator string?termLocator string?transactionLocator string?segmentLocator string?referenceDocumentLocator string?staticName string?name string?category string?documentFormat Enum? text | html | pdf | jpg | jpeg | doc | docx | xls | xlsx | csv | txt | zipprocessingErrors string?readyAt datetime?createdBy uuid?
GET /document/{tenantLocator}/documents/{locator}/documentRequest Parameters:
| Name | Position | Type | Required |
|---|---|---|---|
| tenantLocator | path | uuid | required |
| locator | path | string | required |
Response:StreamingResponseBody<string>
Security Group:documents  Permission:read
GET /document/{tenantLocator}/documents/{locator}/sourceRequest Parameters:
| Name | Position | Type | Required |
|---|---|---|---|
| tenantLocator | path | uuid | required |
| locator | path | string | required |
Response:StreamingResponseBody<string>
Security Group:documents  Permission:read
GET /document/{tenantLocator}/documents/segment/{locator}/listRequest Parameters:
| Name | Position | Type | Required |
|---|---|---|---|
| tenantLocator | path | uuid | required |
| locator | path | string | required |
| offset | query | int? | optional |
| count | query | int? | optional |
| extended | query | boolean? | optional |
| suppressRenderingData | query | boolean? | optional |
Response:DocumentListResponse
Security Group:documents  Permission:read
GET /document/{tenantLocator}/documents/transaction/{locator}/listRequest Parameters:
| Name | Position | Type | Required |
|---|---|---|---|
| tenantLocator | path | uuid | required |
| locator | path | string | required |
| offset | query | int? | optional |
| count | query | int? | optional |
| extended | query | boolean? | optional |
| suppressRenderingData | query | boolean? | optional |
Response:DocumentListResponse
Security Group:documents  Permission:read
GET /document/{tenantLocator}/documents/quote/{locator}/listRequest Parameters:
| Name | Position | Type | Required |
|---|---|---|---|
| tenantLocator | path | uuid | required |
| locator | path | string | required |
| offset | query | int? | optional |
| count | query | int? | optional |
| extended | query | boolean? | optional |
| suppressRenderingData | query | boolean? | optional |
Response:DocumentListResponse
Security Group:documents  Permission:read
DocumentListResponse
¶requiredlistCompleted booleanitems DocumentInstanceResponse[]
GET /document/{tenantLocator}/documents/invoices/{locator}Request Parameters:
| Name | Position | Type | Required |
|---|---|---|---|
| tenantLocator | path | uuid | required |
| locator | path | string | required |
Response:DocumentInstanceResponse
Security Group:documents  Permission:read
Modification
POST /document/{tenantLocator}/documents/attachRequest Parameters:
| Name | Position | Type | Required |
|---|---|---|---|
| tenantLocator | path | uuid | required |
| referenceLocator | query | string | required |
| referenceType | query | Enum quote | policy | invoice | transaction | segment | term | required |
| name | query | string | required |
| staticName | query | string? | optional |
| documentFormat | query | Enum text | html | pdf | jpg | jpeg | doc | docx | xls | xlsx | csv | txt | zip | required |
| metadata | query | string? | optional |
| transactionLocator | query | string? | optional |
| segmentLocator | query | string? | optional |
| category | query | string? | optional |
Request:file
Response:DocumentInstanceResponse
Security Group:documents  Permission:upload-external
Note
In the request, the key name for the file content should be document.
If referenceType is policy, either a transactionLocator or segmentLocator must be supplied.
PATCH /document/{tenantLocator}/documents/{locator}Request Parameters:
| Name | Position | Type | Required |
|---|---|---|---|
| tenantLocator | path | uuid | required |
| locator | path | string | required |
| metadata | query | string? | optional |
| category | query | string? | optional |
Request:file
Response:DocumentInstanceResponse
Security Group:documents  Permission:replace-external
Ad-hoc Rendering
POST /document/{tenantLocator}/documents/renderRequest Parameters:
| Name | Position | Type | Required |
|---|---|---|---|
| tenantLocator | path | uuid | required |
| referenceType | query | Enum quote | policy | invoice | transaction | segment | term | required |
| referenceLocator | query | string | required |
| productName | query | string? | optional |
| templateFormat | query | Enum? liquid | velocity | optional |
| documentConfig | query | string? | optional |
| staticName | query | string? | optional |
| templateName | query | string? | optional |
Request:TemplateResponse
Response:StreamingResponseBody<string>
Security Group:documents  Permission:render-external