Plant_Batch

Create plant batch

Create a plant_batch for the license_number provided.

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
required
object
license_number
required
string

Reference (entity_ID) for the license. This is the business license number issued by the state.

name
required
string

The display name of the plant_batch.

barcode
required
string

A unique identifier required for specific states.

required
object

The type of the plant_batch (e.g. Clone or Seed).

id
required
string

Unique ID for the type of plant_batch

required
object

The quantity of immature plants being created in the plant_batch.

unit_of_measure
string

The unit_of_measure used for the quantity.

total
integer

The # of immature plants planted at creation of the plant_batch.

planted_date
required
string <date-time>

The timestamp of when the plant_batch was created (planted).

required
object
id
required
string

Reference (entity_ID) for the strain.

required
object

The plant_batch's origin, either plant (mother plant), plant_batch, or lot.

Array of objects or null
Array
id
string

reference (entity_ID) for the plant.

quantity
number <float>

quantity of the plant.

unit_of_measure
string

unit of measure for the quantity.

Array of objects or null
Array
id
string

Reference (entity_ID) for the plant_batch.

quantity
number <float>

The quantity of the plant_batch.

unit_of_measure
string

The unit of measure for the quantity.

Array of objects or null
Array
id
string

reference (entity_ID) for the lot.

quantity
number <float>

quantity of the lot.

unit_of_measure
string

unit of measure for the quantity.

object
id
required
string

Reference (entity_ID) for the location.

object

Additional information

patient_license
string

License number of the patient.

is_for_medical_user
boolean

True if for a medical user, false otherwise.

Responses
200

OK

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

Reference (entity_ID) for the license. This is the business license number issued by the state.

object

License type of the company/facility.

name
string

The display name of the license type.

characteristics
object

Specific information related to the license type. The presence of the characteristics' object depends on the use of the expand query parameter .

object

Last action taken on the plant_batch.

id
string

Reference (entity_id) for the plant_batch action.

name
string

Display name of the plant action

id
string

Reference (entity_ID) for the plant_batch.

name
string

The display name of the plant_batch.

barcode
string

A unique identifier required for specific states.

object

The type of the plant_batch (e.g. seeds, clones)

id
string

Unique ID for the type of plant_batch

name
string

The display name of the type of plant_batch

object

The quantities of the plant_batch (e.g. planted, tracked, untracked, harvested, and destroyed).

unit_of_measure
string

The unit_of_measure used for quantities.

total
string

The # of immature plants planted at creation of the plant_batch.

untracked
integer

The number of untracked immature plants in the plant_batch.

tracked
integer

The # of tracked immature plants from the plant_batch.

lots
integer

The # of packaged immature plants from the plant_batch.

harvested
integer

The # of harvested immature plants from the plant_batch.

object

The # of wasted immature plants from the plant_batch.

number_scheduled_for_destruction
integer

The # of immature plants scheduled for waste removal.

number_wasted
integer

The # of immature plants wasted.

planted_date
string

The timestamp of when the plant_batch was created (planted).

object
number
integer

The number of strains.

unit_of_measure
string

Unit of measure for the strains.

Array of objects

List of strains in the harvest.

Array
id
string

Trace ID for the strain.

name
string

User friendly reference for the strain.

object

The plant_batch's origin, either plant (mother plant), plant_batch, or lot.

Array of objects
Array
id
string

Unique identifier of the plant.

barcode
string

A unique identifier required for specific states.

name
string

The display name of the plant.

object

The type of the origin plant used (Seed or Clone)

quantity
number <float>

The quantity of the plant.

unit_of_measure
string

The unit of measure of the quantity.

Array of objects
Array
id
string

Reference (entity_ID) for the plant_batch.

barcode
string

Barcode of the plant_batch.

name
string

Display name of the plant_batch.

object

The type of the origin plant_batch (Seed or Clone)

quantity
integer

The quantity of immature plant_batches in the origin plant_batch.

unit_of_measure
string

The unit of measure used in the quantity.

Array of objects
Array
id
string

Reference (entity_ID) of the source lot.

barcode
string

Barcode/tag of the source lot.

name
string

User friendly reference for the lot.

object

The type of the lot that is origin to the plant_batch.

quantity
number <float>

The quantity of the lot used.

unit_of_measure
string

The unit of measure of the quantity.

object
id
string

Reference (entity_ID) for the location.

name
string

name of the location.

object

The waste events applied to the (plant, plant_batch,.)

number
integer

The number of waste events.

Array of objects
Array
id
string

The id of the waste event.

