API - Trade Item Lot Totals


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

tradeItemLotTotals

Source table

API query on WiFi Trade Item Ledger Entry (joined with Item)

Fixed view

None

Requests allowed

GET

Object Type

Query

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

lot

string

max 20

Lot identifier.


2

palletBarcode

string

max 20

Pallet Barcode


3

closingType

string

enum

Closing type for the ledger entry. Options: (blank), Credit, Sale, Usage, Repacking, Depreciation, Scrap, Storage


4

itemNo

string

max 20

Item number.


5

itemType

string

enum

Item type. Options: (blank), Raw Material, WIP, Product


6

variantCode

string

max 10

Variant code, if applicable.


7

itemDescription

string

max 100

Item description.


8

quantity

number

decimal

Total quantity.


9

unitOfMeasure

string

max 10

Unit of measure for the quantity.


10

tradeItems

number

decimal

Total number of trade items.


11

tradeItemUnitOfMeasure

string

max 10

Unit of measure for trade items.


12

weight

number

decimal

Total weight.


13

weightUnitOfMeasure

string

max 10

Weight Unit of Measure (from the Item)


Object Example

JSON
{
    "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:

JSON
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).

JSON
{
    "@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.

JSON
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).

JSON
GET .../tradeItemLotTotals?$filter=closingType eq 'Usage' and itemType eq 'Raw Material'