Breadcrumbs

API - Production Consumption



Overview

This API is for posting the consumed items on Production Lots. Lines are created into the Trade Item Consumption Journal, linked to a specific production Lot. Then a user within BC needs to review the journal and post manually

If a more automated process for inventory changes is required, use the MES Transactions. See chapter Manufacturing Execution System (MES)

Endpoint name

consumptionJournalLines

Source table

WiFi Trade Item Journal Line

Fixed view

None

Requests allowed

GET, POST, PATCH, DELETE

Primary Key

"Journal Template Name", "Journal Batch Name", "Line No."

Record ID

SystemId

Procedures

None. In this version, the line is only inserted, then it needs to be posted from within BC.


Data

Field List

Some fields are marked mandatory may be skipped in the request, without getting an error, but when the line is going to be posted, the posting method will return an error.

Property

Type

Format

Description


systemId

string

uuid

The system id of the record.

Record ID

templateName

string


Needs to exist in the Trade Item Journal Templates list

primary key

batchName

string


Needs to exist in the Trade Item Journal Batches list

primary key

lineNo

integer


Line number

primary key

postingDate

date


The posting date, if skipped it will get a default value.

optional

lot

string

max 20

The production lot

MANDATORY

stage

string


The processing stage to post the consumption on.

MANDATORY

stockCenterCode

string

max 20

Stock Center, must match the lot, if lot lot has specific stock center.

MANDATORY

locationCode

string

max 10

Location Code

MANDATORY

useTradeItemStage

string

max 20

To relate to a specific trade item, the Stage

optional

useTradeItemLine

Integer


To relate to a specific trade item, the line number

optional

tradeItemBarcode

string

max 22

If the created trade item is to be barcoded.

optional

itemNumber

string

max 20

The item needs to be either a WIP item or a Product item.

MANDATORY

description

string

max 100

Description

optional

tradeItems

number


Number of trad items

MANDATORY

tradeItemUnitOfMeasure

string

max 10

The unit for the tradeItems value.

optional

quantity

number


Quantity, if given the number of trade items will be calculated.

optional

unitOfMeasure

string

max 10

The unit for the quantityvalue.

optional

lastModified

string

date-time

Timestamp of last modification

non-editable

Example Object

Expand to see the example json

An example of one object :

JSON
{
    "systemId": "a1bedbfb-6bf8-f011-b02e-b42d5a9dc7e2",
    "templateName": "OUTPUT",
    "batchName": "BOXES",
    "lineNo": 10000,
    "lot": "LANDING-LOT-1",
    "processingStage": "LANDED",
    "postingDate": "2026-01-22",
    "productionDate": "2025-12-09",
    "stockCenterCode": "FROSTI",
    "locationCode": "BLUE",
    "itemNumber": "0900",
    "description": "Þorskflök",
    "tradeItems": 20,
    "tradeItemUnitOfMeasure": "BOX",
    "quantity": 200,
    "unitOfMeasure": "KG",
    "tradeItemBarcode": "",
    "palletBarcode": "",
    "reserveToType": "Delivery",
    "reserveToNo": "",
    "reserveToLineNo": 0,
    "lastModified": "2026-01-23T14:59:00.827Z"
}


Usage

Create an output journal line

To create a new line in the journal, use POST and all necessary values.

Example:

JSON
POST .../outputJournalLines

{
    "templateName": "OUTPUT",
    "batchName": "BOXES",
    "lineNo": 30000,
    "lot": "LANDING-LOT-1",
    "processingStage": "LANDED",
    "postingDate": "2026-01-20",
    "productionDate": "2026-01-18",
    "stockCenterCode": "FROSTI",
    "locationCode": "BLUE",
    "itemNumber": "0900",
    "tradeItems": 20
}

→ Next step - or any time it suits the user - this journal needs to be posted.