Returns the batch with the given identifier.
GET /inventory/batch-numbers/{id}
Group: Inventory › Batch Numbers · Operation ID: getBatchNumber
Returns the same fields as POST inventory/batch-numbers/search. The collection GET inventory/batch-numbers omits cost, originalCost and currency.
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 batch to return. |
Response
200 Success
Under data (getBatchNumberOutput):
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the batch. |
batchNumber |
string | no | The batch number assigned when the stock was received. It cannot be changed. |
manufacturerBatchNumber |
string | no | The manufacturer's own batch reference for this batch, where it differs from the assigned batch number. |
itemId |
string | no | The unique identifier for the item this batch is of. See id on GET inventory/items/:id. |
itemCode |
string | no | The code of that item. |
itemName |
string | no | The display name of that item. |
locationId |
string | no | The unique identifier for the warehouse holding the batch. See id on GET inventory/warehouses/:id. |
locationCode |
string | no | The code of that warehouse. |
locationName |
string | no | The display name of that warehouse. |
quantity |
string (decimal) | no | The quantity that arrived in the batch. |
inStock |
string (decimal) | no | The quantity still on hand. A status of 'QUARANTINED' or 'EXPIRED' does not reduce it. |
cost |
string (decimal) | no | The value the batch is carried at per unit, in the currency named by currency. |
originalCost |
string (decimal) | no | The value the batch was carried at per unit when it arrived, in the currency named by currency. |
currency |
string | no | The currency the cost fields are stated in. Format ISO 4217, for example 'USD'. |
expirationDate |
string (date) | no | The date the batch expires. Format YYYY-MM-DD. |
manufactureDate |
string (date) | no | The date the batch was made. Format YYYY-MM-DD. |
bestBeforeDate |
string (date) | no | The best-before date printed on the batch, which may differ from the expiry. Format YYYY-MM-DD. |
entryDate |
string (date) | no | The date the batch entered the warehouse. Format YYYY-MM-DD. |
batchStatus |
string | no | The status of the batch. Possible values: 'ACTIVE', 'QUARANTINED', 'EXPIRED', 'DISPOSED'. Only 'ACTIVE' stock can be picked, and none of the other three values reduces the quantity on hand. |
temperatureBreach |
boolean | no | Whether the batch has been outside its storage temperature range. |
qcStatus |
string | no | The tenant's own quality-control state for the batch. This is free text. |
active |
boolean | no | Whether the batch can be selected on new documents. |
createdDate |
string (date-time) | no | The date and time the batch record was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
lastModifiedDate |
string (date-time) | no | The date and time the batch record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
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