Array of objects

List of additives that have been applied to the plant.

Array
id
string

Reference (entity_ID) for the additive that was applied.

object

Additional information

patient_license
string

License number of the patient.

is_for_medical_user
boolean

True if for a medical user, false otherwise.

Array of objects

A list of state changes made to the entity. Entity states for plant_batch [ active, inactive, finished, unfinished, updated, onhold].

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/plant_batches
Request samples
application/json
{
  • "license": {
    },
  • "name": "Hathaway plant batch rejit 05122022 B5",
  • "barcode": null,
  • "type": {
    },
  • "quantity": {
    },
  • "planted_date": "2022-05-12T18:27:39Z",
  • "strain": {
    },
  • "origin": {
    },
  • "locations": {
    },
  • "additional": {
    }
}
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [
    ]
}

Retrieve plant batch(s) details

Retrieve the plant_batches details. If the id is not provided, the details of all the active plant batches for the license_number are obtained, filtered by the query parameter(s) criteria.

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"
id
required
string

Plant Batch ID

Example: a521f55de4394f4f99c282be687e63aa
query Parameters
license_number
required
string

Reference (entity_ID) for the license. This is the business license number issued by the state.

Example: license_number=ABC-1234
limit
number

Optional parameter that allows you to specify a number to limit the results in the response. Default limit is 100.

Example: limit=100
offset
number

Optional parameter that allows you to offset records if the max number for the filter exceeds the limit.

Example: offset=0
barcode
string

Plant_batch's tag that uniquely identifies it for the tracking purposes.

Example: barcode=1KMP00000000099000015442
expand
string

The expand query parameter is used to include additional information for the child objects in the plant_batch's response.

Enum: "active" "inactive" "finished" "unfinished" "updated" "onhold"
entity_state
string

Queryable entity states for plant_batch.

Enum: "inactive" "active"
start_date
string

Starting date for the time range of plant_batch's modifications. Only applicable if entity_state query parameter is used.

Example: start_date=2020-09-04
end_date
string

End date for the time range of plant_batch's modifications. Only applicable if entity_state query parameter is used.

Example: end_date=2020-09-05
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
count
string

A string representing what records you are receiving out of the total for the filter criteria.

total
number

The total number of records returned based upon filter criteria.

previous
string or null

URL that when executed will return you to the last page set.

next
string or null

URL that when executed will take you to the next set of paginated records.

object
object
license_number
string

Reference (entity_ID) for the license. This is the business license number issued by the state.

object

License type of the company/facility.

name
string

The display name of the license type.

characteristics
object

Specific information related to the license type. The presence of the characteristics' object depends on the use of the expand query parameter .

object

Last action taken on the plant_batch.

id
string

Reference (entity_id) for the plant_batch action.

name
string

Display name of the plant action

id
string

Reference (entity_ID) for the plant_batch.

name
string

The display name of the plant_batch.

barcode
string

A unique identifier required for specific states.

object

The type of the plant_batch (e.g. seeds, clones)

id
string

Unique ID for the type of plant_batch

name
string

The display name of the type of plant_batch

object

The quantities of the plant_batch (e.g. planted, tracked, untracked, harvested, and destroyed).

unit_of_measure
string

The unit_of_measure used for quantities.

total
string

The # of immature plants planted at creation of the plant_batch.

untracked
integer

The number of untracked immature plants in the plant_batch.

tracked
integer

The # of tracked immature plants from the plant_batch.

lots
integer

The # of packaged immature plants from the plant_batch.

harvested
integer

The # of harvested immature plants from the plant_batch.

object

The # of wasted immature plants from the plant_batch.

number_scheduled_for_destruction
integer

The # of immature plants scheduled for waste removal.

number_wasted
integer

The # of immature plants wasted.

planted_date
string

The timestamp of when the plant_batch was created (planted).

object
number
integer

The number of strains.

unit_of_measure
string

Unit of measure for the strains.

Array of objects

List of strains in the harvest.

Array
id
string

Trace ID for the strain.

name
string

User friendly reference for the strain.

object

The plant_batch's origin, either plant (mother plant), plant_batch, or lot.

Array of objects
Array
id
string

Unique identifier of the plant.

barcode
string

A unique identifier required for specific states.

name
string

The display name of the plant.

object

The type of the origin plant used (Seed or Clone)

quantity
number <float>

The quantity of the plant.

unit_of_measure
string

The unit of measure of the quantity.

Array of objects
Array
id
string

Reference (entity_ID) for the plant_batch.

barcode
string

