Create a new purchase order.
Create a Purchase Order
Creates a new purchase order in Bloxs, based on an externally supplied quote (proposal) from a supplier.
A developer calls this endpoint to register a purchase order before work or goods from that supplier are invoiced. Setting automaticApprove to true skips the manual approval workflow and finalizes the purchase order immediately.
Request Fields
Field | Type | Required | Description |
|---|---|---|---|
externalIdentifier | string, max 100, nullable | Optional | An external API identifier to associate with this purchase order, if the integrating system wants to track its own identifier for the record. |
ownerReference | string, max 100 | Required | The internal identifier (Reference/Code) of the owner whose financial administration this purchase order belongs to. |
relationReference | string, max 100 | Required | The internal identifier (Reference/Code) of the supplier this purchase order is issued to. |
proposalReference | string, max 100 | Required | The reference of the externally supplied quote (proposal) from the supplier that this purchase order is based on. |
proposalTotalAmountExcl | number (double), nullable | Optional | The total amount excluding VAT stated on the supplier's quote, in the administration's base currency (major units). |
subject | string, max 512, nullable | Optional | The subject or description line of the purchase order. |
automaticApprove | boolean | Optional | When true, skips the manual approval workflow and finalizes the purchase order immediately, rather than leaving it in Draft/ApprovalWorkflow state. |
lines | array of objects, nullable | Optional | The purchase order's line items. See sub-fields below. |
lines.lineIndex | integer | Optional | The position of this line within the purchase order. |
lines.expectedDate | string (date) | Required (within each line) | The expected date for this line, formatted as ISO 8601 (YYYY-MM-DD). |
lines.description | string, max 512, nullable | Optional | The description text for this line. |
lines.ledgerAccountCode | string, max 12 | Required (within each line) | The general ledger account code this line is booked to. |
lines.realEstateObjectReference | string, max 100, nullable | Optional | The internal identifier of the real estate object this line is allocated to, if applicable. |
lines.taxRateCode | string, max 100, nullable | Optional | The VAT/tax rate applied to this line, represented as a descriptive label rather than a short code. |
lines.amountExcl | number (double) | Required (within each line) | The line amount excluding VAT, in the administration's base currency (major units). |
Response Fields
Field | Type | Required | Description |
|---|---|---|---|
reference | string, max 100 | Required | The internal identifier (Reference/Code) generated by Bloxs for the newly created purchase order. |
externalIdentifier | string, max 100 | Required | The external API identifier for this purchase order, if one was supplied on creation. |
ownerReference | string, max 100 | Required | The internal identifier (Reference/Code) of the owner whose financial administration this purchase order belongs to. |
relationReference | string, max 100 | Required | The internal identifier (Reference/Code) of the supplier this purchase order was issued to. |
proposalReference | string, max 100 | Required | The reference of the externally supplied quote (proposal) this purchase order is based on. |
proposalTotalAmountExcl | number (double), nullable | Optional | The total amount excluding VAT stated on the supplier's quote, in the administration's base currency (major units). |
subject | string, max 512, nullable | Optional | The subject or description line of the purchase order. |
workflowState | integer (enum) | Optional | The approval workflow state of this purchase order after creation. Allowed values: 1 = Draft, 2 = OnHold, 3 = Cancelled, 4 = ApprovalWorkflow, 7 = Final, 9 = Disapproved, 10 = OwnerApprovalWorkflow, 11 = DisapprovedByOwner. Expected to be Final (7) if automaticApprove was true, or an earlier state such as Draft otherwise. |
finalizationState | integer (enum) | Optional | The invoicing progress of this purchase order, independent of workflowState. Allowed values: 0 = Open, 1 = Completed, 2 = Closed. Expected to start at Open (0) for a newly created purchase order. |
totalAmountExcl | number (double) | Optional | The total purchase order amount excluding VAT, calculated from the submitted lines. |
invoicedAmount | number (double), nullable | Optional | The amount already invoiced against this purchase order. Expected to be null or zero immediately after creation. |
outstandingAmount | number (double), nullable | Optional | The amount of this purchase order not yet invoiced. Expected to equal totalAmountExcl immediately after creation. |
lines | array of objects, nullable | Optional | The purchase order's line items, as stored. Same structure as in the request. |
The purchase order was created
Draft = 1 OnHold = 2 Cancelled = 3 ApprovalWorkflow = 4 Final = 7 Disapproved = 9 OwnerApprovalWorkflow = 10 DisapprovedByOwner = 11
Open = 0 Completed = 1 Closed = 2
The purchase order data has validation issues