Overview
The list page that contains the Stock Centers of Wisefish. All Trade Items must belong to a stock center at every point of time.
The number series for production lot is on the stock center, therefore it has procedures to create lots, either an origin lot or a production lot.
|
Endpoint name |
|
|
Source table |
|
|
Fixed view |
|
|
Requests allowed |
GET, POST, PATCH, DELETE |
|
Primary key |
Code |
|
Record ID |
code |
|
Procedures |
|
Data
Field List
|
Property |
Type |
Format |
Description |
|
|
|
string |
max 10 |
The unique id of this stock center. |
Record ID primary key |
|
|
string |
uuid |
SystemId |
non-editable |
|
|
string |
|
Name |
mandatory |
|
|
string |
max 50 |
Address |
optional |
|
|
string |
max 50 |
Address 2 |
optional |
|
|
string |
max 20 |
Post Code |
optional |
|
|
string |
max 30 |
City |
optional |
|
|
string |
max 10 |
Country Code |
optional |
|
|
string |
max 50 |
Contact Name |
optional |
|
|
string |
|
|
optional |
|
|
string |
max 13 |
Global location number (GLN) |
optional |
|
|
string |
uuid |
Stock centers can be linked to a Vendor. Then this field will show the GUID of the Vendor. |
non-editable |
|
|
string |
max 20 |
The number of a linked Vendor |
optional |
|
|
string |
uuid |
Stock centers can be linked to a Customer. Then this field will show the GUID of the Customer. |
non-editable |
|
|
string |
max 20 |
The number of a linked Customer |
optional |
|
|
string |
enum |
Options:
|
optional |
|
|
boolean |
|
Default value is false. |
optional |
|
|
string |
|
Options:
|
optional |
|
|
string |
max 20 |
SSCC Allocation Code |
optional |
|
|
string |
enum |
Options:
|
optional |
|
|
boolean |
|
Transfer Certificate Required |
optional |
|
|
array |
json |
Certification Programs. This can be added as a child array with
|
|
|
|
integer |
|
System row version. Increments every time the record is modified. |
non-editable |
|
|
string |
date-time |
SystemModifiedAt (date and time of last change) |
non-editable |
Object Example
An example of one object:
{
"code": "OWN",
"systemId": "04daea07-a0a1-ef11-b017-aa2d6f3d6955",
"name": "Our Stock Center",
"address": "Katrínartún 4",
"address2": "",
"postCode": "105",
"city": "Reykjavik",
"countryCode": "IS",
"contact": "",
"eMail": "",
"gln": "0000123456784",
"vendorId": "00000000-0000-0000-0000-000000000000",
"vendorCode": "",
"customerId": "00000000-0000-0000-0000-000000000000",
"customerCode": "",
"stockCenterType": " ",
"itemMixOnPalletAllowed": true,
"palletBarcodeUsage": "SSCC (GS1) Nos.",
"ssccAllocationCode": "OUR",
"certificationProcess": "Single Certification",
"transferCertificateRequired": false,
"systemRowVersion": 2581230,
"lastModified": "2025-12-15T11:54:10.823Z"
}
Procedures
Procedures are called on a specific stock center: POST stockCenters('<code>')/Microsoft.NAV.<procedureName> with a JSON body of parameters. Each procedure returns the code of the record it created (a lot code or a pallet barcode) in the value property of the response, no other text. On failure it returns an error with a readable message.
|
Procedure |
Parameters |
Description |
Details |
|---|---|---|---|
|
|
|
Create an origin lot on this stock center and return the new lot code. |
|
|
|
|
Create a production lot on this stock center, active in production from the starting date, and return the new lot code. |
|
|
|
|
Create a new empty pallet on this stock center with a barcode generated according to the stock center settings, and return the barcode. |
|
|
|
|
Same as |
Lots
Create Origin Lot
Usually origin lots are created automatically by the system when received items are posted, but they could also be made beforehand.
POST
.../stockCenters([record-id])/Microsoft.NAV.createOriginLot
Body:
{
"description" : [some description],
"lotGroup" : [a code for Lot Group that exists]
}
|
Parameters |
Type |
Max Len |
Description |
|
|---|---|---|---|---|
|
|
string |
50 |
The description to put on the lot.
|
optional |
|
|
string |
20 |
If the lot is to be put into a Lot Group.
|
optional |
An entry in the table Lot is created, and the number is shown in the value property of the response.
Possible errors:
-
An error from assigning the new lot code from the number series when the lot is inserted (standard Business Central error, e.g. if the number series is missing or exhausted).
-
An error from validating the description on the lot.
-
The Lot Group given in
lotGroupdoes not exist or is not valid (standard Business Central validation error on the Group field of the lot). -
An error from validating the Stock Center Code on the lot.
-
A parameter value longer than its maximum length is rejected by Business Central (standard error).
Note: The lot gets this stock center as its Stock Center Code (replacing any value from the User Profile), a blank Production Type, a blank Default Hold Status and today as Creation Date. There are no custom error messages in this procedure; all errors come from Business Central / Wisefish validation.
Create Production Lot
Creates a lot that is active in production, starting on the given date.
POST
.../stockCenters([record-id])/Microsoft.NAV.createProductionLot
Body:
{
"description" : [some description],
"lotGroup" : [a code for a Lot Group that exists],
"startingDate": [a date]
}
|
Parameters |
Type |
Max Len |
Description |
|
|---|---|---|---|---|
|
|
string |
50 |
The description to put on the lot.
|
optional |
|
|
string |
20 |
If the lot is to be put into a Lot Group.
|
optional |
|
|
date |
|
The starting date of the lot. |
mandatory |
An entry in the table Lot is created, and the number is shown in the value property of the response.
Possible errors:
-
An error from assigning the new lot code from the number series when the lot is inserted (standard Business Central error, e.g. if the number series is missing or exhausted).
-
An error from validating the description on the lot.
-
The Lot Group given in
lotGroupdoes not exist or is not valid (standard Business Central validation error on the Group field of the lot). -
An error from validating the Stock Center Code on the lot.
-
An error from validating Production Type, Active in Production or Starting Date on the lot (standard Business Central / Wisefish validation error).
-
A parameter value longer than its maximum length is rejected by Business Central (standard error).
Note: The lot gets this stock center as its Stock Center Code, Production Type Production, Active in Production set to true, the given Starting Date, a blank Default Hold Status and NAV Inv. Production Posting Lot. There are no custom error messages in this procedure; all errors come from Business Central / Wisefish validation.
Pallets
Create Pallet Barcode
This method is used to create a new entry in the Pallet table, where the barcode is generated according to the settings on the Stock Center.
The procedure is named createPalletBarcode (not createPallet, which is the name of a separate API endpoint, createPallets).
POST
.../stockCenters([record-id])/Microsoft.NAV.createPalletBarcode
Body:
{
"location": "BLUE",
"fishingTripNo" : [if the pallet should be connected to a fishing trip]
}
|
Parameters |
Type |
Max Len |
Description |
|
|---|---|---|---|---|
|
|
string |
10 |
If left blank, the Location Code will be taken from the User Profile |
optional |
|
|
string |
20 |
Fishing Trip No. to connect the pallet to |
optional |
A barcode will be generated and an entry in the Pallet list is created. The response is the new pallet barcode in the value property, e.g. 00050000000000001101.
-
The pallet gets the current Stock Center Code.
-
Location Code must be populated, either with the parameter, or taken from the User Profile of the current user
-
Key Item No. on this pallet is blank, but will be populated when trade items are posted on the pallet.
-
Date Created is set as the date today
-
Status of the pallet is Empty
Possible errors:
-
No User Setup exists for the current user (standard Business Central error, record not found).
-
The WiFi User Profile Code on the User Setup of the current user is blank (standard Business Central TestField error).
-
The User Profile does not exist (standard Business Central error, record not found).
-
Only when
locationis blank: the Location Code on the User Profile is blank (standard Business Central TestField error). -
Pallet Barcode Usage on the stock center is not SSCC (GS1) (standard Business Central TestField error).
-
SSCC Allocation Code on the stock center is blank (standard Business Central TestField error).
-
The GS1 SSCC Allocation does not exist (standard Business Central error, record not found).
-
SSCC Circle on the GS1 SSCC Allocation is blank (standard Business Central TestField error).
-
An error from inserting the pallet, e.g. if a pallet with the generated barcode already exists (standard Business Central error).
-
A parameter value longer than its maximum length is rejected by Business Central (standard error).
Note: The barcode is always generated (it cannot be given as a parameter). The Pallet No. is derived from the barcode, and the Physical Pallet ID is set as 99 followed by characters 3-20 of the barcode. The fishing trip no., location code and item no. are not validated by this procedure.
Create Pallet With Key Item
Creates a new pallet in the same way as createPalletBarcode, and sets the given item as the key item of the pallet.
POST
.../stockCenters([record-id])/Microsoft.NAV.createPalletWithKeyItem
Body:
{
"location": "BLUE",
"fishingTripNo" : [if the pallet should be connected to a fishing trip],
"itemNo" : [the item no. of the key item]
}
|
Parameters |
Type |
Max Len |
Description |
|
|---|---|---|---|---|
|
|
string |
10 |
If left blank, the Location Code will be taken from the User Profile |
optional |
|
|
string |
20 |
Fishing Trip No. to connect the pallet to |
optional |
|
|
string |
20 |
The item no. to set as Key Item No. of the pallet |
mandatory |
A barcode will be generated and an entry in the Pallet list is created. The response is the new pallet barcode in the value property.
The pallet gets the same values as with createPalletBarcode, except that Key Item No. is set to itemNo.
Possible errors: the same as for createPalletBarcode (see Create Pallet Barcode).
Examples
Read stock centers
Read all entries
Reads all stock centers. The response is a list of stock center objects, as shown in Object Example.
GET
.../stockCenters
Read a specific entry
Reads one stock center by its Record ID (code).
GET
.../stockCenters('OWN')
Read stock centers of a given type
For example, to read all stock centers that are external producers:
GET .../stockCenters?$filter=stockCenterType eq 'External Producer'
Read a stock center with its certification programs
Reads stock center OWN with its certification programs as a child array.
GET .../stockCenters('OWN')?$expand=certificationPrograms
Create lots
Create an origin lot on a stock center
Creates an origin lot on stock center OWN in Lot Group WEEK-1 using createOriginLot.
POST .../stockCenters('OWN')/Microsoft.NAV.createOriginLot
{
"description" : "Received items",
"lotGroup" : "WEEK-1"
}
Response:
{
"@odata.context": "https://containers.wisefish.com/BC/api/wisefish/base/v1.0/$metadata#Edm.String",
"value": "LOT0206"
}
Create an origin lot with default values
Creates an origin lot on stock center OWN without parameters; the description is set to “Origin lot”.
Request:
POST
.../stockCenters('OWN')/Microsoft.NAV.createOriginLot
Body:
{
}
Response:
{
"@odata.context": "https://containers.wisefish.com/BC/api/wisefish/base/v1.0/$metadata#Edm.String",
"value": "LOT0208"
}
Create a production lot on a stock center
Creates a production lot on stock center OWN starting 2 December 2025 using createProductionLot.
POST .../stockCenters('OWN')/Microsoft.NAV.createProductionLot
{
"startingDate": "2025-12-02",
"description": "Production 2nd Dec - 2",
"lotGroup": "Arna"
}
Response:
{
"@odata.context": "https://containers.wisefish.com/BC/api/wisefish/base/v1.0/$metadata#Edm.String",
"value": "LOT0207"
}
Create pallets
Create a pallet with a generated barcode
Creates an empty pallet on stock center OWN at location BLUE using createPalletBarcode.
Request:
POST
.../stockCenters('OWN')/Microsoft.NAV.createPalletBarcode
Body:
{
"location": "BLUE"
}
Response:
{
"@odata.context": "https://containers.wisefish.com/BC/api/wisefish/base/v1.0/$metadata#Edm.String",
"value": "00050000000000001101"
}
Create a pallet connected to a fishing trip
Creates a pallet on stock center OWN connected to fishing trip FT-0012; the location is taken from the User Profile.
Request:
POST
.../stockCenters('OWN')/Microsoft.NAV.createPalletBarcode
Body:
{
"fishingTripNo": "FT-0012"
}
Response:
{
"@odata.context": "https://containers.wisefish.com/BC/api/wisefish/base/v1.0/$metadata#Edm.String",
"value": "00050000000000001118"
}
Create a pallet with a key item
Creates a pallet on stock center OWN at location BLUE with key item 1000 using createPalletWithKeyItem.
Request:
POST
.../stockCenters('OWN')/Microsoft.NAV.createPalletWithKeyItem
Body:
{
"location": "BLUE",
"itemNo": "1000"
}
Response:
{
"@odata.context": "https://containers.wisefish.com/BC/api/wisefish/base/v1.0/$metadata#Edm.String",
"value": "00050000000000001125"
}