Barcode of the plant_batch.

name
string

Display name of the plant_batch.

object

The type of the origin plant_batch (Seed or Clone)

quantity
integer

The quantity of immature plant_batches in the origin plant_batch.

unit_of_measure
string

The unit of measure used in the quantity.

Array of objects
Array
id
string

Reference (entity_ID) of the source lot.

barcode
string

Barcode/tag of the source lot.

name
string

User friendly reference for the lot.

object

The type of the lot that is origin to the plant_batch.

quantity
number <float>

The quantity of the lot used.

unit_of_measure
string

The unit of measure of the quantity.

object
id
string

Reference (entity_ID) for the location.

name
string

name of the location.

object

The waste events applied to the (plant, plant_batch,.)

number
integer

The number of waste events.

Array of objects
Array
id
string

The id of the waste event.

Array of objects

List of additives that have been applied to the plant.

Array
id
string

Reference (entity_ID) for the additive that was applied.

object

Additional information

patient_license
string

License number of the patient.

is_for_medical_user
boolean

True if for a medical user, false otherwise.

Array of objects

A list of state changes made to the entity. Entity states for plant_batch [ active, inactive, finished, unfinished, updated, onhold].

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/plant_batches/{id}
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [ ]
}

Update plant batch

Update the details of a plant_batch. Update growth phase and take actions (move, add waste or addtives, destroy, etc..) upon the plants for the license_number provided.

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"
id
required
string

Plant Batch ID

Example: a521f55de4394f4f99c282be687e63aa
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
required
object
license_number
required
string

Reference (entity_ID) for the license. This is the business license number issued by the state.

required
object

Specific action for this plant_batch operation.

id
required
string

Reference (entity_id) for the plant action.

name
string

The display name of the plant_batch.

barcode
string

A unique identifier required for specific states.

object

The type of the plant_batch (e.g. Clone or Seed).

id
string

Unique ID for the type of plant_batch

object

The quantity of immature plants being added to this plant_batch.

unit_of_measure
string

The unit_of_measure used for the quantity.

total
integer

The # of immature plants planted being added to the plant_batch.

planted_date
string <date-time>

The timestamp of when the plant_batch was created (planted).

additives_application_date
string <date-time>

The timestamp of when additives were applied to the plant_batch.

mother_plant_date
string <date-time>

The timestamp of when the plant_batch was first used as a mother plant.

object
id
string

Reference (entity_ID) for the strain.

object

The plant_batch's origin, either plant (mother plant), plant_batch, or lot.

Array of objects or null
Array
id
string

reference (entity_ID) for the plant.

quantity
number <float>

quantity of the plant.

unit_of_measure
string

unit of measure for the quantity.

Array of objects or null
Array
id
string

Reference (entity_ID) for the plant_batch.

quantity
number <float>

The quantity of the plant_batch.

unit_of_measure
string

The unit of measure for the quantity.

Array of objects or null
Array
id
string

reference (entity_ID) for the lot.

quantity
number <float>

quantity of the lot.

unit_of_measure
string

unit of measure for the quantity.

object
id
string

Reference (entity_ID) for the location.

move_date
string <date-time>

The timestamp of when the plant_batch was moved.

object

Additional information

patient_license
string

License number of the patient.

is_for_medical_user
boolean

True if for a medical user, false otherwise.

Array of objects

List of additives that have been applied to the plant_batch.

Array
id
string

Reference (entity_ID) for the additive.

type
string

The type of additive.

name
string

The name of the additive.

epa_number
string

The EPA registration number.

supplier
string

The supplier of the additive.

Array of objects

The active ingredients in the additive.

Array
chemical_component
string

The name of the active ingredient.

quantity
number <float>

The quantity of the ingredient in the additive added based on the unit of measure (e.g. uom == percentage and quantity == 30%).

unit_of_measure
string

The unit of measure for the active ingredient.

applied_quantity
number <float>

The quantity of the additive added to the plant/location based on the unit of measure.

applied_quantity_uom
string

The unit of measure of the additive as added to the plant or location.

application_device
string

The device used to apply the additive.

application_date
string <date-time>

The date/time the additive was applied to the plant.

Array of objects

The destroy plant events taken on this plant_batch

Array
quantity
integer

The # of plants destroyed with this event.

reason
string

The reason for the plant(s) being destroyed.

date
string

The date of the destroy event.

Responses
200

OK

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

Reference (entity_ID) for the license. This is the business license number issued by the state.

object

License type of the company/facility.

name
string

The display name of the license type.

characteristics
object

