Overview
The is an API to create a receiving 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
-
The properties of this API are specifically named for "reception data"
-
Modification is not allowed. If a wrong entry was created, it can be deleted and recreated, if its status allows.
-
When a Receiving Transaction is processed by the MES posting routine, the following will be modified in Wisefish:
-
If it’s a transaction linked to a Receipt Agreement, an inbound line is updated on the agreement which will create a Trade Item after posting.
-
If it’s a transaction linked to a Fishing Trip, a Trade Item will be posted for a lot that is linked to the Fishing Trip.
-
More info about the workflow, see document MES Workflow - Receiving
-
|
Endpoint name |
|
|
Source table |
|
|
Fixed view/defaults |
This endpoint will only create/show transactions with Type = Receipt. |
|
Requests allowed |
(If GET is used, it will only show lines with Transaction Type = Receipt. |
|
Primary key |
The primary key of a transaction line is |
|
Record ID |
The record ID is |
|
Procedures |
None |
Data
Field List
|
Property |
Type |
Max Len |
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. Can be used to add a line to a transaction that already has been created. If used, the transaction with this ID must already exist. It is not possible to use an ID that does not exist. |
PRIMARY KEY |
|
3 |
|
integer |
|
The number of this line, within the transaction if ID = |
PRIMARY KEY non-editable |
|
4 |
|
string |
10 |
The Terminal Code will say from which manufacturing unit this entry comes from. If there is only one terminal, this can be set up as a default. |
OPTIONAL |
|
5 |
|
string |
10 |
The sender can use it’s own reference, in order to add a line to a transaction already created. |
Mandatory |
|
6 |
|
string |
|
Allowed values:
If skipped, system will try to figure it out according to |
Mandatory * |
|
7 |
|
string |
20 |
A receiving transaction must belong to a document, these can be any of the following:
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 |
|
date |
|
The date of the receipt of the items. |
|
|
9 |
|
string |
20 |
Item No. |
Mandatory * |
|
10 |
|
decimal |
|
|
Mandatory * |
|
11 |
|
string |
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 |
10 |
For some receipts, the lot can be known beforehand. |
OPTIONAL |
|
15 |
|
string |
22 |
If given, this will be the Trade Item Barcode on the Trade Item entry. |
OPTIONAL |
|
16 |
|
string |
20 |
If this trade item was put on a pallet, give the pallet barcode in this property. |
OPTIONAL |
|
17 |
|
string |
20 |
If the pallet has already been created, this field can be skipped. |
OPTIONAL |
|
18 |
|
date-time utc |
|
The system populates this value automatically. |
non-editable |
Example Object
Automatic Fields
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 Receipt
-
Activity Date will be the
receiptDateor today -
If not given, Document Type will be set automatically after the
documentNohas been searched for in the system. -
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
-
Usage
Create a receipt transaction for a single item
Using an “External Reference” that does not exist on an existing transaction, will create a new one.
In the following example, the PR-0050 could be the number of a Receipt Agreement, and a pallet with 10 boxes is being received.
POST
.../receivingTransactions
Body:
{
"externalReference": "ID-0123",
"documentNo": "PR-0050",
"itemNo": "70079",
"quantity": 10,
"unitOfMeasure": "BOX",
"palletBarcode": "00050000000000000005"
}
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)/receivingTransactions/$entity",
"@odata.etag": "W/\"JzIwOzE1NTI3NzUwMjkzNjQ0MzE2MTM2MTswMDsn\"",
"systemId": "d13ef9f5-24df-f011-b02a-a0f00c1d9c9e",
"transactionId": 33,
"lineNo": 1,
"externalReference": "ID-0123",
"documentNo": "PR-0050",
"itemNo": "70079",
"quantity": 10,
"unitOfMeasure": "BOX",
"weight": 100,
"pieces": "",
"tradeItemBarcode": "",
"palletBarcode": "00050000000000000005",
"palletNo": "",
"lastModified": "2025-12-22T10:57:09.707Z"
}
-
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 -
documentTypewas skipped because the PR-0050 is found as Receipt Agreement -
lineNohas value 1, which means that this is the first item line for this transaction.
Add trade item to an existing receipt transaction
Using Transaction ID
Posting again, with the transactionId just created, will add a new line on the same transaction.
POST
.../receivingTransactions
{
"transactionId": 33,
"documentNo": "PR-0050",
"itemNo": "70079",
"quantity": 11.5,
"unitOfMeasure": "kg",
"palletBarcode": "00050000000000000005"
}
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)/receivingTransactions/$entity",
"@odata.etag": "W/\"JzIwOzExNzk4NzY0NzQxMTM0ODI2NzYyMTswMDsn\"",
"systemId": "552f8937-25df-f011-b02a-a0f00c1d9c9e",
"transactionId": 33,
"lineNo": 2,
"extReference": "",
"documentNo": "PR-0050",
"itemNo": "70079",
"quantity": 11.5,
"unitOfMeasure": "KG",
"weight": 11.5,
"pieces": "",
"tradeItemBarcode": "",
"palletBarcode": "00050000000000000005",
"palletNo": "",
"lastModified": "2025-12-22T10:58:59.703Z"
}
Using External Reference
In a similar way, the same externalReference can be used repeatedly, to add multiple lines on the same transaction.
POST
.../receivingTransactions
Body:
{
"extReference": "ID-0123",
"documentNo": "PR-0050",
"itemNo": "70079",
"quantity": 12.0,
"unitOfMeasure": "kg",
"palletBarcode": "00050000000000000005"
}
The response shows, that now the third line as been created on the same transaction:
{
"@odata.context": "https://containers.wisefish.com/BC/api/wisefish/mes/v1.0/$metadata#companies(cf9f7b85-dd11-ef11-9f8b-6045bde9cc61)/receivingTransactions/$entity",
"@odata.etag": "W/\"JzIwOzEzNzA2MjgyODE5NzMyMTE2NDQzMTswMDsn\"",
"systemId": "35accb2a-26df-f011-b02a-a0f00c1d9c9e",
"transactionId": 33,
"lineNo": 3,
"externalReference": "ID-0123",
"documentNo": "PR-0050",
"itemNo": "70079",
"quantity": 12,
"unitOfMeasure": "KG",
"weight": 12,
"pieces": "",
"tradeItemBarcode": "",
"palletBarcode": "00050000000000000005",
"palletNo": "",
"lastModified": "2025-12-22T11:05:47.823Z"
}
Receiving landed raw material
Create Fishing Trip
First the Fishing Trip needs to be created, if it does not already exist:
POST
.../fishingTrips
{
"landingDate": "2024-04-16",
"landingTime": "16:00",
"endDate": "2024-04-05",
"startDate": "2024-04-04",
"vessel": "2625",
"aveWeightOfFish": 3.45,
"salesPrice": 982,
}
The reponse will say what the ID of the Fishing Trip is. Let's say it would be:
{
"tripNo": "900061",
...
}
Receive raw material
Then the receivingTransactions endpoint can be used repeatedly for all the items received.
Example:
POST
.../receivingTransactions
{
"externalReference": "12345",
"documentType": "Fishing Trip",
"documentNo": "900061",
"receiptDate": "2023-08-17",
"itemNo": "001",
"weight": 1200,
"palletBarcode": "00050000000000000001"
}
...then another pallet.
{
"externalReference": "12346",
"documentType": "Fishing Trip",
"documentNo": "900061",
"receiptDate": "2023-08-17",
"itemNo": "001",
"weight": 1205,
"palletBarcode": "00050000000000000002"
}
...and third pallet, etc.
{
"externalReference": "12347",
"documentType": "Fishing Trip",
"documentNo": "900061",
"receiptDate": "2023-08-17",
"itemNo": "001",
"weight": 1998,
"palletBarcode": "00050000000000000003"
}
In older version (Inbound from Innova) this was posted in the following way:
POST
.../inboundInnovaEntries
{
"soapID": "108",
"aveWeightOfFish": 3.45,
"endDate": "2024-04-05",
"itemId": "1",
"landingDate": "2024-04-16T00:00:00Z",
"masters": 1,
"productionDate": "2023-08-17T00:00:00Z",
"registrationDate": "2024-04-15T20:10:00Z",
"salesPrice": 982,
"startDate": "2024-04-04",
"supplier": "2625",
"tripno": "900061",
"warehouseId": "RawMaterial",
"weight": 1200
}