API - Locations


Overview

The list page that contains the Locations, which are part of standard Business Central. Every item ledger entry must belong to one Location.

This API is non-editable so it is only possible to read data.

Endpoint name

locations

Source table

Location

Fixed view


Requests allowed

GET

Primary key

Code

Record ID

code

Procedures

None


Data

Field List

Property

Type

Format

Description


systemId

string

uuid

SystemId

non-editable

code

string

max 10

The unique id of this location.

Record ID

primary key

name

string

max 100

Name


stockCenterId

string

uuid

SystemId of the stock center in Stock Center Code


stockCenterCode

string

max 20

Stock Center Code


useTradeItems

boolean


Use Trade Items


systemRowVersion

integer


System row version. Increments every time the record is modified.

non-editable

lastModified

string

date-time

SystemModifiedAt (date and time of last change)

non-editable


Object Example

An example of one object:

JSON
{
    "code": "BLUE",
    "systemId": "57cb189f-dd11-ef11-9f8b-6045bde9cc61",
    "name": "Blue Warehouse",
    "stockCenterId": "04daea07-a0a1-ef11-b017-aa2d6f3d6955",
    "stockCenterCode": "OWN",
    "useTradeItems": true,
    "systemRowVersion": 2579455,
    "lastModified": "2025-03-31T15:44:30.543Z"
}


Examples

Read locations

Read all entries

Reads all locations. The response is a list of location objects, as shown in Object Example.

JSON
GET
.../locations

Read a specific entry

The record ID is the code of the location, so one entry is read with the code in the URL:

JSON
GET
.../locations('BLUE')

Read locations with a filter

Reads the code, name and stock center of all locations in stock center OWN that use trade items (the response is shortened).

Request:

JSON
GET .../locations?$filter=stockCenterCode eq 'OWN' and useTradeItems eq true&$select=code,name,stockCenterCode

Response:

JSON
{
    "@odata.context": "https://containers.wisefish.com/BC/api/wisefish/base/v1.0/$metadata#companies(cf9f7b85-dd11-ef11-9f8b-6045bde9cc61)/locations(code,name,stockCenterCode)",
    "value": [
        {
            "@odata.etag": "W/\"JzE5OzgzNzQ2MTkyMDM4NDc1NjEwMjkzOzAwOyc=\"",
            "code": "BLUE",
            "name": "Blue Warehouse",
            "stockCenterCode": "OWN"
        }
    ]
}