Breadcrumbs

API - MES Transaction Line


Overview

This is the API to create a new line (item, quantity, pallet etc.) for a transaction header that already exists.

This endpoint can be used in two ways

  • It is linked as a child level object for the API - MES Transactions endpoint. See example below.

  • It can also be used independently, to add a single line to a Transaction that already exists.

Endpoint name

transactionLines

Source table

WiFiAPIs MES Transaction Line

Fixed view/defaults

No filter, but the table only contains lines that belong to unprocessed transactions.

Requests allowed

  • POST is used to create new entries

  • PATCH is not allowed.

  • DELETE is allowed, but if course the transaction may not be processed.

Primary key

The primary key of a transaction line is transactionId, lineNo

Record ID

systemId

Procedures

None


Data

Field List

This is a list of all properties in the object.

Property

Type

Format

Description


1

systemId

string

guid

The system ID as created automatically by BC.

record id

2

transactionId

integer


The id of the Transaction.

To create a new line, either the transactionId or the externalReference must be given, to specify on which transaction this line shall be added.

PRIMARY KEY

MANDATORY *

3

externalReference

string

max 20

To create a new line, either the transactionId or the externalReference must be given, to specify on which transaction this line shall be added.

MANDATORY *

4

lineNo

integer


The number of this line, within the transaction.

This can be given in the request, but then an error will be returned if line with that Line No. already exists.

PRIMARY KEY

OPTIONAL


5

itemNo

string

max 20

The item number is always mandatory.

MANDATORY

6

quantity

number


Either the quantity + unit must be given - or weight.

MANDATORY *

7

unitOfMeasure

string

max 10

This is mandatory if Quantity is specified.

MANDATORY *

8

weight

number


When weight is used, it is assumed that it is in the standard weight unit of the system, as set up on Wisefish Base.

MANDATORY *

9

lot

string

max 20

When all the entries belong to the same Lot, this field should be populated to enable total calculations for the lot.

optional

10

expirationDate

string

date

Expiration date, to use for receipts and output.

optional

11

tradeItemStage

string

max 20

To refer to trade items with a specific Stage.

optional

12

tradeItemLineNo

integer


To refer to a single instance of a Trade Item.

The primary key of a Trade Item is Stage + Line No.

optional

13

tradeItemBarcode

string

max 22

To refer to a single instance of a Trade Item which has the Trade Item Barcode field populated.

optional

14

palletBarcode

string

max 20

To refer to a single instance of a Pallet.

optional

15

palletNo

string

max 20

Used mainly when

optional

16

palletStatus

string

enum

Options: blank, Open, Full

optional

17

consumedLot

string

max 20

Only used for transaction of Type = Consumption

optional

18

pieces

number


Only used for transaction of Type = Output or Receipt

optional

19

tareWeight

number



optional

20

reserveToDocType

string

enum

Used when the incoming item is supposed to be linked directly to a document. Typical usage:

  • Receive a purchased item on a purchase document

  • Reserve a produced item on a sales document

Allowed values are all Document Types, but it depends on usage which values are supported. It will then be checked in the error handling phase of the processing of the transaction.

optional

21

reserveToDocNo

string

max 20

Used with the field above, the number of the document.

optional

22

reserveToLineNo

integer


Used with the field above, the number of the document line, if needed.

optional

23

lastModified

string

date-time

The system populates this value automatically.

non-editable


Regarding error handling, see document MES Transaction API Endpoints - Data Validation

Note: There are other endpoints that are specific for certain types of transactions. These document contain information about populating data for these transaction types.

API - MES Receiving Transaction

API - MES Output Transaction


Example Object

Expand to see the example json

An example of one object :

