Breadcrumbs

API - MES Transaction Line


Overview

The is an API to create a new line (item, quantity, pallet etc.) for a transaction header that already exists. This API is used as a child object on API - MES Transactions

Endpoint name

transactionsLines

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



This API will create entry in table “MES Transaction Line” where the header of the transaction needs to exist beforehand. See API - MES Transaction Line

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

Data

Field List

Property

Type

Max Len

Description


1

systemId

GUID


The system ID as created automatically by BC.

record id

2

transactionId

integer


The id of the Transaction

PRIMARY KEY

non-editable

3

lineNo

integer


The number of this line, within the transaction if ID = transactionId

PRIMARY KEY

non-editable

4

extReference

string

10

The sender can use it’s own reference, in order to add a line to a transaction already created.

OPTIONAL

5






6

activityDate

date


If skipped, the today’s date will be used by default.

optional

7

lotCode



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

optional

8

lastModified

date-time utc


The system populates this value automatically.

non-editable


Example Object

Expand to see the example json

An example of one object :

JSON


PASTE 1 OBJECT HERE - maybe later when all the APIs have been tested


Usage

Add a line to a transaction

Using Transaction Id

The following will create a new transaction line

JSON
POST
.../transactionLines


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

  • lineNo has value 1, which means that this is the first item line for this transaction.


Using External Reference