Docs
Capture Order Document
POST /Orders/{orderId}/documents
POST
/Orders/{orderId}/documentsRecords 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
| Field | Type | Required | Description |
|---|---|---|---|
| orderId | uuid | Required |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| type | string | Optional | |
| pricingLevel | string | Optional | |
| sourceCollaboratorRecordId | uuid | Optional | |
| subtotal | number | Optional | |
| fileId | uuid | Optional | |
| receivedDate | date-time | Optional | |
| adjustments | CaptureOrderDocumentRequestAdjustment[] | Optional |
CaptureOrderDocumentRequestAdjustment
| Field | Type | Description |
|---|---|---|
| label | string| null | |
| amount | number |
Response
Type: uuid