Company

Create company

Create a company. All companies created with 'parent' company specified are considered a subsidiary of the parent company.

SecurityApiKeyAuth and CustomAuth
Request
path Parameters
state
required
string

Lower case ANSI standard 38:2009 USPS codes of the US state where licensee is operating.

Enum: "ca" "or" "nv" "mt" "co" "mi" "il" "ma" "ri" "nj" "md" "de" "va" "oh" "ky" "al" "ms" "mn" "la" "ok" "sd" "me"
header Parameters
x-api-key
required
string

Trace API key header

Example: b123x21wbHlkYXBpa2V5
Authorization
required
string

Company and user credentials authentication

Example: KMP-JSON token=dmVuZG9yLWFwaS1rZXk6dX12312sdfs2V5
Request Body schema: application/json
name
required
string

name of company.

parent_id
string or null

This parameter allows building the company's network of peer and child/branch companies.

required
Array of objects

The main contact for this company

Array
first_name
required
string

Contact's first name

last_name
required
string

Contact's last name

email_address
required
string

Unique contact email address.

phone_number
required
string

Contact's phone number

web_site
string

The website url of the company.

Responses
200

OK

Response Schema: application/json
object
type
string
Value: "object"
object
id
string

Trace reference (entity_id) for the company.

name
string

Location name.

parent_id
string or null

This parameter allows building the company's network of peer and child/branch companies.

Array of objects

The main contacts for this company

Array
first_name
string

Contact's first name

last_name
string

Contact's last name

email_address
string

Contact’s unique email address.

phone_number
string

Contact's phone number

web_site
string

The website url of the company.

Array of objects

A list of state changes made to the entity. Entity states for Company [active, inactive, deleted].

Array
state
string

state of the entity.

date
string

timestamp when the state was recorded ISO 8601 UTC format.

reason
string

additional information for the 'state' change.

actioned_by
string

username of the person who updated the state of the entity (if applicable).

Array of objects
Array
type
string
detail
string
400

Bad Request

post/{state}/v1/config/companies
Request samples
application/json
{
  • "name": "GCV Cannabis",
  • "parent_id": "a06a7a59e8b74545a960b7c026c0e433",
  • "contacts": [
    ],
}
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [ ]
}

Retrieve company list

Gets a list of companies associated to your api key.

SecurityApiKeyAuth and CustomAuth
Request
path Parameters
state
required
string

Lower case ANSI standard 38:2009 USPS codes of the US state where licensee is operating.

Enum: "ca" "or" "nv" "mt" "co" "mi" "il" "ma" "ri" "nj" "md" "de" "va" "oh" "ky" "al" "ms" "mn" "la" "ok" "sd" "me"
query Parameters
entity_state
string

Queryable entity states for company.

Enum: "active" "inactive" "deleted"
header Parameters
x-api-key
required
string

Trace API key header

Example: b123x21wbHlkYXBpa2V5
Authorization
required
string

Company and user credentials authentication

Example: KMP-JSON token=dmVuZG9yLWFwaS1rZXk6dX12312sdfs2V5
Responses
200

OK

Response Schema: application/json
object
type
string
Value: "array"
Array of objects
Array
id
string

Trace reference (entity_id) for the company.

name
string

Company name.

parent_id
string or null

This parameter allows building the company's network of peer and child/branch companies.

Array of objects

List of physical resources managed by this company (e.g. Facilities and Vehicles)

Array
Array of objects

List of facilities belonging to the company

Array of objects

List of vehicles belonging to the company

Array of objects

List of employees managed by this company (e.g. Employees).

Array
id
string

Reference (entity_ID) for the employee.

name
string

Employee name

Array of objects

The main contacts for this company

Array
first_name
string

Contact's first name

last_name
string

Contact's last name

email_address
string

Contact’s unique email address.

phone_number
string

Contact's phone number

web_site
string

The website url of the company.

Array of objects

A list of state changes made to the entity. Entity states for Company [active, inactive, deleted].

Array
state
string

state of the entity.

date
string

timestamp when the state was recorded ISO 8601 UTC format.

reason
string

additional information for the 'state' change.

actioned_by
string

username of the person who updated the state of the entity (if applicable).

Array of objects
Array
type
string
detail
string
400

Bad Request

get/{state}/v1/config/companies
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [ ]
}

Retrieve company by {id}

Get the company details for the company {id} path parameter.

SecurityApiKeyAuth and CustomAuth
Request
path Parameters
id
required
string

Reference (entity_ID) for the company you are retrieving.

Example: 1234
state
required
string

Lower case ANSI standard 38:2009 USPS codes of the US state where licensee is operating.

