Harvest

Create harvest

Create a harvest 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

User friendly reference for the harvest.

required
object

Start and end dates of the harvest.

start
required
string

Timestamp date of the start of this harvest in ISO 8601 UTC format

end
required
string

Timestamp date of the end of this harvest in ISO 8601 UTC format

required
object
id
string

Reference (entity_ID) for the harvests type

required
object

The strains in the Harvest

number
required
integer

The number of strains

Array of objects

Harvest strain (s). Note: Some state's require harvests to be made up of only one strain. Please review your state's guidelines.

Array
id
required
string

Reference (entity_ID) for the strain.

Array of objects

List of weights for the harvest.

Array
object
object
quantity
number

Current quantity

unit_of_measure
string

Unit of measure for the weight.

object
quantity
number

Current quantity

unit_of_measure
string

Unit of measure for the weight.

object
object
quantity
number

Current quantity

unit_of_measure
string

Unit of measure for the weight.

object
quantity
number

Current quantity

unit_of_measure
string

Unit of measure for the weight.

Array of objects

Plants that are in the harvest with weights.

Array
id
string

Unique identifier of the plant.

date
string

Timestamp date of harvest event.

Array of objects

Weights from the plant used in the harvest

Array
object
object
required
object
required
object

Location of the harvest during curing

id
string

Trace Location ID where the harvest will be stored for curing.

object

Location of the harvest lots made during the harvest process. Only applicable in Biotrack states.

id
string

Trace Location ID where the plant material lot will go during harvest.

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 this harvest.

id
string

Reference (entity_ID) for the harvest action.

name
string

Display name of the harvest action.

id
string

Reference (entity_ID) for the harvest.

name
string

User friendly reference for the harvest.

object

Start and end dates of the harvest.

start
string

Timestamp date of the start of this harvest in ISO 8601 UTC format

end
string

Timestamp date of the end of this harvest in ISO 8601 UTC format

object
id
string

Reference (entity_ID) for the harvests type

object

The strains in the harvest.

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. Note: Some state's require harvests to be made up of only one strain. Please review your state's guidelines.

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

object

Total aggregates for Harvest components, such as the number of plants in the harvest and the total weight of harvested material.

object
number
integer

Number of plants in the harvest

unit_of_measure
string

The unit of measure of the number of plants.

object
number
integer

Total number of harvests.

object
object
object
object
object

Harvest's cure information.

number
integer

Number of cures in the harvest.

Array of objects

Cure event data of the harvest

Array
id
string

Unique identifier for the cure event

name
string

Display name for the cure event

object

The cure drying time

object

The temperature

object

The humidity info of the cure

date
string

Timestamp date of the cure event

object
Array of objects

Plants that are in the harvest

Array
id
string

Unique identifier of the plant

name
string

Name of the plant.

barcode
string

Unique identifier for tracking purposes.

date
string

Growth date of the plant in ISO 8601 UTC format.

object

Distribution of weights for the individual plant.

object

Waste removal event.

quantity
integer

Amount of waste removed.

unit_of_measure
number

Unit of measure used for quantity

object

The lot information for the harvest

number
integer

Number of lots ....

quantity
integer

Amount ....

unit_of_measure
number

Unit of measure used for quantity

Array of objects

Lots in the harvest

Array
id
string

Unique identifier for the lot

name
string

Display name for the lot

barcode
string

Barcode of the lot

quantity
number

Quantity of the lot.

unit_of_measure
string

Unit of measure of the quantity

date
string

Timestamp date of the lot

object
object
object
object
id
string

Reference (entity_ID) for the location.

name
string

name of the location.

object

Type of the location.

object
id
string

Reference (entity_ID) for the location.

name
string

name of the location.

object

Type of the location.

object

Products that are created

object
object
object
object
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 harvest [ active, inactive, curing, cured, updated, finished, unfinished, onhold, lab_testing_not_submitted, lab_testing_submitted, lab_testing_in_progress, lab_testing_awaiting_confirmation, lab_testing_passed, lab_testing_failed, lab_retesting_in_progress, lab_retest_passed, lab_retest_failed, used, waste_removed].

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/harvests
Request samples
application/json
{
  • "license": {
    },
  • "name": "Tomino amuro kamui 06122022 manicure A02",
  • "harvest_date": {
    },
  • "type": {
    },
  • "strain": {
    },
  • "weights": null,
  • "plants": [
    ],
  • "locations": {
    },
  • "products": null,
  • "additional": {
    }
}
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [
    ]
}

