Docs

Capture Order Document

POST /Orders/{orderId}/documents

POST/Orders/{orderId}/documents

Records a vendor quote or invoice on the order and returns its id. Set the pricing level (Line, Group or Document; the subtotal is used only at Document), the vendor collaborator record (required), and optionally the uploaded file, received date and adjustments (label required; the amount's sign is the meaning, so a negative amount is a discount). The document starts with no lines; add them with Orders_AddOrderDocumentLine. It is tied to the latest revision, sent or not; a captured quote counts as the Quoted step only once that revision is sent. File ids come from Drives_AddFile. On an organization-level order (org token, resource inventory edit) the document must come from the order's vendor.

Path Parameters

FieldTypeRequiredDescription
orderIduuidRequired

Request Body

FieldTypeRequiredDescription
typestringOptional
pricingLevelstringOptional
sourceCollaboratorRecordIduuidOptional
subtotalnumberOptional
fileIduuidOptional
receivedDatedate-timeOptional
adjustmentsCaptureOrderDocumentRequestAdjustment[]Optional

CaptureOrderDocumentRequestAdjustment

FieldTypeDescription
labelstring| null
amountnumber

Response

Type: uuid