Enum: "ca" "or" "nv" "mt" "co" "mi" "il" "ma" "ri" "nj" "md" "de" "va" "oh" "ky" "al" "ms" "mn" "la" "ok" "sd" "me"
header Parameters
x-api-key
required
string

Trace API key header

Example: b123x21wbHlkYXBpa2V5
Authorization
required
string

Company and user credentials authentication

Example: KMP-JSON token=dmVuZG9yLWFwaS1rZXk6dX12312sdfs2V5
Responses
200

OK

Response Schema: application/json
object
type
string
Value: "object"
object
id
string

Trace reference (entity_id) for the company.

name
string

Company name.

parent_id
string or null

This parameter allows building the company's network of peer and child/branch companies.

Array of objects

The main contacts for this company

Array
first_name
string

Contact's first name

last_name
string

Contact's last name

email_address
string

Contact’s unique email address.

phone_number
string

Contact's phone number

web_site
string

The website url of the company.

Array of objects

A list of state changes made to the entity. Entity states for Company [active, inactive, deleted].

Array
state
string

state of the entity.

date
string

timestamp when the state was recorded ISO 8601 UTC format.

reason
string

additional information for the 'state' change.

actioned_by
string

username of the person who updated the state of the entity (if applicable).

Array of objects
Array
type
string
detail
string
400

Bad Request

get/{state}/v1/config/companies/{id}
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [ ]
}

Update company

Update a company.

SecurityApiKeyAuth and CustomAuth
Request
path Parameters
id
required
string

reference (entity_ID) for the company you are updating.

Example: 6ba36fba946d4de583b2f994f6297fd8
state
required
string

Lower case ANSI standard 38:2009 USPS codes of the US state where licensee is operating.

Enum: "ca" "or" "nv" "mt" "co" "mi" "il" "ma" "ri" "nj" "md" "de" "va" "oh" "ky" "al" "ms" "mn" "la" "ok" "sd" "me"
header Parameters
x-api-key
required
string

Trace API key header

Example: b123x21wbHlkYXBpa2V5
Authorization
required
string

Company and user credentials authentication

Example: KMP-JSON token=dmVuZG9yLWFwaS1rZXk6dX12312sdfs2V5
Request Body schema: application/json
update_date
string

The UTC datetime in which the values sent in were physically changed and put into effect.

name
string

Location name.

parent_id
string or null

This parameter allows building the company's network of peer and child/branch companies.

Array of objects

The main contact for this company.

Array
first_name
string

Contact's first name

last_name
string

Contact's last name

email_address
string

Contact’s unique email address.

phone_number
string

Contact's phone number

web_site
string

The website url of the company.

Responses
200

OK

Response Schema: application/json
object
type
string
Value: "object"
object
id
string

Trace reference (entity_id) for the company.

name
string

Company name.

parent_id
string or null

This parameter allows building the company's network of peer and child/branch companies.

Array of objects

The main contacts for this company

Array
first_name
string

Contact's first name

last_name
string

Contact's last name

email_address
string

Contact’s unique email address.

phone_number
string

Contact's phone number

web_site
string

The website url of the company.

Array of objects

A list of state changes made to the entity. Entity states for Company [active, inactive, deleted].

Array
state
string

state of the entity.

date
string

timestamp when the state was recorded ISO 8601 UTC format.

reason
string

additional information for the 'state' change.

actioned_by
string

username of the person who updated the state of the entity (if applicable).

Array of objects
Array
type
string
detail
string
400

Bad Request

put/{state}/v1/config/companies/{id}
Request samples
application/json
{
  • "update_date": "2023-12-14T05:27:39Z",
  • "name": "Trace Updated Company Name",
  • "contacts": [
    ]
}
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [ ]
}

Delete company

Delete the company details.

SecurityApiKeyAuth and CustomAuth
Request
path Parameters
id
required
string

Reference (entity_ID) for the company you are deleting.

Example: 1234
state
required
string

Lower case ANSI standard 38:2009 USPS codes of the US state where licensee is operating.

Enum: "ca" "or" "nv" "mt" "co" "mi" "il" "ma" "ri" "nj" "md" "de" "va" "oh" "ky" "al" "ms" "mn" "la" "ok" "sd" "me"
header Parameters
x-api-key
required
string

Trace API key header

Example: b123x21wbHlkYXBpa2V5
Authorization
required
string

Company and user credentials authentication

Example: KMP-JSON token=dmVuZG9yLWFwaS1rZXk6dX12312sdfs2V5
Responses
200

OK

Response Schema: application/json
object
type
string
Value: "object"
object

Trace

id
string

Reference (entity_ID) for the company.

deleted
boolean

True if the company was deleted successfully, otherwise false.

Array of objects
Array
type
string
detail
string
400

Bad Request

delete/{state}/v1/config/companies/{id}
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [ ]
}