Retrieve harvest(s) details

Retrieve the harvest details. If the id is not provided, the details of all the active harvests 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

Harvest 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
name
string

Display name of the harvest.

Example: name=Harvest strain 06122022 manicure A02
expand
string

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

Enum: "cure" "waste" "lots" "all"
entity_state
string

Queryable entity states for plant. Inactive will return harvested, destroyed, and/or deleted harvests.

Enum: "active" "inactive" "curing" "cured" "updated" "finished" "unfinished" "onhold" "lab_testing_not_submitted" "lab_testing_submitted" "lab_testing_in_progress" "lab_testing_awaiting_confirmation" "lab_testing_passed" "lab_testing_failed" "lab_retesting_in_progress" "lab_retest_passed" "lab_retest_failed"
start_date
string

Starting date for the time range of harvest's modifications.

Example: start_date=2020-09-04
end_date
string

End date for the time range of harvest's modifications.

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 this harvest.

id
string

Reference (entity_ID) for the harvest action.

name
string

Display name of the harvest action.

id
string

Reference (entity_ID) for the harvest.

name
string

User friendly reference for the harvest.

object

Start and end dates of the harvest.

start
string

Timestamp date of the start of this harvest in ISO 8601 UTC format

end
string

Timestamp date of the end of this harvest in ISO 8601 UTC format

object
id
string

Reference (entity_ID) for the harvests type

object

The strains in the harvest.

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. Note: Some state's require harvests to be made up of only one strain. Please review your state's guidelines.

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

object

Total aggregates for Harvest components, such as the number of plants in the harvest and the total weight of harvested material.

object
number
integer

Number of plants in the harvest

unit_of_measure
string

The unit of measure of the number of plants.

object
number
integer

Total number of harvests.

object
object
object
object
object

Harvest's cure information.

number
integer

Number of cures in the harvest.

Array of objects

Cure event data of the harvest

Array
id
string

Unique identifier for the cure event

name
string

Display name for the cure event

object

The cure drying time

object

The temperature

object

The humidity info of the cure

date
string

Timestamp date of the cure event

object
Array of objects

Plants that are in the harvest

Array
id
string

Unique identifier of the plant

name
string

Name of the plant.

barcode
string

Unique identifier for tracking purposes.

date
string

Growth date of the plant in ISO 8601 UTC format.

object

Distribution of weights for the individual plant.

object

Waste removal event.

quantity
integer

Amount of waste removed.

unit_of_measure
number

Unit of measure used for quantity

object

The lot information for the harvest

number
integer

Number of lots ....

quantity
integer

Amount ....

unit_of_measure
number

Unit of measure used for quantity

Array of objects

Lots in the harvest

Array
id
string

Unique identifier for the lot

name
string

Display name for the lot

barcode
string

Barcode of the lot

quantity
number

Quantity of the lot.

unit_of_measure
string

Unit of measure of the quantity

date
string

Timestamp date of the lot

object
object
object
object
id
string

Reference (entity_ID) for the location.

name
string

name of the location.

object

Type of the location.

object
id
string

Reference (entity_ID) for the location.

name
string

name of the location.

object

Type of the location.

object

Products that are created

object
object
object
object
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 harvest [ active, inactive, curing, cured, updated, finished, unfinished, onhold, lab_testing_not_submitted, lab_testing_submitted, lab_testing_in_progress, lab_testing_awaiting_confirmation, lab_testing_passed, lab_testing_failed, lab_retesting_in_progress, lab_retest_passed, lab_retest_failed, used, waste_removed].

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

Update harvest

Update the details of a harvest 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

Harvest 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 harvest operation.

id
required
string

Reference (entity_id) for the harvest action.

Array of objects

List of weights for the harvest update.

Array
object
object
quantity
number

Current quantity

unit_of_measure
string

Unit of measure for the weight.

object
quantity
number

Current quantity

unit_of_measure
string

Unit of measure for the weight.

object
object
quantity
number

Current quantity

unit_of_measure
string

Unit of measure for the weight.

object
quantity
number

Current quantity

unit_of_measure
string

Unit of measure for the weight.

Array of objects

