Receipt type
A receipt: goods that came into one warehouse.
Fields
stockVersion
String
The document's version for confirmStockInExternalSystem. Read it, write the
document to the external system, then confirm that version. Null before the receipt has moved
any stock.
id
The receipt's MAX id.
number
String!
The receipt's number. Every returned receipt has one.
status
The receipt's status.
version
Int
The receipt's last event version, as in the events feed. Null before its first event. Also null when an event newer than this read was committed while the receipt was being read; read it again.
effectiveAt
When the goods count as received.
completedAt
When the receipt was completed. Null until it is completed.
cancelledAt
When the receipt was cancelled. Null unless it is cancelled.
revision
Int!
How many times the completed receipt has been revised. 0 when it was completed and never
revised.
warehouseId
The MAX id of the warehouse the goods came into.
warehouse
The warehouse the goods came into.
- Requires the
warehouse.readpermission. Without it, the field is null with aFORBIDDEN_ROLEerror at its path (extensions.permission). - Outside your API key's warehouse scope, the field is null with a
FORBIDDEN_SCOPEerror at its path (extensions.scopeWAREHOUSE). - In both cases the rest of the response is returned.
legalEntityId
The MAX id of the legal entity (the company) the receipt belongs to. Null when it belongs to none.
supplierId
The supplier's MAX id. Null when the receipt names no supplier.
supplier
The supplier.
- Requires the
partner.readpermission. Without it, the field is null with aFORBIDDEN_ROLEerror at its path (extensions.permission). - A supplier outside your API key's partner scope is null with a
FORBIDDEN_SCOPEerror at its path (extensions.scopePARTNER). - In both cases the rest of the response is returned.
- An erased supplier keeps its id and code, with
namenull.
origin
What the receipt was created from.
receiptAdvice
The receipt advice the receipt answers. Null for a receipt that answers none.
- Requires the
advice.readpermission. Without it, null withFORBIDDEN_ROLEat its path. - Null, without an error, when the advice is outside your API key's scope.
- The rest of the response is returned.
externalReference
String
The supplier's delivery note number or invoice number. Null, without an error, when the supplier is outside your API key's partner scope.
currencyCode
String!
The ISO 4217 code of the receipt's currency.
pricesCurrencyCode
String
The ISO 4217 code of the currency of the lines' unitPrice: the receipt advice's, or the
company's when the receipt answers none. It may differ from currencyCode. Null when the
receipt's company does not record purchase prices, and on a receipt a stocktake made.
pricesIncludeVat
Boolean
Whether the lines' unitPrice includes VAT. Null when the receipt's company does not record
purchase prices, and on a receipt a stocktake made.
totalValue
The sum of the lines' values, without VAT. Null while the costing of any line is pending. A
completed receipt can still be pending, so read it again later. When the receipt's company does
not value its stock in MAX it is 0, never pending, and means nothing; read the lines'
unitPrice instead.
It reads every stock movement of the document.
Costs 10 points.
costingPending
Boolean!
true while the costing of any line is pending. A completed receipt can still be pending, and
no event is sent when its costing finishes, so read it again later. Always false when the
receipt's company does not value its stock in MAX.
It reads every stock movement of the document.
Costs 10 points.
lines
Arguments:
first:Intafter:Stringlast:Intbefore:String
The goods lines, by line number, then id.
- A connection, paged with
first/afterorlast/before, at most 250 a page. Its cursors belong to this receipt's lines; any other connection refuses them. - Null, with an error at its path, when its page cannot be read, for example because of a cursor of another parent. The rest of the response is returned.
- A page costs 2 + first (or last) × the cost of one node.
externalRefs
Arguments:
first:Intafter:Stringlast:Intbefore:String
The records that external systems made of this receipt (setReceiptExternalRef),
at most one per external source.
- A connection, paged with
first/afterorlast/before, at most 250 a page. Its cursors belong to this receipt's references; any other connection refuses them. - Read together with the receipt: requires the
receipt.readpermission, notintegration.read. Without it, null withFORBIDDEN_ROLEat its path. - Null, with an error at its path, when its page cannot be read, for example because of a cursor of another parent. The rest of the response is returned.
- A page costs 2 + first (or last) × the cost of one node.