API - Consumption Entries


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

consumptionentries

Source table

API query on WiFi Trade Item Ledger Entry

Fixed view

Only consumed trade items are listed, so there is a fixed filter on Status and Closing Type: Status = const(Closed), "Closing Type" = filter(Usage | Repacking)

Requests allowed

GET

Object Type

Query

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

productionLot

string

max 20

The production lot the trade item was consumed to (field Consumed to TI Lot Code).


2

productionStage

string

max 20

The stage the trade item was consumed to (field Consumed to Stage).


3

productionDate

string

date

Production Date of the consumed trade item, as recorded on its ledger entry.


4

postingDate

string

date

Date when the consumption was posted (field Posting Date (Outbound)).


5

consumedLot

string

max 20

Lot of the consumed trade item (field Trade Item Lot Code).


6

itemNo

string

max 20

Item number of the consumed item.


7

itemDescription

string

max 100

Item description.


8

itemType

string

enum

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


9

weight

number

decimal

Recorded weight of the consumed trade item, in the base weight unit (field Weight (Recorded BWU)).


10

tradeItems

number

decimal

Number of trade items consumed. The trade item unit can be different for each item.


11

tradeItemUnit

string

max 10

Trade item unit of measure (field TI UoM Code).


12

quantityBase

number

decimal

Quantity consumed, in base unit of measure (field Quantity (Base)).


13

unitOfMeasureCode

string

max 10

Unit of Measure Code from the ledger entry.


14

tradeItemBarcode

string

max 22

Barcode of the consumed trade item.


15

tradeItemStage

string

max 20

Stage of the consumed trade item (field Stage). Together with tradeItemLineNo it identifies the consumed trade item ledger entry.


16

tradeItemLineNo

integer


Line No. of the consumed trade item (field Line No.). Together with tradeItemStage it identifies the consumed trade item ledger entry.


Object Example

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

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

JSON
GET .../consumptionentries?$filter=productionLot eq 'LOT0206'

Response (shortened to one entry):

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

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

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

JSON
GET .../consumptionentries?$filter=itemType eq 'Raw Material'&$select=productionLot,itemNo,consumedLot,weight