Get a sales invoice by ID

FieldDescriptionExample

id

unique system generated id by the system

5050d6f7-d16a-4376-b00d-a20390c77bde

reference

an identifier (invoice number) for the document, assigned by the sender.

INV001

buyerReference

reference for the buyer (usually buyer's purchase invoice number)

PO001

creditInvoice.creditInvoiceIndicator

marker if the invoice is credit invoice / credit note

true/false

creditInvoice.reference

identifier (invoice number) of the credited invoice, if it is a credit invoice

INV001

financialDimensions

financial dimension to assign financial granularity to the financial reports (usually cost center, projects, etc.)

financialDimensions.type

type of financial dimensions: - costCode -> cost center - costBearer -> cost bearer - project -> project

CC001

orderReference

reference of the order number that is invoiced from: - buyerOrderId -> order number of the buyer (generated by customer's system) - sellerOrderId -> order number of the seller (generated by own system)

SO001

accountingCustomerParty.supplierAssignedAccountId.id

customer code assigned by system

CUST001

accountingCustomerParty.party.partyIdentification.id

legal identifier for the customer (GLN - "schemeId": "GLN" or VAT number - "schemeId": "SE:VAT")

SE559079010001

accountingCustomerParty.partyLegalEntity.companyId.id

registered customer's organisation number

559079-0100

accountingSupplierParty

same as accountingCustomerParty above, only for supplier side (used only in supplier invoice)

allowanceCharges

additional costs or discounts related to the invoice, ex: freight costs or discount

allowanceCharges.chargeIndicator

denote if it is a cost (+) or a discount (-) to the invoice amount

true/false

totalBalanceAmount

remaining balance of an invoice (will be different than taxInclusiveAmount if the invoice is half paid and will be 0 if fully paid)

800.00

taxInclusiveAmount

total amount of the invoice (tax included). this amount will never change no matter if the invoice is paid or not

1,000.00

prepaidAmount

advanced payment deducted to the invoice (if the accounting systems supports it)

100.00

payableRoundingAmount

the rounded nominal if there is decimal rounding involved (ex: 499.95 -> 500 the amount for payableRoundingAmount will be 0.05)

0.05

payableAmount

remaining amount to be paid, should be the same as totalBalanceAmount

800.00

isSent

denote if the invoice is sent

true/false

isSold

denote if the invoice is sold to the factoring company (for lending purposes)

true/false

...schemeId

standard used for codification

SE:ORG (organisation number format in Sweden)

NOTE: some information like GLN, organisation number, VAT number or contact (phone & email) need another API call (customer) in some systems. Use include parameter to display customer entity (/salesinvoices/:id?include=customer).

Knowing if an invoice paid or not can be tricky since not all systems provide a clear cut status which denotes payment. The easiest will be to locate these 2 fields: 1. totalBalanceAmount (if totalBalanceAmount is 0 then it is FULLY PAID) 2. taxInclusiveAmount (if totalBalanceAmount < taxInclusiveAmount and taxInclusiveAmount not 0, then it is HALF PAID) 3. IF taxInclusiveAmount = totalBalanceAmount then there is no one single payment yet (NOT PAID)

To list the payments made for that invoice you can use GET /salesinvoices/:id/payments or GET /salesinvoices/payments to list all payments

Last updated