Download OpenAPI specification:Download
OpenTHC Data Model and JSON-API reference
Authenticates to the system with a username & password or other credentials, responds with a cookie and a session identifer
Authentication Data
cre | string The Regulatory Compliance Engine code |
service-key | string The Software Pre-Shared Key, if the CRE provides this |
company | string The Company Identifier, if the CRE has one |
license | string The License Identifier, if the CRE has one (eg: METRC, LeafData) |
license-key | string The License Pre-Shared Key, if the CRE has one (eg: LeafData) |
username | string A Username, for the CREs that use this method (eg: BioTrack) |
password | string A Password, for the CREs that use this method (eg: BioTrack) |
{- "meta": { },
- "data": "string"
}
Verify a Session Token is still valid, provide one of the following parameters
Authorization | string JWT provided via Bearer token, it's probablly the best one to use |
openthc | string Session ID provided via cookie |
{- "meta": { }
}
Contacts are members of a Company
email required | string The Email |
phone required | string The Email |
[- {
- "id": "string",
- "type": {
- "id": "string",
- "name": "Caregiver"
}, - "name": "string",
- "email": "string",
- "phone": "string",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}
]
{- "id": "string",
- "type": {
- "id": "string",
- "name": "Caregiver"
}, - "name": "string",
- "email": "string",
- "phone": "string",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}
Contacts are members of a Company
id required | string The ID of the Contact |
{- "id": "string",
- "type": {
- "id": "string",
- "name": "Caregiver"
}, - "name": "string",
- "email": "string",
- "phone": "string",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}
Post to Update a Contact
id required | string The ID of the Contact |
{- "id": "string",
- "type": {
- "id": "string",
- "name": "Caregiver"
}, - "name": "string",
- "email": "string",
- "phone": "string",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}
Company
name | string Company Name |
type | string Company Type |
{- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
A Company contains one or more License objects and one or more Contact objects
id required | string The ID of the Company |
{- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
[- {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}
]
Create a new license
License meta data
id required | string Global/Universal Unique Identifier | ||||||||
name required | string Name of the License | ||||||||
code | string A Unique Identifier Code; typically a Government issued ID | ||||||||
required | object (License_Type) Designations for the a Type of a company | ||||||||
| |||||||||
required | object (Company) A Company is a container for License and Contact models | ||||||||
|
{- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}
A Company contains one or more License objects
id required | string The ID of the License |
{- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}
id required | string The ID of the License |
License meta data
id required | string Global/Universal Unique Identifier | ||||||||
name required | string Name of the License | ||||||||
code | string A Unique Identifier Code; typically a Government issued ID | ||||||||
required | object (License_Type) Designations for the a Type of a company | ||||||||
| |||||||||
required | object (Company) A Company is a container for License and Contact models | ||||||||
|
{- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}
Section Information
id | string Unique ULID value for this Section |
name | string The Name for this Section |
type | string The Type of Room: Plant or Inventory |
flag_quarantine | string If the Section is a designated quarantine area |
{- "id": "string",
- "name": "string",
- "type": "crop"
}
id required | string Unique ULID value for this Section |
Section Information
id | string Unique ULID value for this Section |
name | string The Name for this Section |
{- "id": "string",
- "name": "string",
- "type": "crop"
}
Variety defines the Cultivar, Flavor or Strain of a Crop or Product
Variety Details
name | string Name |
type | string Variety Type |
{- "id": "string",
- "name": "string",
- "type": "Hemp"
}
Update Variety
id required | string Unique ULID value for this Section |
Variety meta data
id required | string Global/Universal Unique Identifier |
name required | string Free-form name of Variety |
type | string Enum: "Hemp" "Hybrid" "Indica" "Sativa" "Ruderalis" |
{- "id": "string",
- "name": "string",
- "type": "Hemp"
}
Create a new product type
Product meta data
id required | string ULID or An Internal SKU or Lot ID | ||||||
name required | string Name of Product Type | ||||||
required | object | ||||||
|
{- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}
Update a product type
id required | string Unique ULID value for this Product Type |
id required | string ULID or An Internal SKU or Lot ID | ||||||
name required | string Name of Product Type | ||||||
required | object | ||||||
|
{- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}
Product, a Container for one or more Lot objects.
q | string Search Term. |
[- {
- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}
]
Product defines attributes of an Inventory Lot such as Weight/Volume, Package Size
Product Details
name | string Name |
type | string Product Type |
{- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}
Product defines attributes of an Inventory Lot such as Weight/Volume, Package Size
id required | string Unique ULID value for this Product |
{- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}
Product defines attributes of an Inventory Lot such as Weight/Volume, Package Size
id required | string Unique ULID value for this Product |
Product Details
name | string Name |
type | string Product Type |
{- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}
Create a Vehicle to transport material
Vehicle Details
id required | string Global/Universal Unique Identifier |
name | string Free-form, auto-generated name of Vehicle |
make required | string Manufacturer / Make of vehicle |
model required | string Vehicle Model |
color required | string Vehicle Color |
vin | string The Vehicle Identification Number |
vrn | string The Vehicle Registration Number (License Plate/Number Plate) |
{- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}
id required | string Unique ULID value for this Vehicle |
Vehicle Details
name | string Name |
{- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}
Create a New Plant from Seeds, Clones
Authentication Data
source | string The ID of the Source Item for creating this Plant |
variety | string An Updated Variety ID, use Inventory.Variety.Name if not present |
section | string Which Section the Plant should be created in |
qty | number <integer> Count of Plants to Create from Inventory |
[- {
- "id": "string",
- "name": "string",
- "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}
}
]
id required | string Unique ULID value for this Plant |
Authentication Data
variety | string The Variety ID |
section | string Indicate the Section the Plant is in |
propagation_source | boolean Designate the Plant as a Propagation Source (aka: Mother) |
{- "id": "string",
- "name": "string",
- "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}
}
id required | string Tracking Identifier of Plant |
Plant Collection Details
collect_id | any Identifier of the Batch, if one is not provided a new one will be assigned |
date | string <dateTime> Date and Time of Collection |
type | any Enum: "raw" "net" Type of Material |
qty | any Full Weight of Material in Integer value |
uom | any Enum: "g" "kg" "oz" "lb" Unit of Measure |
{- "id": "string",
- "plant": {
- "id": "string",
- "name": "string",
- "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}
}, - "type": "raw",
- "qty": 0.1,
- "uom": "g"
}
id required | string Unique ULID value for this Plant |
{- "id": "string",
- "plant": {
- "id": "string",
- "name": "string",
- "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}
}, - "type": "raw",
- "qty": 0.1,
- "uom": "g"
}
id required | string Unique ULID value for this Plant |
Plant Collection Details
plant_id | Array of strings Array of Plant IDs to factor for this net collection operation |
date | string <dateTime> Date and Time of Collection |
type | any Enum: "raw" "net" "wet" "dry" "flower" "other" "waste" Type of Material |
qty | any Full Weight of Material in Integer value |
uom | any Enum: "g" "kg" "oz" "lb" Unit of Measure |
{- "id": "string",
- "plant": {
- "id": "string",
- "name": "string",
- "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}
}, - "type": "raw",
- "qty": 0.1,
- "uom": "g"
}
[- {
- "id": "string",
- "name": "string",
- "section": {
- "id": "string",
- "name": "string",
- "type": "crop"
}, - "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}, - "product": {
- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}, - "qty": 0.1,
- "qty_initial": 0.1
}
]
Create a new Inventory Inventory
{- "source": null,
- "output": {
- "product_id": "$PRODUCT_ID",
- "variety_id": "$VARIETY_ID",
- "qty": 5
}
}
{- "id": "string",
- "name": "string",
- "section": {
- "id": "string",
- "name": "string",
- "type": "crop"
}, - "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}, - "product": {
- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}, - "qty": 0.1,
- "qty_initial": 0.1
}
id required | string Unique ULID value for this Inventory |
{- "id": "string",
- "name": "string",
- "section": {
- "id": "string",
- "name": "string",
- "type": "crop"
}, - "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}, - "product": {
- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}, - "qty": 0.1,
- "qty_initial": 0.1
}
id required | string Unique ID value for this Inventory |
Optional Inventory Details
product required | string Product ULID ID value |
variety required | string Variety ULID ID value |
name required | string User defined Inventory name |
{- "product": "string",
- "variety": "string",
- "name": "string"
}
{- "id": "string",
- "name": "string",
- "section": {
- "id": "string",
- "name": "string",
- "type": "crop"
}, - "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}, - "product": {
- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}, - "qty": 0.1,
- "qty_initial": 0.1
}
id required | string Unique ID value for this Inventory |
{- "id": "string",
- "name": "string",
- "section": {
- "id": "string",
- "name": "string",
- "type": "crop"
}, - "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}, - "product": {
- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}, - "qty": 0.1,
- "qty_initial": 0.1
}
id required | string Unique ID value for this Inventory |
Inventory Quantity Adjustment Details
qty required | number The new Quantity of the specified Inventory |
{- "id": "string",
- "name": "string",
- "section": {
- "id": "string",
- "name": "string",
- "type": "crop"
}, - "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}, - "product": {
- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}, - "qty": 0.1,
- "qty_initial": 0.1
}
id required | string Unique ID value for this Inventory |
Delete or Destruction details
reason_code | string Special Code |
reason_text | string Why |
{- "id": "string",
- "name": "string",
- "section": {
- "id": "string",
- "name": "string",
- "type": "crop"
}, - "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}, - "product": {
- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}, - "qty": 0.1,
- "qty_initial": 0.1
}
Search/List All Lab Items the Session has access to, for an Operator it's all the Lab Samples they have sent, for a Laboratory its the Samples that have been sent to them
q | string Generic Search |
company | string The Company who has supplied the Inventory |
inventory | string |
dt0 | string |
dt1 | string |
{- "id": "string",
- "stat": "200",
- "created_at": "string",
- "updated_at": "string",
- "deleted_at": "string",
- "license_origin": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}
}
id required | string Unique ULID value for this Lab Result |
{- "id": "string",
- "stat": "200",
- "created_at": "string",
- "updated_at": "string",
- "deleted_at": "string",
- "license_origin": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}
}
Lab Result links a Lab Sample to one or more Lab Metrics
q | string Search Term. |
[- {
- "id": "string",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}, - "license": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "lab_sample": {
- "id": "string",
- "stat": "200",
- "created_at": "string",
- "updated_at": "string",
- "deleted_at": "string",
- "license_origin": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}
}, - "contact": { },
- "certificate": "string",
- "image": "string",
- "metric_list": [
- {
- "lab_result_id": "string",
- "lab_metric_id": "string",
- "qom": "string",
- "uom": "mg/g",
- "lod": "string",
- "loq": "string",
- "limit": null,
- "status": "fail"
}
]
}
]
Lab Results are ....
id required | string Unique ULID value for this Lab Result |
{- "id": "string",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}, - "license": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "lab_sample": {
- "id": "string",
- "stat": "200",
- "created_at": "string",
- "updated_at": "string",
- "deleted_at": "string",
- "license_origin": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}
}, - "contact": { },
- "certificate": "string",
- "image": "string",
- "metric_list": [
- {
- "lab_result_id": "string",
- "lab_metric_id": "string",
- "qom": "string",
- "uom": "mg/g",
- "lod": "string",
- "loq": "string",
- "limit": null,
- "status": "fail"
}
]
}
Modify one or more metrics for a specific Lab result
id required | string Unique ULID value for this Lab Result |
Result and Metrics to update
id | string | ||||||||||||||||
object (Company) A Company is a container for License and Contact models | |||||||||||||||||
| |||||||||||||||||
object (License) A License is part of a Company and is a container for Inventory, Products, Variety, Section, B2B and B2C Transactions | |||||||||||||||||
| |||||||||||||||||
object (Lab_Sample) A Special type of Inventory Lot that becomes a Laboratory Sample | |||||||||||||||||
| |||||||||||||||||
contact | object The Contact Object of the Laboratory Technician Submitting Results | ||||||||||||||||
certificate | string URL of the Certificate in PDF format, either a public link on the internet, or a base64 encoded data URL. | ||||||||||||||||
image | string URL of the Product Image in a image/png or image/jpeg format, either a public link on the internet, or a base64 encoded data URL. | ||||||||||||||||
Array of objects (Lab_Result_Metric) The Result Metrics, where each Key is the Metric ID from the well-known published set | |||||||||||||||||
Array
|
{- "id": "string",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}, - "license": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "lab_sample": {
- "id": "string",
- "stat": "200",
- "created_at": "string",
- "updated_at": "string",
- "deleted_at": "string",
- "license_origin": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}
}, - "contact": { },
- "certificate": "string",
- "image": "string",
- "metric_list": [
- {
- "lab_result_id": "string",
- "lab_metric_id": "string",
- "qom": "string",
- "uom": "mg/g",
- "lod": "string",
- "loq": "string",
- "limit": null,
- "status": "fail"
}
]
}
{- "data": null,
- "meta": null
}
Lab Reports are ....
id required | string Unique ULID value for this Lab Report |
{- "id": "string",
- "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}, - "license": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "lab_sample": {
- "id": "string",
- "stat": "200",
- "created_at": "string",
- "updated_at": "string",
- "deleted_at": "string",
- "license_origin": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}
}, - "contact": { },
- "certificate": "string",
- "image": "string",
- "metric_list": [
- {
- "lab_result_id": "string",
- "lab_metric_id": "string",
- "qom": "string",
- "uom": "mg/g",
- "lod": "string",
- "loq": "string",
- "limit": null,
- "status": "fail"
}
]
}
type | string Enum: "incoming" "outgoing" Type of B2B Transaction |
q | string Generic Search Operator |
dt0 | string <dateTime> |
dt1 | string <dateTime> |
[- {
- "id": "string",
- "type": "incoming",
- "source": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "target": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "depart_at": "string",
- "arrive_at": "string",
- "item_list": [
- {
- "id": "string",
- "type": "string",
- "inventory": { },
- "product": {
- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}, - "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}, - "unit_count": 0.1,
- "unit_price": 0.1
}
]
}
]
Create a B2B Transaction
Create a B2B Transaction
type required | string Enum: "incoming" "outgoing" | ||||||||||
required | object (License) A License is part of a Company and is a container for Inventory, Products, Variety, Section, B2B and B2C Transactions | ||||||||||
| |||||||||||
required | object (License) A License is part of a Company and is a container for Inventory, Products, Variety, Section, B2B and B2C Transactions | ||||||||||
| |||||||||||
depart | string <dateTime> | ||||||||||
arrive | string <dateTime> |
{- "id": "string",
- "type": "incoming",
- "source": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "target": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "depart_at": "string",
- "arrive_at": "string",
- "item_list": [
- {
- "id": "string",
- "type": "string",
- "inventory": { },
- "product": {
- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}, - "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}, - "unit_count": 0.1,
- "unit_price": 0.1
}
]
}
[- {
- "id": "string",
- "type": "incoming",
- "source": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "target": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "depart_at": "string",
- "arrive_at": "string",
- "item_list": [
- {
- "id": "string",
- "type": "string",
- "inventory": { },
- "product": {
- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}, - "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}, - "unit_count": 0.1,
- "unit_price": 0.1
}
]
}
]
id required | string Unique ULID value for this B2B Transaction |
{- "id": "string",
- "type": "incoming",
- "source": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "target": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "depart_at": "string",
- "arrive_at": "string",
- "item_list": [
- {
- "id": "string",
- "type": "string",
- "inventory": { },
- "product": {
- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}, - "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}, - "unit_count": 0.1,
- "unit_price": 0.1
}
]
}
[- {
- "id": "string",
- "type": "incoming",
- "source": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "target": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "depart_at": "string",
- "arrive_at": "string",
- "item_list": [
- {
- "id": "string",
- "type": "string",
- "inventory": { },
- "product": {
- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}, - "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}, - "unit_count": 0.1,
- "unit_price": 0.1
}
]
}
]
[- {
- "id": "string",
- "type": "string",
- "inventory": { },
- "product": {
- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}, - "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}, - "unit_count": 0.1,
- "unit_price": 0.1
}
]
[- {
- "id": "string",
- "type": "incoming",
- "source": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "target": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "depart_at": "string",
- "arrive_at": "string",
- "item_list": [
- {
- "id": "string",
- "type": "string",
- "inventory": { },
- "product": {
- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}, - "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}, - "unit_count": 0.1,
- "unit_price": 0.1
}
]
}
]
Create a B2B Transaction File Attachment
Create a B2B Transaction File Attachment
type required | string Enum: "incoming" "outgoing" | ||||||||||
required | object (License) A License is part of a Company and is a container for Inventory, Products, Variety, Section, B2B and B2C Transactions | ||||||||||
| |||||||||||
required | object (License) A License is part of a Company and is a container for Inventory, Products, Variety, Section, B2B and B2C Transactions | ||||||||||
| |||||||||||
depart | string <dateTime> | ||||||||||
arrive | string <dateTime> |
{- "id": "string",
- "type": "string",
- "b2b_incoming_id": "string",
- "b2b_outgoing_id": "string",
- "data": null,
- "link": "string"
}
[- {
- "id": "string",
- "type": "incoming",
- "source": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "target": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "depart_at": "string",
- "arrive_at": "string",
- "item_list": [
- {
- "id": "string",
- "type": "string",
- "inventory": { },
- "product": {
- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}, - "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}, - "unit_count": 0.1,
- "unit_price": 0.1
}
]
}
]
id required | string Unique ULID value for this B2B Transaction |
{- "id": "string",
- "type": "incoming",
- "source": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "target": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}, - "company": {
- "id": "string",
- "name": "string",
- "code": "string",
- "type": {
- "id": "string",
- "code": "string",
- "name": "string"
}
}
}, - "depart_at": "string",
- "arrive_at": "string",
- "item_list": [
- {
- "id": "string",
- "type": "string",
- "inventory": { },
- "product": {
- "id": "string",
- "name": "string",
- "type": {
- "id": "string",
- "name": "string",
- "unit": {
- "type": "bulk",
- "qty": 0,
- "uom": "ea"
}
}, - "package": {
- "id": "string",
- "net": { },
- "net_volume": 0,
- "net_weight": 0,
- "unit_count": 0
}, - "serving": {
- "qty": 0,
- "portion": {
- "qty": 0,
- "uom": "string"
}
}
}, - "variety": {
- "id": "string",
- "name": "string",
- "type": "Hemp"
}, - "unit_count": 0.1,
- "unit_price": 0.1
}
]
}
Authentication Data
inventory_id | string | ||||||||||||
unit_count | number | ||||||||||||
unit_price | number | ||||||||||||
patient_id | string Deprecated, use the contact array | ||||||||||||
caregiver_id | string Deprecated, use the contact array | ||||||||||||
Array of objects (Contact) An array of contacts associated with this transaction | |||||||||||||
Array
|
{- "id": "string",
- "created_at": "string"
}
id required | any Transaction ID |
B2C Line Item
id | string Global/Unique Identifier |
inventory | string Inventory as String ID or Object |
unit_count | string Quantity of Items Sold |
unit_price | string Pre-Tax Price per Unit NOT the full price |
{- "id": "string",
- "inventory": "string",
- "unit_count": "string",
- "unit_price": "string"
}