API - Closed Trade Items


Overview

Trade Items are items that have the field “Trade Item Type” populated. The options are:

  • Raw Material

  • WIP

  • Product

The API returns the list of Trade Items that are no longer in stock, because they have been sold or used, for example.

This data ca for example be used to trace from a produced item to the raw materials.

Endpoint name

closedTradeItems

Source table

WiFi Trade Item Ledger Entry

Fixed view

The endpoint only lists item that are not in inventory any more, so there is a fixed filter on non-empty Closing Type:

where("Closing Type" = filter(<> ''));

Requests allowed

GET

Primary key

stage, number

Record ID

systemId

Procedures

None


Data

Field List

Property

Type

Format

Description


1

systemId

string

uuid

The system ID of the entry.

Record ID

2

stage

string

max 20

Each trade item was created for a specific stage.

primary key

3

lineNo

integer


Within each stage, the trade items are numbered with a sequential number.

primary key

4

itemNo

string

max 20

Item number.


5

itemDescription

string

max 50

Description from the Item card.


6

itemType

string

enum

Trade item type.


7

variantCode

string

max 20

Variant code.


8

lot

string

max 10

Lot number.


9

stockCenterCode

string

max 20

Stock center code.


10

quantityBase

number


Quantity in base unit of measure.


11

unitOfMeasureBase

string

max 10

Base unit of measure.


12

tradeItems

number


Number of trade items.


13

tradeItemUnitOfMeasure

string

max 10

Trade item unit of measure.


14

weight

number


Weight.


15

creationType

string

enum

Creation type.


16

inboundDocumentNo

string

max 20

Inbound document number.


17

inboundDocumentType

string

enum

Inbound document type.


18

inboundPostingDate

string

date

Inbound posting date.


19

vesselCode

string

max 20

Vessel code.


20

fishingAreaCode

string

max 20

Fishing area code.


21

productionDate

string

date

Production date.


22

tradeItemBarcode

string

max 22

Trade item barcode.


23

palletBarcode

string

max 20

Pallet barcode.


24

closingType

string

enum

Closing type.


25

consumedToLot

string

max 10

Consumed-to lot.


26

consumedToStage

string

max 20

Consumed-to stage.


27

outboundDocumentNo

string

max 20

Outbound document number.


28

outboundDocumentType

string

enum

Outbound document type.


29

outboundPostingDate

string

date

Outbound posting date.


30

scheduledTripNo

string

max 20

Scheduled trip number.


31

transportUnitID

integer


Transport unit ID.


32

baseCertificationProgram

string

max 20

Base certification program.


Example Object

JSON
{
    "systemId": "9e6d83c3-3637-f111-b030-c053a2f93f8a",
    "stage": "PRODUCED",
    "lineNo": 65,
    "itemNo": "70064",
    "itemDescription": "Salmon Pack of 3 boxes",
    "itemType": "Product",
    "variantCode": "",
    "lot": "CREDIT-TEST",
    "stockCenterCode": "OWN",
    "quantityBase": 3,
    "unitOfMeasureBase": "BOKS",
    "tradeItems": 1,
    "tradeItemUnitOfMeasure": "STK",
    "weight": 6,
    "creationType": "Production",
    "inboundDocumentNo": "27-0064",
    "inboundDocumentType": " ",
    "inboundPostingDate": "2026-04-09",
    "vesselCode": "",
    "fishingAreaCode": "",
    "productionDate": "2026-04-09",
    "tradeItemBarcode": "",
    "palletBarcode": "",
    "closingType": "Credit",
    "consumedToLot": "",
    "consumedToStage": "",
    "outboundDocumentNo": "",
    "outboundDocumentType": " ",
    "outboundPostingDate": "2026-04-13",
    "scheduledTripNo": "",
    "transportUnitID": 0,
    "baseCertificationProgram": ""
}

Usage

Trade Items in stock on specific Location

To get all closed trade items for item 70064:

JSON
GET ../closedTradeItems?$filter=itemNo eq '70064'