Overview
The is an API to create an adjustment 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 or deletion is not allowed. If a wrong entry was created, it must be deleted (with the
transactionLinesendpoint) and a new one created instead, unless it has already been processed, then it is not possible to delete it.
About Adjustment transactions
-
When an Adjustment is processed by the MES processor, either a positive or a negative adjustment is posted, depending on the sign of the Quantity field.
-
Each Adjustment transaction can have multiple lines, but all the lines must have the same sign on the Quantity field, i.e. either be positive or negative
-
If the lines are negative, the Transaction will be marked as Credit. See snapshot below, which shows both normal and credit adjustments.
-
-
Location
-
An adjustment entry needs to have a Location, it is given as a parameter. It is the location on the lines that is used for the posting.
-
The transaction’s header will automatically get the location of the first line. Transactions with mixed locations are allowed, therefore the location on the header is only for information. It cannot be empty, because else the transaction will not get through the error checks.
-
When adding lines to a transaction that already has a location in the header, the location parameter can be skipped and the line will get the location of the header by default.
-
-
Stage
-
With this endpoint, a Stage can only be set on the transaction’s header by default from field Default Stage on the Terminal card.
-
Stage is mandatory for Adjustments (but this it will not have any effect when adjusting standard items.)
-
-
Stock Center
-
With this endpoint, a Stock Center can be set on the transaction’s header by using the default Terminal card, field Default Stock Center.
-
Stock Center Code is mandatory for Adjustments (but this it will not have any effect when adjusting standard items.)
-
|
Endpoint name |
|
|
Source table |
|
|
Fixed view/defaults |
This endpoint will only create/show transactions with Type = Transfer. |
|
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 = This is set automatically as next number.. |
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. This is mandatory, but 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 |
date |
Posting date for the adjustment. |
Mandatory |
|
7 |
|
string |
max 10 |
The current location of the item / trade item. |
Mandatory |
|
8 |
|
string |
max 20 |
Item No. of the item to be adjusted. |
Mandatory |
|
9 |
|
string |
max 10 |
The lot of the item to be adjusted. |
Mandatory |
|
10 |
|
decimal |
|
|
Mandatory * |
|
11 |
|
string |
max 10 |
The unit of measure that belongs to the This can be skipped if the Terminal is marked with Populate Units Automatically. |
Mandatory * |
|
12 |
|
decimal |
|
Weight, if used, it is the weight in the base weight unit of Wisefish. |
OPTIONAL |
|
13 |
|
string |
max 20 |
Only for negative adjustments: A relation to the adjusted Trade Item can be given with |
OPTIONAL |
|
14 |
|
number |
|
Only for negative adjustments: A relation to the adjusted Trade Item can be given with |
OPTIONAL |
|
15 |
|
string |
max 22 |
Only for negative adjustments: A relation to the adjusted Trade Item can be given with it’s barcode. |
OPTIONAL |
|
16 |
|
string |
date-time |
Timestamp. |
non-editable |
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 Adjustment
-
Activity Date will be the value of property
dateor if not given, it will be set as today -
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
-
-
-
Creation of the Transaction Line:
-
Line No. is set automatically
-
Usage - TODO
Adjust one item lot by 20 KG
In this example a raw material is being adjusted:
POST
.../mesAdjustment
Body:
{
"externalReference": "08-may-a5",
"itemNo": "SALMON",
"lot": "SAL0805",
"location": "BERGEN",
"quantity": 20,
"unitOfMeasure": "KG"
}
The response has all properties of the endpoint:
{
"@odata.etag": "W/\"JzIwOzE3NDUxOTE5MDgwMjA0MjMwMzMxMTswMDsn\"",
"systemId": "06dfda4e-c94a-f111-b032-f84273c39f63",
"transactionId": 469,
"lineNo": 1,
"terminal": "INNOVA",
"externalReference": "08-MAY-A5",
"date": "2026-05-08",
"location": "BERGEN",
"itemNo": "SALMON",
"lot": "SAL0805",
"quantity": 20,
"unitOfMeasure": "KG",
"weight": 0,
"tradeItemStage": "",
"tradeItemLineNo": 0,
"tradeItemBarcode": "",
"lastModified": "2026-05-08T10:33:10.71Z"
}
Adjust a standard item stock
When using standard items, it works in the same way, except stock centers and stages are not used, even though they will appear on the Transactions.
POST
.../mesAdjustment
Body:
{
"externalReference": "08-may-std",
"itemNo": "70074",
"location": "OSLO",
"quantity": 5,
"unitOfMeasure": "STK"
}
Response:
{
"@odata.etag": "W/\"JzIwOzE3OTUxMTE3MjgwNzg5Nzk2Nzc1MTswMDsn\"",
"systemId": "07bf4b21-ca4a-f111-b032-f84273c39f63",
"transactionId": 470,
"lineNo": 1,
"terminal": "INNOVA",
"externalReference": "08-MAY-STD",
"date": "2026-05-08",
"location": "OSLO",
"itemNo": "70074",
"lot": "",
"quantity": 5,
"unitOfMeasure": "STK",
"weight": 0,
"tradeItemStage": "",
"tradeItemLineNo": 0,
"tradeItemBarcode": "",
"lastModified": "2026-05-08T10:39:03.77Z"
}