Overview
This is a list (query) of the trade items that have been consumed in production or repacking. One row is one consumed trade item, i.e. one trade item ledger entry that has been closed with closing type Usage or Repacking.
Each row shows the production lot and stage the trade item was consumed to (productionLot, productionStage) and the consumed item, lot and quantities. The query has no totals, so to get the total consumption of a production lot, sum weight, tradeItems or quantityBase over the rows of that lot.
This data can for example be used to trace from a production lot back to the raw materials, or for production reports (input).
|
Endpoint name |
|
|
Source table |
API query on |
|
Fixed view |
Only consumed trade items are listed, so there is a fixed filter on Status and Closing Type: |
|
Requests allowed |
GET |
|
Object Type |
|
|
Primary key |
None (query) |
|
Record ID |
None (query) |
|
Procedures |
None |
Note: productionStage and productionLot refer to the production the item was consumed to, while tradeItemStage, tradeItemLineNo and consumedLot refer to the consumed trade item itself.
Data
Field List
|
Property |
Type |
Format |
Description |
|
|
|---|---|---|---|---|---|
|
1 |
|
string |
max 20 |
The production lot the trade item was consumed to (field Consumed to TI Lot Code). |
|
|
2 |
|
string |
max 20 |
The stage the trade item was consumed to (field Consumed to Stage). |
|
|
3 |
|
string |
date |
Production Date of the consumed trade item, as recorded on its ledger entry. |
|
|
4 |
|
string |
date |
Date when the consumption was posted (field Posting Date (Outbound)). |
|
|
5 |
|
string |
max 20 |
Lot of the consumed trade item (field Trade Item Lot Code). |
|
|
6 |
|
string |
max 20 |
Item number of the consumed item. |
|
|
7 |
|
string |
max 100 |
Item description. |
|
|
8 |
|
string |
enum |
Item type of the item. Options: (blank), Raw Material, WIP, Product |
|
|
9 |
|
number |
decimal |
Recorded weight of the consumed trade item, in the base weight unit (field Weight (Recorded BWU)). |
|
|
10 |
|
number |
decimal |
Number of trade items consumed. The trade item unit can be different for each item. |
|
|
11 |
|
string |
max 10 |
Trade item unit of measure (field TI UoM Code). |
|
|
12 |
|
number |
decimal |
Quantity consumed, in base unit of measure (field Quantity (Base)). |
|
|
13 |
|
string |
max 10 |
Unit of Measure Code from the ledger entry. |
|
|
14 |
|
string |
max 22 |
Barcode of the consumed trade item. |
|
|
15 |
|
string |
max 20 |
Stage of the consumed trade item (field Stage). Together with |
|
|
16 |
|
integer |
|
Line No. of the consumed trade item (field Line No.). Together with |
|
Object Example
{
"productionLot": "LOT0206",
"productionStage": "PRODUCED",
"productionDate": "2026-04-07",
"postingDate": "2026-04-09",
"consumedLot": "COD-LIVER-18-12",
"itemNo": "1000",
"itemDescription": "Cod liver - untrimmed",
"itemType": "Raw Material",
"weight": 250,
"tradeItems": 25,
"tradeItemUnit": "KAR",
"quantityBase": 250,
"unitOfMeasureCode": "KG",
"tradeItemBarcode": "",
"tradeItemStage": "RECEIVED",
"tradeItemLineNo": 12
}
Examples
Read consumption entries
All consumption entries
Returns every consumed trade item. The response is a list of objects as shown in Object Example.
GET /api/wisefish/base/v1.0/companies({companyId})/consumptionentries
Consumption of a production lot
Lists the trade items that were consumed to production lot LOT0206, i.e. the input of that lot.
GET .../consumptionentries?$filter=productionLot eq 'LOT0206'
Response (shortened to one entry):
{
"@odata.context": "https://containers.wisefish.com/BC/api/wisefish/base/v1.0/$metadata#companies(f5a90234-4e79-f111-b037-cca9ad943c7c)/consumptionentries",
"value": [
{
"productionLot": "LOT0206",
"productionStage": "PRODUCED",
"productionDate": "2026-04-07",
"postingDate": "2026-04-09",
"consumedLot": "COD-LIVER-18-12",
"itemNo": "1000",
"itemDescription": "Cod liver - untrimmed",
"itemType": "Raw Material",
"weight": 250,
"tradeItems": 25,
"tradeItemUnit": "KAR",
"quantityBase": 250,
"unitOfMeasureCode": "KG",
"tradeItemBarcode": "",
"tradeItemStage": "RECEIVED",
"tradeItemLineNo": 12
}
]
}
Where a lot was consumed
Lists the production lots that raw material lot COD-LIVER-18-12 was consumed to.
GET .../consumptionentries?$filter=consumedLot eq 'COD-LIVER-18-12'
Filter and select
Consumption of an item in a period
Lists consumption of item 1000 posted in April 2026.
GET .../consumptionentries?$filter=itemNo eq '1000' and postingDate ge 2026-04-01 and postingDate le 2026-04-30
Selected fields only
Returns only the production lot, consumed item, lot and weight for raw material consumption, e.g. for a production yield report.
GET .../consumptionentries?$filter=itemType eq 'Raw Material'&$select=productionLot,itemNo,consumedLot,weight