Organisation
Organisations represent parties in the supply chain including manufacturers, suppliers, distributors, and retailers in the TrackVision system.
The organisation Object
Organisations store information about business parties in the supply chain including company details, contact information, and relationships.
| Field Name | Type | Description |
|---|---|---|
id | string | Primary key for the organisation. Auto set if using GS1 IDs. |
user_created | object | User who created the organisation. Read-only. Links to directus_users. |
date_created | datetime | Timestamp in ISO 8601 when the organisation was created. Read-only. |
user_updated | object | User who last updated the organisation. Read-only. Links to directus_users. |
date_updated | datetime | Timestamp in ISO 8601 when the organisation was last updated. Read-only. |
organisation_name | string | The legal or trading name of the organisation. |
organisation_company_prefix | string | GS1 Company Prefix for the organisation. |
organisation_role | object | JSON array containing the role(s) this organisation plays (e.g., DISTRIBUTOR, SUPPLIER, RETAILER, MANUFACTURER_OF_GOODS). |
pgln | string | GS1 Party Global Location Number (Party GLN) for the organisation. |
custom_id | string | An optional field that can hold a non-GS1 custom ID for the org. Hidden in the UI by default. |
digital_link | string | GS1 Digital Link URL for the organisation. Auto generated if using GS1 IDs. |
organisation_redirection_url | string | URL where the organisation should redirect when scanned. |
address | string | Street address of the organisation. |
city | string | City where the organisation is located. |
state | string | State, province, or region of the organisation. |
postal_code | string | Postal or ZIP code of the organisation. |
primary_contact_telephone | string | Primary telephone number for the organisation. |
primary_contact_email | string | Primary email address for the organisation. |
primary_contact_url | string | Primary website URL for the organisation. |
use_gs1_identifiers | boolean | Whether GS1 identifiers are used for this organisation. |
country_code | object | ISO country code reference for the organisation. Links to ref_country. |
parent_organisation | object | Reference to the parent organisation in a hierarchy. Links to organisation. |
account | object | Account associated with this organisation. (Multi-tenant installations only) |
primary_image | object | Primary image file for the organisation (e.g. logo). Links to directus_files. |
organisation_redirection_rule | object | Flow rule for advanced redirection logic. Links to directus_flows. |
translations | array of objects | Translations for multi-lingual organisation content. |
certifications | array of objects | Certifications associated with this organisation. |
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.
Organisation Object (parent_organisation)
See Organisation for the full schema.
Organisation Translation Object (translations)
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier of the translation record. |
languages_code | string | Language code for this translation (e.g., "en-US"). |
organisation_description | string | Translated organisation description. |
organisation_content | string | Translated organisation content. |
List Organisations
List existing organisations.
- REST
- GraphQL
GET /items/organisation
query {
organisation {
id
organisation_name
organisation_type
gln
contact_email
contact_phone
website
address
city
country
postal_code
account {
id
name
}
logo {
id
filename_download
}
}
}
Query Parameters
Supports all global query parameters.
Returns
An array of up to limit organisation objects. If no items are available, data will be an empty array.
Retrieve an Organisation
Retrieve a specific organisation by ID.
- REST
- GraphQL
GET /items/organisation/:id
query {
organisation_by_id(id: "organisation_id") {
id
organisation_name
organisation_type
gln
registration_number
contact_email
contact_phone
website
address
city
country
postal_code
account {
id
name
}
logo {
id
filename_download
}
user_created {
id
first_name
last_name
}
date_created
user_updated {
id
first_name
last_name
}
date_updated
}
}
Returns
Returns an organisation object if a valid primary key was provided.
Create an Organisation
Create a new organisation.
- REST
- GraphQL
POST /items/organisation
{
"organisation_name": "TrackVision Solutions Ltd",
"organisation_type": "manufacturer",
"gln": "1234567890123",
"registration_number": "12345678",
"contact_email": "contact@trackvision.com",
"contact_phone": "+1-555-0123",
"website": "https://trackvision.com",
"address": "123 Business Street",
"city": "Tech City",
"country": "United States",
"postal_code": "12345",
"account": "f1b2c3d4-e5f6-7890-1234-567890abcdef"
}
mutation {
create_organisation_item(data: {
organisation_name: "TrackVision Solutions Ltd"
organisation_type: "manufacturer"
gln: "1234567890123"
registration_number: "12345678"
contact_email: "contact@trackvision.com"
contact_phone: "+1-555-0123"
website: "https://trackvision.com"
address: "123 Business Street"
city: "Tech City"
country: "United States"
postal_code: "12345"
account: "f1b2c3d4-e5f6-7890-1234-567890abcdef"
}) {
id
organisation_name
organisation_type
gln
contact_email
account {
id
name
}
}
}
Query Parameters
Supports all global query parameters.
Request Body
A partial organisation object.
Returns
Returns the organisation object for the created organisation.
Update an Organisation
Update an existing organisation.
- REST
- GraphQL
PATCH /items/organisation/:id
{
"organisation_name": "TrackVision Solutions Ltd - Updated",
"contact_email": "info@trackvision.com",
"website": "https://www.trackvision.com"
}
mutation {
update_organisation_item(id: "organisation_id", data: {
organisation_name: "TrackVision Solutions Ltd - Updated"
contact_email: "info@trackvision.com"
website: "https://www.trackvision.com"
}) {
id
organisation_name
contact_email
website
}
}
Query Parameters
Supports all global query parameters.
Request Body
A partial organisation object.
Returns
Returns the organisation object for the updated organisation.
Delete an Organisation
Delete an existing organisation.
- REST
- GraphQL
DELETE /items/organisation/:id
mutation {
delete_organisation_item(id: "organisation_id") {
id
}
}
Returns
Empty body.