> ## Documentation Index > Fetch the complete documentation index at: https://www.bloxs.io/llms.txt > Use this file to discover all available pages before exploring further. # Get a purchase order > Get an existing purchase order. ## OpenAPI ````json GET /api/v1/invoices/purchaseorders { "openapi": "3.0.4", "info": { "title": "Invoices V1", "description": "Welcome to BETA version of the new Invoices API - intended for client public testing before the launch of the final version. During this BETA phase, we'll be improving the API based on specific client's feedbacks.", "version": "v1" }, "security": [ {} ], "tags": [ { "name": "Budgets" }, { "name": "Compactions" }, { "name": "ConceptPurchaseInvoices" }, { "name": "JournalPosts" }, { "name": "Journals" }, { "name": "LedgerAccounts" }, { "name": "Metadata" }, { "name": "PaymentReminders" }, { "name": "PurchaseInvoices" }, { "name": "PurchaseOrders" }, { "name": "SalesInvoices" }, { "name": "SalesInvoiceServices" } ], "paths": { "/api/v1/invoices/purchaseorders": { "get": { "tags": [ "PurchaseOrders" ], "summary": "Get a purchase order", "description": "Get an existing purchase order.", "operationId": "GetPurchaseOrder", "parameters": [ { "name": "reference", "in": "query", "description": "The internal identifier of the model (i.e. Reference, Code, Name, depends on model).", "schema": { "type": "string" } }, { "name": "externalIdentifier", "in": "query", "description": "The external API identifier of the model.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PurchaseOrderDetail" } } } }, "404": { "description": "The requested purchase order was not found." } }, "x-d360-narrative-url": "

Get a Purchase Order

Retrieves the full record of a single existing purchase order.

A purchase order in Bloxs is based on an externally supplied quote (proposal) from a supplier; a developer calls this endpoint to look up a purchase order already registered in Bloxs, typically to check its approval status, invoicing progress, or totals against the original quote.

A purchase order belongs to a specific owner's financial administration and a specific relation (the supplier).


Request Fields

Field

Type

Required

Description

reference

string

Required (at least one of reference or externalIdentifier must be given)

The internal identifier of the purchase order.

externalIdentifier

string

Required (at least one of reference or externalIdentifier must be given)

The external API identifier of the purchase order.


Response Fields

Field

Type

Required

Description

reference

string, max 100

Required

The internal identifier (Reference/Code) of the purchase order.

externalIdentifier

string, max 100

Required

The external API identifier of the purchase order, if any.

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) 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.

workflowState

integer (enum)

Optional

The approval workflow state of this purchase order. Allowed values: 1 = Draft, 2 = OnHold, 3 = Cancelled, 4 = ApprovalWorkflow, 7 = Final, 9 = Disapproved, 10 = OwnerApprovalWorkflow, 11 = DisapprovedByOwner.

finalizationState

integer (enum)

Optional

The invoicing progress of this purchase order, independent of its approval workflowState. Allowed values: 0 = Open, 1 = Completed, 2 = Closed.

totalAmountExcl

number (double)

Optional

The total purchase order amount excluding VAT, calculated from its own lines, in the administration's base currency (major units).

invoicedAmount

number (double), nullable

Optional

The amount already invoiced against this purchase order, calculated by Bloxs from purchase invoices referencing it, in the administration's base currency (major units).

outstandingAmount

number (double), nullable

Optional

The amount of this purchase order not yet invoiced, calculated by Bloxs, in the administration's base currency (major units).

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).

" } } }, "components": { "schemas": { "PurchaseOrderDetail": { "required": [ "externalIdentifier", "ownerReference", "proposalReference", "reference", "relationReference" ], "type": "object", "properties": { "reference": { "maxLength": 100, "minLength": 0, "type": "string" }, "externalIdentifier": { "maxLength": 100, "minLength": 0, "type": "string" }, "ownerReference": { "maxLength": 100, "minLength": 0, "type": "string" }, "relationReference": { "maxLength": 100, "minLength": 0, "type": "string" }, "proposalReference": { "maxLength": 100, "minLength": 0, "type": "string" }, "proposalTotalAmountExcl": { "type": "number", "format": "double", "nullable": true }, "subject": { "maxLength": 512, "minLength": 0, "type": "string", "nullable": true }, "workflowState": { "type": "integer", "description": "Draft = 1\nOnHold = 2\nCancelled = 3\nApprovalWorkflow = 4\nFinal = 7\nDisapproved = 9\nOwnerApprovalWorkflow = 10\nDisapprovedByOwner = 11", "format": "int32", "x-enumNames": [ "Draft", "OnHold", "Cancelled", "ApprovalWorkflow", "Final", "Disapproved", "OwnerApprovalWorkflow", "DisapprovedByOwner" ] }, "finalizationState": { "type": "integer", "description": "Open = 0\nCompleted = 1\nClosed = 2", "format": "int32", "x-enumNames": [ "Open", "Completed", "Closed" ] }, "totalAmountExcl": { "type": "number", "format": "double" }, "invoicedAmount": { "type": "number", "format": "double", "nullable": true }, "outstandingAmount": { "type": "number", "format": "double", "nullable": true }, "lines": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseOrderLineAPIModel" }, "nullable": true } }, "additionalProperties": false }, "PurchaseOrderLineAPIModel": { "required": [ "expectedDate", "ledgerAccountCode" ], "type": "object", "properties": { "lineIndex": { "type": "integer", "format": "int32" }, "expectedDate": { "type": "string", "format": "date" }, "description": { "maxLength": 512, "minLength": 0, "type": "string", "nullable": true }, "ledgerAccountCode": { "maxLength": 12, "minLength": 0, "type": "string" }, "realEstateObjectReference": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "taxRateCode": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "amountExcl": { "type": "number", "format": "double" } }, "additionalProperties": false } } } } ````