List of plants involved in the harvest update.

Array
id
string

Trace ID assigned to the plant.

object

Distribution of weights for the individual plant.

object
object
object
object
object
object
object

Details for the cure, if harvest action is a cure.

name
string
object

Details of the cure duration.

duration
number
unit_of_measure
string

Unit of time measurement for the cure duration.

object

Details of the cure temperature

value
number
unit_of_measure
string

Unit of temperature measurement for the cure duration.

object

Details of the cure humidity level

value
number
unit_of_measure
string

Unit of humidity measurement for the cure duration.

date
string

Timestamps of the cure.

object

Products involved in the harvest update.

object
id
string
category
string
object
id
string
category
string
object

Harvest's location information.

object

Location of the harvest during curing

id
string

Trace Location ID where the harvest will be stored for curing.

object

Location of the harvest lots made during the harvest process. Only applicable in Biotrack states.

id
string

Trace Location ID where the plant material lot will go during harvest.

object

Additional information related to the harvest.

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 this harvest.

id
string

Reference (entity_ID) for the harvest action.

name
string

Display name of the harvest action.

id
string

Reference (entity_ID) for the harvest.

name
string

User friendly reference for the harvest.

object

Start and end dates of the harvest.

start
string

Timestamp date of the start of this harvest in ISO 8601 UTC format

end
string

Timestamp date of the end of this harvest in ISO 8601 UTC format

object
id
string

Reference (entity_ID) for the harvests type

object

The strains in the harvest.

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. Note: Some state's require harvests to be made up of only one strain. Please review your state's guidelines.

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

object

Total aggregates for Harvest components, such as the number of plants in the harvest and the total weight of harvested material.

object
number
integer

Number of plants in the harvest

unit_of_measure
string

The unit of measure of the number of plants.

object
number
integer

Total number of harvests.

object
object
object
object
object

Harvest's cure information.

number
integer

Number of cures in the harvest.

Array of objects

Cure event data of the harvest

Array
id
string

Unique identifier for the cure event

name
string

Display name for the cure event

object

The cure drying time

object

The temperature

object

The humidity info of the cure

date
string

Timestamp date of the cure event

object
Array of objects

Plants that are in the harvest

Array
id
string

Unique identifier of the plant

name
string

Name of the plant.

barcode
string

Unique identifier for tracking purposes.

date
string

Growth date of the plant in ISO 8601 UTC format.

object

Distribution of weights for the individual plant.

object

Waste removal event.

quantity
integer

Amount of waste removed.

unit_of_measure
number

Unit of measure used for quantity

object

The lot information for the harvest

number
integer

Number of lots ....

quantity
integer

Amount ....

unit_of_measure
number

Unit of measure used for quantity

Array of objects

Lots in the harvest

Array
id
string

Unique identifier for the lot

name
string

Display name for the lot

barcode
string

Barcode of the lot

quantity
number

Quantity of the lot.

unit_of_measure
string

Unit of measure of the quantity

date
string

Timestamp date of the lot

object
object
object
object
id
string

Reference (entity_ID) for the location.

name
string

name of the location.

object

Type of the location.

object
id
string

Reference (entity_ID) for the location.

name
string

name of the location.

object

Type of the location.

object

Products that are created

object
object
object
object
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 harvest [ active, inactive, curing, cured, updated, finished, unfinished, onhold, lab_testing_not_submitted, lab_testing_submitted, lab_testing_in_progress, lab_testing_awaiting_confirmation, lab_testing_passed, lab_testing_failed, lab_retesting_in_progress, lab_retest_passed, lab_retest_failed, used, waste_removed].

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

Delete harvest

Deactivate a harvest for the license_number provided. This allows a licensee to correct plants that were accidentally scheduled for harvest. Once actually harvested, the licensee cannot deactivate without 'finishing' the harvest.

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

Harvest 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 harvest.

deleted
boolean

True if the harvest was deleted successfully, otherwise false.

object
object
object
object
object
object
object
Array of objects
Array
type
string
detail
string
400

Bad Request

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

Retrieve harvests types

Retrieve the harvests types 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 harvests type

name
string

name of the type.

note
string

additional information on this type.

Array of objects
Array
type
string
detail
string
400

Bad Request

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

Retrieve harvests actions

Retrieve the harvests 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 harvest action

name
string

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