Documents API

Fetch

Fetch a Document instance
fetchDocument
GET /document/{tenantLocator}/documents/{locator}
    Request Parameters:
    NamePositionTypeRequired
    tenantLocatorpathuuidrequired
    locatorpathlocatorrequired
    Security Group:documents   Permission:read
DocumentInstanceResponse
required
locator locator
referenceLocator locator
documentInstanceState Enum draft | dataReady | ready | dataError | renderError | conversionError
external boolean
referenceType Enum quote | policy | invoice | transaction | segment | term
createdAt datetime
metadata map<string,object>
renderingData map<string,object>

optional
policyLocator locator?
termLocator locator?
transactionLocator locator?
segmentLocator locator?
referenceDocumentLocator locator?
staticName string?
name string?
category string?
documentFormat Enum? text | html | pdf | jpg | jpeg | doc | docx | xls | xlsx | csv | txt | zip
processingErrors string?
readyAt datetime?
createdBy uuid?
Fetch the Rendered artifact for a Document
fetchDocumentResource
GET /document/{tenantLocator}/documents/{locator}/document
    Request Parameters:
    NamePositionTypeRequired
    tenantLocatorpathuuidrequired
    locatorpathlocatorrequired
    Response:StreamingResponseBody<string>
    Security Group:documents   Permission:read
Fetch the Source for a Document
fetchSourceForDocument
GET /document/{tenantLocator}/documents/{locator}/source
    Request Parameters:
    NamePositionTypeRequired
    tenantLocatorpathuuidrequired
    locatorpathlocatorrequired
    Response:StreamingResponseBody<string>
    Security Group:documents   Permission:read
Fetch Documents for a Policy Segment
fetchDocumentsForSegment
GET /document/{tenantLocator}/documents/segment/{locator}/list
    Request Parameters:
    NamePositionTypeRequired
    tenantLocatorpathuuidrequired
    locatorpathlocatorrequired
    offsetqueryint?optional
    countqueryint?optional
    extendedqueryboolean?optional
    Security Group:documents   Permission:read
Fetch Documents for a Policy Transaction
fetchDocumentsForTransaction
GET /document/{tenantLocator}/documents/transaction/{locator}/list
    Request Parameters:
    NamePositionTypeRequired
    tenantLocatorpathuuidrequired
    locatorpathlocatorrequired
    offsetqueryint?optional
    countqueryint?optional
    extendedqueryboolean?optional
    Security Group:documents   Permission:read
Fetch Documents for a Quote
fetchDocumentsForQuote
GET /document/{tenantLocator}/documents/quote/{locator}/list
    Request Parameters:
    NamePositionTypeRequired
    tenantLocatorpathuuidrequired
    locatorpathlocatorrequired
    offsetqueryint?optional
    countqueryint?optional
    extendedqueryboolean?optional
    Security Group:documents   Permission:read
DocumentListResponse
required
listCompleted boolean
Fetch Document for an Invoice
fetchInvoiceDocument
GET /document/{tenantLocator}/documents/invoices/{locator}
    Request Parameters:
    NamePositionTypeRequired
    tenantLocatorpathuuidrequired
    locatorpathlocatorrequired
    Security Group:documents   Permission:read

Modification

Attach Document
attachDocument
POST /document/{tenantLocator}/documents/attach
    Request Parameters:
    NamePositionTypeRequired
    tenantLocatorpathuuidrequired
    referenceLocatorquerylocatorrequired
    referenceTypequeryEnum quote | policy | invoice | transaction | segment | termrequired
    namequerystringrequired
    staticNamequerystring?optional
    documentFormatqueryEnum text | html | pdf | jpg | jpeg | doc | docx | xls | xlsx | csv | txt | ziprequired
    metadataquerystring?optional
    transactionLocatorquerylocator?optional
    segmentLocatorquerylocator?optional
    categoryquerystring?optional
    Request:file
    Security Group:documents   Permission:upload-external
Replace Document
replaceDocument
PATCH /document/{tenantLocator}/documents/{locator}
    Request Parameters:
    NamePositionTypeRequired
    tenantLocatorpathuuidrequired
    locatorpathlocatorrequired
    metadataquerystring?optional
    categoryquerystring?optional
    Request:file
    Security Group:documents   Permission:replace-external

Ad-hoc Rendering

Render Document
renderDocument
POST /document/{tenantLocator}/documents/render
    Request Parameters:
    NamePositionTypeRequired
    tenantLocatorpathuuidrequired
    referenceTypequeryEnum quote | policy | invoice | transaction | segment | termrequired
    referenceLocatorquerylocatorrequired
    productNamequerystring?optional
    templateFormatqueryEnum? liquid | velocityoptional
    documentConfigquerystring?optional
    staticNamequerystring?optional
    templateNamequerystring?optional
    Response:StreamingResponseBody<string>
    Security Group:documents   Permission:render-external

See Also