JSON
{
    "systemId": "37761187-760e-f111-b02e-bb5113db86d6",
    "transactionId": 8,
    "lineNo": 1,
    "externalReference": "",
    "itemNo": "70061-2",
    "quantity": 100,
    "unitOfMeasure": "BOKS",
    "weight": 0,
    "lot": "L26-002",
    "expirationDate": "0001-01-01",
    "tradeItemStage": "",
    "tradeItemLineNo": 0,
    "tradeItemBarcode": "",
    "palletBarcode": "",
    "palletNo": "",
    "palletStatus": " ",
    "consumedLot": "",
    "pieces": 0,
    "tareWeight": 0,
    "reserveToDocType": "None",
    "reserveToDocNo": "",
    "reserveToLineNo": 0,
    "lastModified": "2026-03-02T09:58:15.923Z"
}


Usage

Child level object of Transaction

The request is done on endpoint transactions , but the json will contain the array transactionLines which then can have all the properties listed here above.

Example:

JSON
POST
.../transactions?$expand=transactionLines

{   
    "terminal": "PACKING",
    "externalReference": "02-659",
    "type": "Output",
    "lot": "LOT-03-01",
    "transactionLines": [
        {
            "itemNo": "70064",
            "quantity": 1,
            "unitOfMeasure": "STK",
            "weight": 2,
            "palletNo": "101-1"
        },
        {
            "itemNo": "70064",
            "quantity": 2,
            "unitOfMeasure": "STK",
            "weight": 3,
            "palletNo": "101-2"
        }
    ]
}

As usually the response will show all properties of both the header and line object.


Add a line to a transaction

When used independently the header of the transaction needs to exist beforehand.

Using Transaction Id

To add a line to a transaction with a given ID, give the property transactionId.

JSON
POST
.../transactionLines

{
    "transactionId": 113,
    "itemNo": "70064",  
    "quantity": 3,
    "unitOfMeasure": "STK",
    "weight": 6,
    "palletBarcode": "00200100000000148224",
    "palletNo": "14822"
}

The response will show all fields in the table.

JSON
{
    "@odata.context": "https://containers.wisefish.com/BC/api/wisefish/base/v1.0/$metadata#companies(0c28f579-28b9-f011-af5f-6045bdacc160)/transactionLines/$entity",
    "@odata.etag": "W/\"JzIwOzEwNjU1NTgxNzI3Mjk5MTYwNzg2MTswMDsn\"",
    "systemId": "d1a8bd48-4819-f111-b02f-f89df6a2737a",
    "transactionId": 113,
    "lineNo": 3,
    "externalReference": "02-659",
    "itemNo": "70064",
    "quantity": 3,
    "unitOfMeasure": "STK",
    "weight": 6,
    "lot": "LOT-03-01",

    ...etc
} 
  • The primary key of the transaction line is in 2 properties: transactionId and lineNo

  • lineNo has value 3, which means that this was created as the 3rd line on this transaction.

  • The externalReference is automatically populated to show the value from the mother transaction.


Using External Reference

In the same way, a line can be added on a Transaction, by giving the externalReference .

JSON
POST
.../transactionLines

{
    "externalReference": "02-659",
    "itemNo": "70064",  
    "quantity": 4,
    "unitOfMeasure": "STK",
    "weight": 8.03,
    "palletBarcode": "00200100000000148224",
    "palletNo": "14822"
}

This request created the 4th line on the transaction:

JSON
{
    "@odata.context": "https://containers.wisefish.com/BC/api/wisefish/base/v1.0/$metadata#companies(0c28f579-28b9-f011-af5f-6045bdacc160)/transactionLines/$entity",
    "@odata.etag": "W/\"JzE5OzY1MjY2NTcwMjkyODIyMjg3OTkxOzAwOyc=\"",
    "systemId": "b347370c-4919-f111-b02f-f89df6a2737a",
    "transactionId": 113,
    "lineNo": 4,
    "externalReference": "02-659",
    "itemNo": "70064",
    "quantity": 4,
    "unitOfMeasure": "STK",
    "weight": 8.03,
    "lot": "LOT-03-01",

    ...etc
} 


Viewing the Data in BC

Open the page MES Transactions in BC to view the newly created transaction that is ready to be processed.

  • Field No. of Lines shows 4

  • The info box on the right shows the total weight of the 4 lines.

image-20260306-104647.png

Drilling down from No. of Lines, shows the MES Transaction Lines:

image-20260306-105008.png