Specific information related to the license type. The presence of the characteristics' object depends on the use of the expand query parameter .

object

Last action taken on the plant_batch.

id
string

Reference (entity_id) for the plant_batch action.

name
string

Display name of the plant action

id
string

Reference (entity_ID) for the plant_batch.

name
string

The display name of the plant_batch.

barcode
string

A unique identifier required for specific states.

object

The type of the plant_batch (e.g. seeds, clones)

id
string

Unique ID for the type of plant_batch

name
string

The display name of the type of plant_batch

object

The quantities of the plant_batch (e.g. planted, tracked, untracked, harvested, and destroyed).

unit_of_measure
string

The unit_of_measure used for quantities.

total
string

The # of immature plants planted at creation of the plant_batch.

untracked
integer

The number of untracked immature plants in the plant_batch.

tracked
integer

The # of tracked immature plants from the plant_batch.

lots
integer

The # of packaged immature plants from the plant_batch.

harvested
integer

The # of harvested immature plants from the plant_batch.

object

The # of wasted immature plants from the plant_batch.

number_scheduled_for_destruction
integer

The # of immature plants scheduled for waste removal.

number_wasted
integer

The # of immature plants wasted.

planted_date
string

The timestamp of when the plant_batch was created (planted).

object
number
integer

The number of strains.

unit_of_measure
string

Unit of measure for the strains.

Array of objects

List of strains in the harvest.

Array
id
string

Trace ID for the strain.

name
string

User friendly reference for the strain.

object

The plant_batch's origin, either plant (mother plant), plant_batch, or lot.

Array of objects
Array
id
string

Unique identifier of the plant.

barcode
string

A unique identifier required for specific states.

name
string

The display name of the plant.

object

The type of the origin plant used (Seed or Clone)

quantity
number <float>

The quantity of the plant.

unit_of_measure
string

The unit of measure of the quantity.

Array of objects
Array
id
string

Reference (entity_ID) for the plant_batch.

barcode
string

Barcode of the plant_batch.

name
string

Display name of the plant_batch.

object

The type of the origin plant_batch (Seed or Clone)

quantity
integer

The quantity of immature plant_batches in the origin plant_batch.

unit_of_measure
string

The unit of measure used in the quantity.

Array of objects
Array
id
string

Reference (entity_ID) of the source lot.

barcode
string

Barcode/tag of the source lot.

name
string

User friendly reference for the lot.

object

The type of the lot that is origin to the plant_batch.

quantity
number <float>

The quantity of the lot used.

unit_of_measure
string

The unit of measure of the quantity.

object
id
string

Reference (entity_ID) for the location.

name
string

name of the location.

object

The waste events applied to the (plant, plant_batch,.)

number
integer

The number of waste events.

Array of objects
Array
id
string

The id of the waste event.

Array of objects

List of additives that have been applied to the plant.

Array
id
string

Reference (entity_ID) for the additive that was applied.

object

Additional information

patient_license
string

License number of the patient.

is_for_medical_user
boolean

True if for a medical user, false otherwise.

Array of objects

A list of state changes made to the entity. Entity states for plant_batch [ active, inactive, finished, unfinished, updated, onhold].

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/plant_batches/{id}
Request samples
application/json
{
  • "license": {
    },
  • "actions": {
    },
  • "move_date": "2022-06-26T20:29:19Z",
  • "locations": {
    }
}
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [ ]
}

Delete plant batch

Deactivate a plant_batch for the license_number provided.

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"
id
required
string

Plant Batch ID

Example: a521f55de4394f4f99c282be687e63aa
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
required
object
license_number
required
string

Reference (entity_ID) for the license. This is the business license number issued by the state.

Responses
200

OK

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

Reference (entity_ID) for the plant_batch.

deleted
boolean

True if the plant_batch was deleted successfully, otherwise false.

Array of objects
Array
type
string
detail
string
400

Bad Request

delete/{state}/v1/plant_batches/{id}
Request samples
application/json
{
  • "license": {
    }
}
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [ ]
}

Retrieve plant batch types

Retrieve a list of plant batch types

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

OK

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

Reference (entity_ID) for the plant_batch type.

name
string

Short description/name of the plant_batch type.

Array of objects
Array
type
string
detail
string
400

Bad Request

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

Retrieve plant batch actions

Retrieve the plant batch actions for a specific state

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

OK

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

Reference (entity_ID) for the plant_batch action

name
string

Display name of the action.

note
string

Additional information on this action.

Array of objects
Array
type
string
detail
string
400

Bad Request

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