Overview
The is an API to create an output transaction in the MES transaction queue.
-
This API will create a new entry in table “MES Transaction Line”
-
The header (MES Transaction) will be created automatically, if it does not already exist
-
Modification is not allowed. If a wrong entry was created, it must be deleted and a new one created instead, unless it has already been posted, then it is not possible to delete it.
-
When an Output Transaction is processed by the MES posting routine, the trade items are created.
-> See more information about the workflow: MES Workflow - Production
|
Endpoint name |
|
|
Source table |
|
|
Fixed view/defaults |
This endpoint will only create/show transactions with Type = Receipt. |
|
Requests allowed |
|
|
Primary key |
The primary key of a transaction line is |
|
Record ID |
The record ID is |
|
Procedures |
None |
Data
Field List
|
Property |
Type |
Format |
Description |
|
|
|---|---|---|---|---|---|
|
1 |
|
string |
uuid |
The automatic system ID, which is in GUID format. |
record id non-editable |
|
2 |
|
integer |
|
The Transaction this line belongs to.
|
PRIMARY KEY OPTIONAL |
|
3 |
|
integer |
|
The sequence number of this line, within the transaction which has ID = |
PRIMARY KEY non-editable |
|
4 |
|
string |
max 10 |
The terminal will indicate from which manufacturing unit or machine this entry comes from. This could for example be one packing station. If there is only one terminal, this can be set up as a default on page API Base Setup. |
OPTIONAL |
|
5 |
|
string |
max 10 |
The sender needs to use their own reference, because every transaction needs to be unique. The same external reference can be used repeatedly in order to add an item line (for example a new package) to a transaction already created. |
Mandatory |
|
6 |
|
string |
|
Allowed values:
If skipped, system will try to populate this according to |
Mandatory * |
|
7 |
|
string |
max 20 |
An output transaction can only belong to a document which is a Production Agreement. This field shall contain the number of that agreement. The API does not check if a document with this number exists in the system. If it does not exist, the transaction will stop in the processing queue later. When adding a line to a a current Transaction, the |
Mandatory |
|
8 |
|
string |
date |
Production date for the items. |
Mandatory * |
|
9 |
|
string |
max 20 |
Item No. |
Mandatory * |
|
10 |
|
decimal |
|
|
Mandatory * |
|
11 |
|
string |
max 10 |
The unit of measure that belongs to the |
Mandatory * |
|
12 |
|
decimal |
|
Weight, if used, it is the weight in the base weight unit of Wisefish. |
Mandatory * |
|
13 |
|
decimal |
|
For some trade items, the number of pieces is given and saved on the Trade Item record. This can for example be number of fish in a box. |
OPTIONAL |
|
14 |
|
string |
max 10 |
For some receipts, the lot can be known beforehand. |
OPTIONAL |
|
15 |
|
string |
max 22 |
If given, this will be the Trade Item Barcode on the Trade Item entry. |
OPTIONAL |
|
16 |
|
string |
max 20 |
If this trade item was put on a pallet, give the pallet barcode in this property. |
OPTIONAL |
|
17 |
|
string |
max 20 |
If the pallet has already been created, this field can be skipped. |
OPTIONAL |
|
18 |
|
string |
date-time |
The system populates this value automatically. |
non-editable |
Example Object
Default Values
This is explained in more details in document https://wisefish.atlassian.net/wiki/x/AYCVKQ but the main defaults and automatic population is as follows:
-
Creation of the Transaction:
-
Type will be Output
-
Activity Date will be the
productionDateor today -
If not given, Document Type will be set automatically as Production Agreement if
documentNocontains a production agreement number. -
For this API there is no property for Stock Center or Location, these values should get their default value from any of the following tables:
-
Terminal table
-
User Profile
-
Lot
-
-
-
Creation of the Transaction Line:
-
Line No. is set automatically
-
Lot is set the same as on the Transaction
-
Usage
Create an output transaction for a single item
Using an “External Reference” that does not exist on an existing transaction, will result in the creation of a new Transaction.
In the following example, an output is posted for 20 boxes on a single pallet that is to be produced for a sales agreement:
POST
.../outputTransactions
Body:
{
"terminal": "INNOVA",
"externalReference": "PROD-09",
"productionDate": "2026-02-18",
"itemNo": "70079",
"documentNo": "DS-056",
"lot": "02-18-001",
"quantity": 20,
"unitOfMeasure": "BOX",
"palletNo": "33230",
"palletBarcode": "00137300000002332307"
}
The response will show all the properties of the endpoint:
{
"@odata.context": "https://containers.wisefish.com/BC/api/wisefish/mes/v1.0/$metadata#companies(cf9f7b85-dd11-ef11-9f8b-6045bde9cc61)/outputTransactions/$entity",
"@odata.etag": "W/\"JzIwOzExMzk0MDU5NDkyNTA2MTcwNTE5MTswMDsn\"",
"systemId": "9efafa9f-870d-f111-b02e-ed7e9281a12c",
"transactionId": 79,
"lineNo": 1,
"terminal": "INNOVA",
"externalReference": "PROD-09",
"documentType": "SalesAgreement",
"documentNo": "DS-056",
"productionDate": "2026-02-18",
"itemNo": "70079",
"quantity": 20,
"unitOfMeasure": "BOX",
"weight": 20,
"pieces": 0,
"lot": "02-18-001",
"tradeItemBarcode": "",
"palletBarcode": "00137300000002332307",
"palletNo": "33230",
"lastModified": "2026-02-19T11:39:19.21Z"
}
-
The primary key of the created transaction can be seen in property
transactionId -
The primary key of the transaction line is in 2 properties:
transactionIdandlineNo -
lineNohas value 1, which means that this is the first item line for this transaction.
Add trade item to an existing output transaction
Using Transaction ID
Posting again, with the transactionId just created, will add a new line on the same transaction.
POST
.../outputTransactions
{
"terminal": "INNOVA",
"externalReference": "PROD-09",
"productionDate": "2026-02-18",
"itemNo": "70079",
"documentNo": "DS-056",
"lot": "02-18-001",
"quantity": 10,
"unitOfMeasure": "BOX",
"palletNo": "33230",
"palletBarcode": "00137300000002332307"
}
The response shows that line number 2 has now been added:
{
"@odata.context": "https://containers.wisefish.com/BC/api/wisefish/mes/v1.0/$metadata#companies(cf9f7b85-dd11-ef11-9f8b-6045bde9cc61)/outputTransactions/$entity",
"@odata.etag": "W/\"JzE5OzI0OTY0MTczNDQ4MTcxNDkxOTExOzAwOyc=\"",
"systemId": "1ccf7c0c-880d-f111-b02e-ed7e9281a12c",
"transactionId": 79,
"lineNo": 2,
"terminal": "INNOVA",
"externalReference": "PROD-09",
"documentType": "SalesAgreement",
"documentNo": "DS-056",
"productionDate": "2026-02-18",
"itemNo": "70079",
"quantity": 10,
"unitOfMeasure": "BOX",
"weight": 10,
"pieces": "33230",
"lot": "02-18-001",
"tradeItemBarcode": "",
"palletBarcode": "00137300000002332307",
"palletNo": "33230",
"lastModified": "2026-02-19T11:42:21.143Z"
}
Then the transaction looks like this, because it has 2 item lines:
ADD SNAPSHOT OF page in BC
Using External Reference
In a similar way, the same externalReference can be used repeatedly, to add multiple lines on the same transaction. There is an example of this in documentation API - MES Receiving Transaction.
Older version (External Production app)
In the older version of the Wisefish MES this was posted in the following way with endpoint InboundInnovaEntries
POST
.../inboundInnovaEntries
{
"soapID": "107",
"packetId":5145,
"producerId": "A373" ,
"masters": 1,
"weight": 25,
"nominal": 25,
"quantity": 1,
"quantityunit": "PACK",
"itemId": "112600",
"palletNo": "S099000",
"sscc": "00137300000002332307",
"lotid": "2025-12-12",
"warehouseId": "SALT",
"productionDate": "2025-12-12T00:00:00Z",
"registrationDate": "2023-12-12T00:00:00Z"
}
For this new endpoint, the body for this same transaction would look like this:
POST
.../outputTransactions
Create a transaction for every package, by putting the package ID into externalReference
{
"terminal": "INNOVA",
"externalReference": "5145",
"productionDate": "2025-12-12",
"itemNo": "112600",
"quantity": 1,
"unitOfMeasure": "PACK",
"weight": 25,
"lot": "2025-12-12",
"palletBarcode": "00137300000002332307",
"palletNo": "S099000"
}
Then for next package, repeat this but with another "externalReference":
{
"terminal": "INNOVA",
"externalReference": "5146",
"productionDate": "2025-12-12",
"itemNo": "112600",
"quantity": 1,
"unitOfMeasure": "PACK",
"weight": 25,
"lot": "2025-12-12",
"palletBarcode": "00137300000002332307",
"palletNo": "S099000"
}
=> A transaction with one item line will be created for every pack
Another way would be to accumulate the whole pallet into one entry:
-
identify the transaction by putting the pallet number into
externalReference -
send in each package identity in the
tradeItemBarcode:
POST
.../outputTransactions
{
"terminal": "INNOVA",
"externalReference": "S099000",
"productionDate": "2025-12-12",
"itemNo": "112600",
"quantity": 1,
"unitOfMeasure": "PACK",
"weight": 25,
"lot": "2025-12-12",
"tradeItemBarcode": "5145",
"palletBarcode": "00137300000002332307",
"palletNo": "S099000"
}
{
"terminal": "INNOVA",
"externalReference": "S099000",
"productionDate": "2025-12-12",
"itemNo": "112600",
"quantity": 1,
"unitOfMeasure": "PACK",
"weight": 25,
"lot": "2025-12-12",
"tradeItemBarcode": "5146",
"palletBarcode": "00137300000002332307",
"palletNo": "S099000"
}
=> Both packs will be added as item lines on the same transaction
............................. REKJA ÞESSA
"producerId": "A373" ,
location?
Temp notes (to delete)
Ath. í gamla kerfi virkar þetta svona
PacketId er id til að þekkaj hvern pakka. Innova sendir þetta, en ekki endilega öll MES, t.d. ekki CodeIT.
Þetta var skrifaði niður í “WP Connection PK” í bæði flushed og OTI og TILE
ef ég geymi þetta bara í flushed, get ég ekki þannig fundið hvaða WP Connection PK þetta verður?
Eins og þetta er núna =>
-
Ef við setjum packetId í extReference => ef þarf að þekkja eininguna og geta rakið alveg niður á pakka, þá má bara vera eitt trade item í hverri Transaction.
-
Ef við setjum packetId í TradeItemBarcode => má safna saman í transaction