Skip to content

GetLocations

Returns every location of one country: the ports, yards, warehouses, offices, customer sites and other places under its cities in Geo Data. Each location comes with its code, position, addresses and location data fields. Use it to match TrakIT’s locations with the places in your own system.

How to sign in and read the response: Authentication, Responses.

GET /api/v1/GetLocations?CountryCode=KE
Token: your-token
Parameter Required Meaning
CountryCode Yes The country’s 2-letter ISO code, as in Geo Data, for example KE. Capitals do not matter.

Without CountryCode the request does not reach the endpoint, and TrakIT answers with HTTP status 404 (see Errors).

Rule Info when it fails
The Token header holds a valid token. Token missing in header, Token invalid or expired, or another answer listed in Login token
The user is a system administrator with API access. API User must be SysAdmin with API Access
CountryCode is not empty. CountryCode is required

On success, RetInfo lists the country’s locations, in order of ID, and RowsAffected is how many there are. The list includes inactive locations. Times are in UTC, without a time zone (see Dates and times).

{
"Code": 1,
"Info": "",
"RetInfo": [
{
"ID": 1204,
"Code": "KEMBA01",
"Name": "Mombasa - Port",
"CityCode": "MBA",
"Latitude": -4.067500,
"Longitude": 39.658667,
"LocalName": null,
"Addr": "1 Example Road, Mombasa",
"LocalAddr": null,
"Disabled": false,
"Data": []
},
{
"ID": 1388,
"Code": "KEMBA03",
"Name": "Mombasa - Main Yard",
"CityCode": "MBA",
"Latitude": null,
"Longitude": null,
"LocalName": null,
"Addr": null,
"LocalAddr": null,
"Disabled": false,
"Data": [
{
"FieldName": "Opening Hours",
"Value": "06:00-22:00",
"ValueID": null,
"Remarks": null,
"Updated": "2026-10-12T09:00:21.120",
"UpdatedBy": "JSMITH"
}
]
}
],
"RowsAffected": 2,
"Scalar": null,
"Identity": 0
}

The labels in bold are those of the location’s details.

Field Meaning
ID The location’s ID.
Code Code, unique across Geo Data.
Name Name, with the name of its city in front, as TrakIT shows it everywhere: for example Mombasa - Port.
CityCode The code of the city the location is in.
Latitude, Longitude The location’s position, in decimal degrees, or null when the position is not set.
LocalName Local Name, or null.
Addr, LocalAddr Address and Local Address, or null.
Disabled true when the location is inactive (Active off).
Data The location’s data fields that have been saved. An empty list if none.

Each entry of Data:

Field Meaning
FieldName The data field’s name.
Value The value, as text.
ValueID For a field that holds an entity, the entity’s ID; otherwise null.
Remarks The remarks, or null.
Updated When the value was last saved.
UpdatedBy The user ID of the user who saved it, or null for a computed field.

When the country has no locations, or no country has that code, the answer has Code 0 and Info No locations found.

The answer has every location of the country with its data fields, so for a country with many locations it can take a while. Call it when you need to refresh your list of locations, not before every other call.