Facility

Create a Facility

Create a facility. Facilities are related to a company as a physical resource.

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

Unique Facility name.

reference_id
required
string

Unique Reference ID from track and trace system.

identifier_code
required
string

Unique identifier code used by some states.

phone_number
required
string

15 character string to store phone number for the facility.

company_id
required
string

Trace Company id to associate the facility to.

timezone
required
string

Timezone facility is located in.

required
Array of objects

licenses belonging to the company

Array
license_number
required
object

License provided by the state that is associated with the facility.

address
required
object

Address of the facility

Responses
200

OK

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

Trace reference (entity_id) for the facility.

name
string

Facility name.

reference_id
string

Reference ID used in some states and assigned by the state or tracking system.

identifier_code
string

Identifier code used in some states and assigned by the state.

phone_number
string

Phone number for the Facility.

company_id
string

Trace reference for the Company that the facility is associated to.

timezone
string

Timezone for the Facility.

Array of objects
Array
license_number
string

License number associated with the Facility.

object

Address information for the Facility.

address_line_1
string

First address line. Typically contains street address.

address_line_2
string

Second address line. Typically contains suite and/or building number.

address_line_3
string

Third address line. Not commonly used.

country
string

Country the Facility resides in.

county
string

The county that the Facility resides in.

city
string

The city the Facility resides in.

state
string

The state that the Facility resides in.

zip
string

The zip code of the Facility.

gps
string

The GPS coordinates of the Facility.

Array of objects
Array
type
string
detail
string
400

Bad Request

post/{state}/v1/config/facilities
Request samples
application/json
{
  • "name": "OH Cultivation Facility",
  • "display_name": "OH CF",
  • "reference_id": 1234,
  • "identifier_code": 1234,
  • "phone_number": "123-456-7890",
  • "company_id": "3bca4bdef72849839fdf56e787a2ca40",
  • "timezone": "America/New_York",
  • "licenses": [
    ],
  • "address": {
    }
}
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [ ]
}

Retrieve Facility List

Gets a list of Facilities 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 Facility.

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 facility.

name
string

Facility name.

reference_id
string

Reference ID used in some states and assigned by the state or tracking system.

identifier_code
string

Identifier code used in some states and assigned by the state.

phone_number
string

Phone number for the Facility.

company_id
string

Trace reference for the Company that the facility is associated to.

timezone
string

Timezone for the Facility.

Array of objects
Array
license_number
string

License number associated with the Facility.

object

Address information for the Facility.

address_line_1
string

First address line. Typically contains street address.

address_line_2
string

Second address line. Typically contains suite and/or building number.

address_line_3
string

Third address line. Not commonly used.

country
string

Country the Facility resides in.

county
string

The county that the Facility resides in.

city
string

The city the Facility resides in.

state
string

The state that the Facility resides in.

zip
string

The zip code of the Facility.

gps
string

The GPS coordinates of the Facility.

Array of objects
Array
type
string
detail
string
400

Bad Request

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

Retrieve Facility by {id}

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

SecurityApiKeyAuth and CustomAuth
Request
path Parameters
id
required
string

Reference (entity_ID) for the Facility you are retrieving.

Example: f6c3a86531294b0c83eacc1104a6a680
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 facility.

name
string

Facility name.

reference_id
string

Reference ID used in some states and assigned by the state or tracking system.

identifier_code
string

Identifier code used in some states and assigned by the state.

phone_number
string

Phone number for the Facility.

company_id
string

Trace reference for the Company that the facility is associated to.

timezone
string

Timezone for the Facility.

Array of objects
Array
license_number
string

License number associated with the Facility.

object

Address information for the Facility.

address_line_1
string

First address line. Typically contains street address.

address_line_2
string

Second address line. Typically contains suite and/or building number.

address_line_3
string

Third address line. Not commonly used.

country
string

Country the Facility resides in.

county
string

The county that the Facility resides in.

city
string

The city the Facility resides in.

state
string

The state that the Facility resides in.

zip
string

The zip code of the Facility.

gps
string

The GPS coordinates of the Facility.

Array of objects
Array
type
string
detail
string
400

Bad Request

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

Update Facility

Update a Facility.

SecurityApiKeyAuth and CustomAuth
Request
path Parameters
id
required
string

reference (entity_ID) for the Facility 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.

reference_id
string

New reference_id for the existing Facility.

identifier_code
string

New identifier_code for the existing Facility.

phone_number
string

New phone number for the existing Facility.

Responses
200

OK

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

Trace reference (entity_id) for the facility.

name
string

Facility name.

reference_id
string

Reference ID used in some states and assigned by the state or tracking system.

identifier_code
string

Identifier code used in some states and assigned by the state.

phone_number
string

Phone number for the Facility.

company_id
string

Trace reference for the Company that the facility is associated to.

timezone
string

Timezone for the Facility.

Array of objects
Array
license_number
string

License number associated with the Facility.

object

Address information for the Facility.

address_line_1
string

First address line. Typically contains street address.

address_line_2
string

Second address line. Typically contains suite and/or building number.

address_line_3
string

Third address line. Not commonly used.

country
string

Country the Facility resides in.

county
string

The county that the Facility resides in.

city
string

The city the Facility resides in.

state
string

The state that the Facility resides in.

zip
string

The zip code of the Facility.

gps
string

The GPS coordinates of the Facility.

Array of objects
Array
type
string
detail
string
400

Bad Request

put/{state}/v1/config/facilities/{id}
Request samples
application/json
{
  • "update_date": "2024-01-08T11:15:01Z",
  • "phone_number": "098-765-4321"
}
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [ ]
}

Delete facility

Delete a Facility.

SecurityApiKeyAuth and CustomAuth
Request
path Parameters
id
required
string

Reference (entity_ID) for the facility you are deleting.

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
Responses
200

OK

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

Trace

id
string

Reference (entity_ID) for the Facility.

deleted
boolean

True if the Facility was deleted successfully, otherwise false.

Array of objects
Array
type
string
detail
string
400

Bad Request

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