> ## 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 invoice > Get an existing purchase invoice. ## OpenAPI ````json GET /api/v1/invoices/purchaseinvoices { "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/purchaseinvoices": { "get": { "tags": [ "PurchaseInvoices" ], "summary": "Get a purchase invoice", "description": "Get an existing purchase invoice.", "operationId": "GetPurchaseInvoice", "parameters": [ { "name": "reference", "in": "query", "description": "The internal identifier of the model (i.e. Reference, Code, Name, depends on model). When given 'relationReference' should also be given", "schema": { "type": "string" } }, { "name": "relationReference", "in": "query", "description": "The internal identifier of the invoice's relation. Required when 'reference' is given.", "schema": { "maxLength": 100, "minLength": 0, "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/PurchaseInvoiceDetail" } } } }, "404": { "description": "The requested purchase invoice was not found." } }, "x-d360-narrative-url": "

Get a purchase invoice

This endpoint retrieves an existing purchase invoice, the invoice received from a supplier for goods or services delivered to an owner.

A developer calls this endpoint to check invoice status, amounts, and outstanding balance, or to synchronise the invoice with an external accounting or ERP system.

The invoice can be linked to a purchase order, purchase contract, or maintenance service ticket, depending on how it originated.


Request Fields

Field

Type

Required

Description

reference

string

Conditionally

Internal reference of the purchase invoice to retrieve. When provided, relationReference must also be provided. Can be used instead of externalIdentifier.

relationReference

string

Conditionally

Internal reference of the invoice's relation, the supplier the invoice was received from. Required when reference is given. Maximum length 100 characters.

externalIdentifier

string

Conditionally

External API identifier of the purchase invoice. Can be used instead of reference and relationReference to look up the invoice.


Response Fields

Field

Type

Required

Description

reference

string

Yes

Internal reference of the purchase invoice. Maximum length 100 characters.

subject

string

No

Subject or short description of the purchase invoice. Maximum length 512 characters.

ownerReference

string

Yes

Reference to the owner the purchase invoice is booked for.

relationReference

string

Yes

Reference to the relation, the supplier the purchase invoice was received from.

invoiceDate

date

Yes

Date on which the invoice was issued. Format YYYY-MM-DD.

paymentTermName

string

Yes

Name of the payment term applied to the invoice, used to derive the due date. Maximum length 256 characters.

dueDate

date

Yes

Date by which the invoice must be paid. Format YYYY-MM-DD. Derived from invoiceDate and paymentTermName.

totalAmountExcl

decimal

Yes

Total invoice amount excluding VAT, the net amount.

totalAmountVAT

decimal

Yes

Total VAT amount charged on the invoice.

totalAmountIncl

decimal

Yes

Total invoice amount including VAT, the gross amount. Equal to totalAmountExcl plus totalAmountVAT.

outstandingAmount

decimal

No

Remaining amount still to be paid, as of outstandingAmountRecalculateDate. Null if not yet calculated.

outstandingAmountRecalculateDate

datetime

No

Date and time at which outstandingAmount was last recalculated. ISO 8601 format.

serviceTicketReference

string

No

Reference to the maintenance service ticket the invoice relates to, if applicable. Maximum length 100 characters.

purchaseOrderReference

string

No

Reference to the purchase order the invoice relates to, if applicable. Maximum length 100 characters.

purchaseContractReference

string

No

Reference to the purchase contract the invoice relates to, if applicable. Maximum length 100 characters.

lines

array of objects

No

Collection of invoice lines that make up the purchase invoice. See the fields below.

lines[].lineIndex

integer

Yes

Sequential position of the line within the invoice.

lines[].ledgerAccountCode

string

No

Ledger account code the line amount is booked to. Maximum length 12 characters.

lines[].realEstateObjectReference

string

No

Reference to the real estate object the line relates to, if applicable. Maximum length 100 characters.

lines[].description

string

No

Description of the invoice line. Maximum length 512 characters.

lines[].taxRateCode

string

No

Code of the VAT or tax rate applied to the line. Maximum length 100 characters.

lines[].amountExcl

decimal

Yes

Line amount excluding VAT, the net amount.

lines[].amountVAT

decimal

Yes

VAT amount charged on the line.

lines[].amountIncl

decimal

Yes

Line amount including VAT, the gross amount. Equal to amountExcl plus amountVAT.

" } } }, "components": { "schemas": { "PurchaseInvoiceDetail": { "required": [ "ownerReference", "paymentTermName", "reference", "relationReference" ], "type": "object", "properties": { "reference": { "maxLength": 100, "minLength": 0, "type": "string" }, "subject": { "maxLength": 512, "minLength": 0, "type": "string", "nullable": true }, "ownerReference": { "maxLength": 100, "minLength": 0, "type": "string" }, "relationReference": { "maxLength": 100, "minLength": 0, "type": "string" }, "invoiceDate": { "type": "string", "format": "date" }, "paymentTermName": { "maxLength": 256, "minLength": 0, "type": "string" }, "dueDate": { "type": "string", "format": "date" }, "totalAmountExcl": { "type": "number", "format": "double" }, "totalAmountVAT": { "type": "number", "format": "double" }, "totalAmountIncl": { "type": "number", "format": "double" }, "outstandingAmount": { "type": "number", "format": "double", "nullable": true }, "outstandingAmountRecalculateDate": { "type": "string", "format": "date-time", "nullable": true }, "serviceTicketReference": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "purchaseOrderReference": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "purchaseContractReference": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "lines": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseInvoiceLineAPIModel" }, "nullable": true } }, "additionalProperties": false }, "PurchaseInvoiceLineAPIModel": { "type": "object", "properties": { "lineIndex": { "type": "integer", "format": "int32" }, "ledgerAccountCode": { "maxLength": 12, "minLength": 0, "type": "string", "nullable": true }, "realEstateObjectReference": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "description": { "maxLength": 512, "minLength": 0, "type": "string", "nullable": true }, "taxRateCode": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "amountExcl": { "type": "number", "format": "double" }, "amountVAT": { "type": "number", "format": "double" }, "amountIncl": { "type": "number", "format": "double" } }, "additionalProperties": false } } } } ````