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 Use Case: 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 |
About Output transactions
-
When an Output is processed by the MES processor, inventory is created on the given location, similar as positive adjustment in BC.
-
Each Output transaction can have multiple lines, and for each line an Open Trade Item will be created
-
-
Locations
-
The locations on the lines are used for the posting, but the header will automatically get the Location of the first line. Transactions with mixed locations are allowed, because the location on the header is only for information. It should not be empty, because else the transaction will not get through the error checks.
-
When adding lines to a transaction that has a location in the header, that location will be set as a default for
fromLocation.
-
-
Stage
-
Stage is required, because it will become the Stage of the trade items.
-
The default for the Stage, comes from the Default Stage on the Terminal card.
-
-
Stock Center
-
Stock Center is also mandtory
-
The Stock Center can be set on the transaction’s header by using the default Terminal card, field Default Stock Center.
-
-
Pallet creation
-
This procedure will create a pallet, if it does not already exist
-
-
Reservation
-
Using the reserve to fields
-
Adding trade items on an already existing pallet, will
-
-
Data
Field List
|
Property |
Type |
Format |
Description |
|
|---|---|---|---|---|
|
|
string |
uuid |
The automatic system ID, which is in GUID format. |
record id non-editable |
|
|
integer |
|
The Transaction this line belongs to.
|
PRIMARY KEY OPTIONAL |
|
|
integer |
|
The sequence number of this line, within the transaction which has ID = This is set automatically as next number.. |
PRIMARY KEY non-editable |
|
|
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. This is mandatory, but if there is only one terminal, this can be set up as a default on page API Base Setup. |
OPTIONAL |
|
|
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 |
|
|
string |
max 10 |
The production lot to post this output on. |
Mandatory |
|
|
string |
date |
Production date for the items. |
Mandatory |
|
|
string |
date |
Expiration date for the items. If not given, the system will calculate it automatically. |
OPTIONAL |
|
|
string |
max 10 |
The location of the produced item / trade item. |
OPTIONAL |
|
|
string |
max 20 |
Item No. |
Mandatory |
|
|
decimal |
|
|
Mandatory * |
|
|
string |
max 10 |
The unit of measure that belongs to the |
Mandatory * |
|
|
decimal |
|
Weight, if used, it is the weight in the base weight unit of Wisefish. |
Mandatory * |
|
|
string |
max 10 |
Only to be used for irregular items, or when real weight must be registered. Or when weight is in another unit than the general weight unit of the system. If not given, it will be set as the Weight Unit of the item. |
OPTIONAL |
|
|
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 |
|
|
string |
max 22 |
If given, this will be the Trade Item Barcode on the Trade Item entry. |
OPTIONAL |
|
|
string |
max 20 |
If this trade item was put on a pallet, give the pallet barcode in this property. |
OPTIONAL |
|
|
string |
max 20 |
If the pallet has already been created, this field can be skipped. |
OPTIONAL |
|
|
string |
|
To use when this production output is for a specific document. Allowed values:
If skipped, system will try to populate this according to |
OPTIONAL |
|
|
string |
max 20 |
The document number. A production output transaction can belong to a
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 |
OPTIONAL |
|
|
string |
enum |
Used when the produced items are to be reserved directly to a sales document, which are either
If |
optional |
|
|
string |
max 20 |
Used with the field above, the number of the document. If |
optional |
|
|
integer |
|
Used with the field above, the number of the document line, if needed. If not given, the system will find a matching line. |
optional |
|
|
|
|
|
|
Example Object
Default Values
This is explained in more details in document MES Inbound - Error Handling & Validation 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
.../mesOutput
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
.../mesOutput
{
"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 Receipt.
Packages on same Pallet
Putting 2 packages on the same pallet, could be done in the following way:
POST
.../mesOutput
Create a transaction for every package, by putting the package ID into Trade
{
"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
.../mesOutput
{
"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"
}
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"
}
Reserving production for sales
Create an output and instantly reserve to a Sales document
Using the “reserve to” properties will instantly reserve the trade item after creation:
In the following example, an output is posted for 1 pallet with 32 boxes, and reserved to a sales agreement:
POST
.../mesOutput
Body:
{
"terminal": "INNOVA",
"externalReference": "PROD-09",
"productionDate": "2026-03-13",
"itemNo": "70079",
"lot": "13-03-01",
"quantity": 32,
"unitOfMeasure": "BOX",
"palletNo": "33251",
"palletBarcode": "00137300000002332510",
"reserveToDocType": "SalesAgreement",
"reserveToDocNo": "DA-001"
}
Create an output and reserve multiple items on the same sales document
In this example documentNo is used instead of reserveToDocNo - with same results.
POST
.../mesOutput
Create first entry and there give
- the sales document documentNo:
- the pallet
Body:
{
"externalReference": "0106-03",
"productionDate": "2026-05-31",
"itemNo": "70061-2",
"lot": "PROD-0106",
"quantity": 30,
"unitOfMeasure": "BOKS",
"tradeItemBarCode" : "ITEM-1",
"palletNo": "33251",
"palletBarcode": "00137300000002332510",
"documentNo": "DA-011"
}
Send another request for same reference and lot, to add another package,
- skip document, because it will be the same for all packages in the same transaction
- Use same pallet barcode
{
"externalReference": "0106-03",
"lot": "PROD-0106",
"itemNo": "70061-2",
"quantity": 30,
"unitOfMeasure": "BOKS",
"tradeItemBarCode" : "ITEM-2",
"palletNo": "33251",
"palletBarcode": "00137300000002332510",
"documentNo": "DA-011"
}
To add the third barcoded package, only change the tradeItemBarcode:
{
"externalReference": "0106-03",
"lot": "PROD-0106",
"itemNo": "70061-2",
"quantity": 30,
"unitOfMeasure": "BOKS",
"tradeItemBarCode" : "ITEM-3",
"palletNo": "33251",
"palletBarcode": "00137300000002332510",
"documentNo": "DA-011"
}
S