Returns the landed cost with the given identifier.
GET /inventory/landed-costs/{id}
Group: Inventory › Landed Costs · Operation ID: getLandedCost
Returns one landed cost whole: the header, the receipts in scope with their lines, the charges being capitalized, and the allocation computed from them.
allocationLines is the answer to the question the landed cost exists to ask, what each receipt line's unit cost becomes. It is recomputed on every create and update, so what you read is always current. There is no separate preview.
On a committed landed cost, each allocation line also names the inventory revaluations it produced, under revaluationDocuments. Those are the documents that moved the value, and they are what a reversal would have to address. A draft's are empty.
This is the same item schema the search endpoint returns. The collection endpoint returns the header fields only.
Open in the interactive reference
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Api-Version |
header | "v1" |
yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1. |
id |
path | string | yes | The unique identifier for the landed cost to return. |
Response
200 Success
Under data (getLandedCostOutput):
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the landed cost. |
documentNumber |
string | no | The landed cost number, for example 'LC-1007'. Assigned when the landed cost is created. |
documentStatus |
string | yes | The status of the landed cost. It is DRAFT while it is being built and COMMITTED once you commit it with POST inventory/landed-costs/:id/commit. |
documentDate |
string (date) | no | The date of the landed cost. Format YYYY-MM-DD. |
entityId |
string | no | The legal entity the landed cost belongs to. It decides the functional currency that every amount is in. |
entityName |
string | no | The name of that legal entity. |
currency |
string | no | The currency of the landed cost's amounts. Format ISO 4217, for example 'GBP'. This is the entity's functional currency, and nothing converts the amounts. |
notes |
string | no | Free text on the landed cost. |
totalChargeAmount |
string (decimal) | no | The total of the selected charges, in the landed cost's currency. |
receiptCount |
number | no | The number of receipts in scope. |
chargeCount |
number | no | The number of charges on the landed cost. |
allocationLineCount |
number | no | The number of allocation lines, one per selected receipt line. |
createdDate |
string (date-time) | no | The date and time the landed cost was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
lastModifiedDate |
string (date-time) | no | The date and time the landed cost last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
receipts |
array of object | no | The receipts whose stock the charges are capitalized onto, each with the lines in scope. |
receipts[].id |
string | yes | The receipt this scope entry is for. See id on GET inventory/receipts/:id. |
receipts[].receiptNumber |
string | no | The receipt's number. |
receipts[].documentDate |
string (date) | no | The date of the receipt. Format YYYY-MM-DD. |
receipts[].documentStatus |
string | no | The receipt's status. Always COMMITTED, because a landed cost cannot name a receipt that has not been committed. |
receipts[].lines |
array of object | no | Every line of that receipt, each showing whether this landed cost allocates onto it. A line that is not selected takes none of the charge. |
receipts[].lines[].id |
string | yes | The receipt line. This is what selectedLineIds names on create and update. See id under lines on GET inventory/receipts/:id. |
receipts[].lines[].isSelected |
boolean | no | Whether this landed cost allocates onto the line. |
receipts[].lines[].itemId |
string | no | The item received on the line. |
receipts[].lines[].itemCode |
string | no | The short code of that item. |
receipts[].lines[].itemName |
string | no | The name of that item. |
receipts[].lines[].locationId |
string | no | The warehouse it was received into. |
receipts[].lines[].quantity |
string (decimal) | no | The quantity received, in the line's unit. |
receipts[].lines[].inventoryQuantity |
string (decimal) | no | The same quantity in the item's stocking unit. |
receipts[].lines[].unitPrice |
string (decimal) | no | The price the line was received at, per unit, in the landed cost's currency. |
receipts[].lines[].lineTotal |
string (decimal) | no | The total for the line, in the landed cost's currency. |
charges |
array of object | no | The charges being capitalized, one per vendor bill line. |
charges[].id |
string | yes | The vendor bill line the charge comes from. See id on GET inventory/landed-costs/vendor-bill-lines. |
charges[].vendorBillId |
string | no | The vendor bill the charge belongs to. Derived from the line, never supplied. See id on GET accounting/vendor-bills/:id. |
charges[].vendorBillNumber |
string | no | The vendor bill's number. |
charges[].itemId |
string | no | The item the charge is billed as, where it is billed as one. |
charges[].itemCode |
string | no | The short code of that item. |
charges[].itemName |
string | no | The name of that item. |
charges[].allocationMode |
string | no | How this charge is spread over the receipt lines. Possible values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'. |
charges[].amount |
string (decimal) | no | The amount of the charge this landed cost takes, in the landed cost's currency. |
charges[].allocatedAmount |
string (decimal) | no | The amount of the charge that has actually been allocated. Filled in when you commit the landed cost. |
charges[].isSelected |
boolean | no | Whether this charge is included. An excluded charge is kept on the landed cost and allocated nothing. |
allocationLines |
array of object | no | The computed allocation: one line per selected receipt line, saying what its unit cost becomes. Recomputed on every write, so it is always current. |
allocationLines[].id |
string | yes | The unique identifier for the allocation line within the landed cost. |
allocationLines[].receiptId |
string | no | The receipt this allocation line belongs to. See id on GET inventory/receipts/:id. |
allocationLines[].receiptLineId |
string | no | The receipt line this allocation lands on. See id under lines on GET inventory/receipts/:id. |
allocationLines[].itemId |
string | no | The item. |
allocationLines[].itemCode |
string | no | The short code of that item. |
allocationLines[].itemName |
string | no | The name of that item. |
allocationLines[].locationId |
string | no | The warehouse. |
allocationLines[].locationCode |
string | no | The short code of that warehouse. |
allocationLines[].quantity |
string (decimal) | no | The quantity the allocation is spread over. |
allocationLines[].currentUnitCost |
string (decimal) | no | The unit cost of the stock before the landed cost commits. |
allocationLines[].additionalCostAmount |
string (decimal) | no | The share of the charges this line takes, in total, not per unit. |
allocationLines[].newUnitCost |
string (decimal) | no | The unit cost of the stock after the landed cost commits. |
allocationLines[].revaluationDocuments |
array of object | no | The inventory revaluations this allocation line produced. An empty array on a draft, and more than one where the charges post to different expense accounts. |
allocationLines[].revaluationDocuments[].id |
string | yes | The inventory revaluation. See id on GET inventory/inventory-revaluations/:id. |
allocationLines[].revaluationDocuments[].documentNumber |
string | no | The revaluation's number. |
allocationLines[].revaluationDocuments[].documentStatus |
string | no | The revaluation's status. |
Errors
| Code | Status |
|---|---|
NOT_FOUND |
400 |
Statuses
400— Invalid request or business failure. Codes: NOT_FOUND401— Missing or invalid access token403— Not authorized404— Not found429— Too many requests500— Internal server error