Retrieve a credit note

GEThttps://app.speybooks.com/api/v1/credit-notes/{id}

Returns one credit note as the full document object. Header totals (subtotal, vatAmount, total) are integer pence. Each line carries quantity as a full-scale decimal string, unitPrice as an integer count of micro-pounds and vatRate as an integer count of basis points (ADR-002 section 5: a rate's minor unit is finer than a penny), and netAmount, vatAmount and lineTotal as integer pence read from the stored conserved columns (lineTotal = netAmount + vatAmount, enforced at the database).

reason is the HMRC decrease reason (from metadata.reason); voidReason is the dedicated column, null unless the note is voided.

settlement carries allocatedTotal and remaining over the live set, and entries, every allocation from the base table, live and reversed, each with isLive and, when reversed, reversedAt, reversedBy and reason. related lists the invoices the note currently credits, each a typed id and a link.

A credit note absent in the caller's organisation returns 404.

unitPrice is micro-pounds and vatRate is basis points (ADR-002 section 5): integer and lossless, where the invoice still serves the same-named fields under-scaled as pence and percent, a recorded deviation reconciled at the invoice next major. availableTransitions is not served yet; it joins with the first mutating route.

Path parameters

idstringrequired

Response

200Default Response
Show response fields
contactobject
Show child attributes
idstring
linkstring
namestring
contactIdstring
createdAtstringdate-time
creditNoteNumbernullstring
creditNoteTypestring
idstring
issueDatestring
linesarray<object>
Show child attributes
accountIdnullstring
descriptionstring
idstring
lineTotalinteger
netAmountinteger
quantitystring
Quantity as a full-scale exact decimal string (NUMERIC(10,4)), for example "1.0000". Not money, not a rate.
unitPriceinteger
Unit price in integer micro-pounds, one millionth of a pound (ADR-002 section 5): GBP 500.000000 is 500000000.
vatAmountinteger
vatRateinteger
VAT rate in integer basis points, one ten-thousandth (ADR-002 section 5): 0.2000 is 2000, 0.1750 is 1750.
notesnullstring
reasonnullstring
relatedarray<object>
Show child attributes
idstring
linkstring
typestring
settlementobject
Show child attributes
allocatedTotalinteger
entriesarray<object>
Show child attributes
actorobject
amountinteger
createdAtstring
idstring
invoiceobject
isLiveboolean
reasonnullstring
reversedAtnullstring
reversedBynullstring
remaininginteger
statusstring
subtotalinteger
termsnullstring
totalinteger
updatedAtstringdate-time
vatAmountinteger
voidReasonnullstring

Error codes

400Default Response
404Default Response