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

Prev Next
Get
/api/v1/invoices/purchaseinvoices

Get an existing purchase invoice.

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.

Security
Query parameters
reference
string

The internal identifier of the model (i.e. Reference, Code, Name, depends on model). When given 'relationReference' should also be given

relationReference
string

The internal identifier of the invoice's relation. Required when 'reference' is given.

Min length0
Max length100
externalIdentifier
string

The external API identifier of the model.

Responses
200

OK

Expand All
object
reference
string
Min length0
Max length100
subject
string | null
Min length0
Max length512
ownerReference
string
Min length0
Max length100
relationReference
string
Min length0
Max length100
invoiceDate
string (date)
paymentTermName
string
Min length0
Max length256
dueDate
string (date)
totalAmountExcl
number (double)
totalAmountVAT
number (double)
totalAmountIncl
number (double)
outstandingAmount
number (double) | null
outstandingAmountRecalculateDate
string (date-time) | null
serviceTicketReference
string | null
Min length0
Max length100
purchaseOrderReference
string | null
Min length0
Max length100
purchaseContractReference
string | null
Min length0
Max length100
lines
Array of object (PurchaseInvoiceLineAPIModel) | null
object
lineIndex
integer (int32)
ledgerAccountCode
string | null
Min length0
Max length12
realEstateObjectReference
string | null
Min length0
Max length100
description
string | null
Min length0
Max length512
taxRateCode
string | null
Min length0
Max length100
amountExcl
number (double)
amountVAT
number (double)
amountIncl
number (double)
404

The requested purchase invoice was not found.