Overview
This is a summary list (query) with totals per
-
Item No.
-
Lot
-
Closing Type
-
Variant
The API returns the total quantity for the dimensions above.
|
Endpoint name |
|
|
Source table |
API query on |
|
Fixed view |
None |
|
Requests allowed |
GET |
|
Object Type |
|
|
Primary key |
None (query) |
|
Record ID |
None (query; totals are grouped by the non-summed columns) |
|
Procedures |
None |
Note: the totals are also grouped by the other non-summed columns, i.e. palletBarcode, itemType, itemDescription and the units of measure. A lot that is on several pallets therefore returns one row per pallet (and closing type).
Data
Field List
|
Property |
Type |
Format |
Description |
|
|
|---|---|---|---|---|---|
|
1 |
|
string |
max 20 |
Lot identifier. |
|
|
2 |
|
string |
max 20 |
Pallet Barcode |
|
|
3 |
|
string |
enum |
Closing type for the ledger entry. Options: (blank), Credit, Sale, Usage, Repacking, Depreciation, Scrap, Storage |
|
|
4 |
|
string |
max 20 |
Item number. |
|
|
5 |
|
string |
enum |
Item type. Options: (blank), Raw Material, WIP, Product |
|
|
6 |
|
string |
max 10 |
Variant code, if applicable. |
|
|
7 |
|
string |
max 100 |
Item description. |
|
|
8 |
|
number |
decimal |
Total quantity. |
|
|
9 |
|
string |
max 10 |
Unit of measure for the quantity. |
|
|
10 |
|
number |
decimal |
Total number of trade items. |
|
|
11 |
|
string |
max 10 |
Unit of measure for trade items. |
|
|
12 |
|
number |
decimal |
Total weight. |
|
|
13 |
|
string |
max 10 |
Weight Unit of Measure (from the Item) |
|
Object Example
{
"lot": "L26-001",
"palletBarcode": "",
"closingType": "Usage",
"itemNo": "100",
"itemType": "Raw Material",
"variantCode": "",
"itemDescription": "Cod (raw material catch)",
"quantity": 100,
"unitOfMeasure": "KG",
"tradeItems": 100,
"tradeItemUnitOfMeasure": "KG",
"weight": 100,
"weightUnitOfMeasure": "KG"
}
Examples
Read totals
Totals for a selected Item and Lot
To get all lots, both in stock and gone, for item 001 and a certain lot:
Request:
GET ../tradeItemLotTotals?$filter=itemNo eq '001' and lot eq '2608000008'
The following response shows that there are 20 kg still in stock, but 480 have been used (consumed to production lots).
{
"@odata.context": "https://containers.wisefish.com/BC/api/wisefish/base/v1.0/$metadata#companies(f5a90234-4e79-f111-b037-cca9ad943c7c)/tradeItemLotTotals",
"value": [
{
"lot": "2608000008",
"palletBarcode": "",
"closingType": " ",
"itemNo": "001",
"itemType": "Raw Material",
"variantCode": "",
"quantity": 20,
"unitOfMeasure": "KG",
"tradeItems": 20,
"tradeItemUnitOfMeasure": "KG",
"weight": 20,
"itemDescription": "Cod",
"weightUnitOfMeasure": "KG"
},
{
"lot": "2608000008",
"palletBarcode": "",
"closingType": "Usage",
"itemNo": "001",
"itemType": "Raw Material",
"variantCode": "",
"quantity": 480,
"unitOfMeasure": "KG",
"tradeItems": 480,
"tradeItemUnitOfMeasure": "KG",
"weight": 480,
"itemDescription": "Cod",
"weightUnitOfMeasure": "KG"
}
]
}
Totals for all lots of a selected Item
Returns the totals of every lot of item 001, both in stock (blank closingType) and gone. The response is a list of total objects, as in the example above.
GET .../tradeItemLotTotals?$filter=itemNo eq '001'
Raw material consumed in production
Returns the totals of raw material that has been consumed to production lots (one row per item, lot, pallet and variant).
GET .../tradeItemLotTotals?$filter=closingType eq 'Usage' and itemType eq 'Raw Material'