Skip to main content

Location

Locations are physical sites, facilities, or addresses where supply chain activities take place in TrackVision. They can also model sub-locations (e.g. production lines, loading docks, storage bins) by using the GLN Extension attribute.

The location Object

Locations store comprehensive information about physical places including addresses, contact details, geographical coordinates, and organizational relationships.

Field NameTypeDescription
idstringPrimary key for the location. Auto set if using GS1 IDs.
user_createdobjectUser who created the location. Read-only. Links to directus_users.
date_createddatetimeTimestamp in ISO 8601 when the location was created. Read-only.
user_updatedobjectUser who last updated the location. Read-only. Links to directus_users.
date_updateddatetimeTimestamp in ISO 8601 when the location was last updated. Read-only.
location_namestringThe name or title of the location.
third_party_locationbooleanIndicates if this is a third-party managed location.
timezonestringTimezone identifier for the location (e.g., "UTC+1").
glnstringGlobal Location Number (GLN) - the globally unique identifier for the location.
gln_extensionstringGLN extension for sub-locations or specific areas within the main location.
addressstringStreet address of the location.
citystringCity where the location is situated.
statestringState, province, or region of the location.
countystringCounty of the location.
postal_codestringPostal or ZIP code for the location.
country_codeobjectISO country code reference for the location. Links to ref_country.
primary_contact_telephonestringPrimary telephone number for the location.
primary_contact_typestringType of primary contact (e.g., "Manager", "Security", "Reception").
primary_contact_emailstringPrimary email address for the location.
primary_contact_titlestringJob title of the primary contact person.
digital_linkstringGS1 Digital Link URL for the location. Auto generated if using GS1 IDs.
custom_idstringCustom internal identifier for the location. Hidden by default on UI.
location_redirection_urlstringURL where the location should redirect when scanned.
primary_imageobjectPrimary image file for the location. Links to directus_files.
location_roleobjectJSON array defining the roles/functions of this location (e.g., FARM, MANUFACTURING_PLANT, WAREHOUSE_AND_OR_DEPOT, STORAGE_LOCATION, STORE).
parent_locationobjectReference to parent location in hierarchical structure. Links to location.
owning_organisationobjectOrganisation that owns this location. Links to organisation.
related_organisationobjectOrganisation related to or operating at this location. Links to organisation.
accountobjectAccount associated with this location. (Multi-tenant installations only)
latitudenumberGeographic latitude coordinate.
longitudenumberGeographic longitude coordinate.
mapobjectJSON object containing map-related data or configurations.
location_redirection_ruleobjectFlow rule for advanced redirection logic. Links to directus_flows.
use_gs1_identifiersbooleanWhether GS1 identifiers are used for this location.
translationsarray of objectsTranslations for multi-lingual location content.
certificationsarray of objectsCertifications associated with this location.

Sub-Objects

User Object (user_created, user_updated)

See Users for the full schema.

Account Object (account)

See Account for the full schema.

File Object (primary_image)

See Files for the full schema.

Country Object (country_code)

See Country for the full schema.

Location Object (parent_location)

See Location for the full schema.

See Organisation for the full schema.

Location Translation Object (translations)

FieldTypeDescription
idintegerUnique identifier of the translation record.
languages_codestringLanguage code for this translation (e.g., "en-US").
location_descriptionstringTranslated location description.
location_contentstringTranslated location content.

List Locations

List existing locations.

GET /items/location

Query Parameters

Supports all global query parameters.

Returns

An array of up to limit location objects. If no items are available, data will be an empty array.


Retrieve a Location

Retrieve a specific location by ID.

GET /items/location/:id

Returns

Returns a location object if a valid primary key was provided.


Create a Location

Create a new location.

POST /items/location

{
"location_name": "Jamshedpur Plant",
"third_party_location": false,
"gln": "0053893100012",
"address": "Bara PO Agrico",
"city": "Jamshedpur",
"state": "Jharkhand",
"postal_code": "831009",
"country_code": "IN",
"primary_contact_telephone": "+91(657)2210293",
"digital_link": "https://mybrand.tvai.me/414/0053893100012",
"custom_id": "IN48",
"location_redirection_url": "https://www.company.com/",
"location_role": ["MANUFACTURING_PLANT"],
"owning_organisation": "/417/0053893000008",
"latitude": 22.806756,
"longitude": 86.230829,
"map": {
"coordinates": [86.230829, 22.806756],
"type": "Point"
}
}

Query Parameters

Supports all global query parameters.

Request Body

A partial location object.

Returns

Returns the location object for the created location.


Update a Location

Update an existing location.

PATCH /items/location/:id

{
"location_name": "Jamshedpur Plant - Expanded",
"primary_contact_telephone": "+91(657)2210294",
"location_redirection_url": "https://www.company.com/locations/india/",
"location_role": ["MANUFACTURING_PLANT", "WAREHOUSE_AND_OR_DEPOT"]
}

Query Parameters

Supports all global query parameters.

Request Body

A partial location object.

Returns

Returns the location object for the updated location.


Delete a Location

Delete an existing location.

DELETE /items/location/:id

Returns

Empty body.