OpenTHC API (420.20.050)

Download OpenAPI specification:Download

OpenTHC Data Model and JSON-API reference

Authentication

Authentication and session management

Authenticate to the System

Authenticates to the system with a username & password or other credentials, responds with a cookie and a session identifer

Request Body schema: application/x-www-form-urlencoded
required

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)

Responses

Response samples

Content type
application/json
{
  • "meta": { },
  • "data": "string"
}

Validate a Session Token

Verify a Session Token is still valid, provide one of the following parameters

header Parameters
Authorization
string

JWT provided via Bearer token, it's probablly the best one to use

openthc
string

Session ID provided via cookie

Responses

Response samples

Content type
application/json
{
  • "meta": { }
}

Close the Session

Terminates the session, cleans up any lingering cache data, not required

header Parameters
Authorization
string

JWT provided via Bearer token

openthc
string

SID provided via cookie

Responses

Response samples

Content type
application/json
{
  • "data": null,
  • "meta": { }
}

System

Core System Data: Company, License, Contact

Search Contacts

Contacts are members of a Company

query Parameters
email
required
string

The Email

phone
required
string

The Email

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create Contact

Create a Contact

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": {
    },
  • "name": "string",
  • "email": "string",
  • "phone": "string",
  • "company": {
    }
}

Select Contact

Contacts are members of a Company

path Parameters
id
required
string

The ID of the Contact

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": {
    },
  • "name": "string",
  • "email": "string",
  • "phone": "string",
  • "company": {
    }
}

Update Contact

Post to Update a Contact

path Parameters
id
required
string

The ID of the Contact

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": {
    },
  • "name": "string",
  • "email": "string",
  • "phone": "string",
  • "company": {
    }
}

Search Company Data

Company, top level grouping of a business

query Parameters
q
string

Search Term.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a Company

Request Body schema: application/x-www-form-urlencoded
required

Company

name
string

Company Name

type
string

Company Type

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "code": "string",
  • "type": {
    }
}

Company

A Company contains one or more License objects and one or more Contact objects

path Parameters
id
required
string

The ID of the Company

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "code": "string",
  • "type": {
    }
}

Search the License Data

License, attached to a Company

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a License

Create a new license

Request Body schema: application/x-www-form-urlencoded
required

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

id
required
string

Global/Universal Unique Identifier from the well-known published set

code
required
string

A single character descriptor of the License Type

name
required
string

Name of the License Type like Grower, or G1 or Lab or something

required
object (Company)

A Company is a container for License and Contact models

id
required
string

Global/Universal Unique Identifier

name
required
string

Name of Company

code
string

A Unique Identifier Code; typically a Government issued ID

object (Company_Type)

Designations for the a Type of a company

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "code": "string",
  • "type": {
    },
  • "company": {
    }
}

License

A Company contains one or more License objects

path Parameters
id
required
string

The ID of the License

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "code": "string",
  • "type": {
    },
  • "company": {
    }
}

Update a License

path Parameters
id
required
string

The ID of the License

Request Body schema: application/x-www-form-urlencoded
required

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

id
required
string

Global/Universal Unique Identifier from the well-known published set

code
required
string

A single character descriptor of the License Type

name
required
string

Name of the License Type like Grower, or G1 or Lab or something

required
object (Company)

A Company is a container for License and Contact models

id
required
string

Global/Universal Unique Identifier

name
required
string

Name of Company

code
string

A Unique Identifier Code; typically a Government issued ID

object (Company_Type)

Designations for the a Type of a company

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "code": "string",
  • "type": {
    },
  • "company": {
    }
}

Config

Configuration options for each Company/License

Get a LIst of all the Sections

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a Section (aka: Area or Room)

Request Body schema: application/x-www-form-urlencoded
required

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

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": "crop"
}

Get Section Data

path Parameters
id
required
string

Unique ULID value for this Section

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": "crop"
}

Update a Section (aka: Area or Room)

path Parameters
id
required
string

Unique ULID value for this Section

Request Body schema: application/x-www-form-urlencoded
required

Section Information

id
string

Unique ULID value for this Section

name
string

The Name for this Section

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": "crop"
}

Delete a Section (aka Archive)

path Parameters
id
required
string

Unique ID for this Section

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": "crop"
}

Search Variety Data

Variety defines the Cultivar, Flavor or Strain of a Crop or Product

query Parameters
q
string

Search Term.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a Variety

Variety defines the Cultivar, Flavor or Strain of a Crop or Product

Request Body schema: application/x-www-form-urlencoded
required

Variety Details

name
string

Name

type
string

Variety Type

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": "Hemp"
}

Get a Variety

path Parameters
id
required
string

Unique ULID value for this Section

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update Variety

Update Variety

path Parameters
id
required
string

Unique ULID value for this Section

Request Body schema: application/x-www-form-urlencoded
required

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"

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": "Hemp"
}

Delete Variety Type

Delete Variety Type

path Parameters
id
required
string

Unique ULID value for this Section

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": "Hemp"
}

Get List of Product Types

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create Product Type

Create a new product type

Request Body schema: application/x-www-form-urlencoded
required

Product meta data

id
required
string

ULID or An Internal SKU or Lot ID

name
required
string

Name of Product Type

required
object
type
string
Enum: "bulk" "pack" "each"
qty
number
uom
string
Enum: "ea" "g" "mg" "ml"

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "unit": {
    }
}

Modify Product Type

Update a product type

path Parameters
id
required
string

Unique ULID value for this Product Type

Request Body schema: application/x-www-form-urlencoded
id
required
string

ULID or An Internal SKU or Lot ID

name
required
string

Name of Product Type

required
object
type
string
Enum: "bulk" "pack" "each"
qty
number
uom
string
Enum: "ea" "g" "mg" "ml"

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "unit": {
    }
}

Delete Product Type

path Parameters
id
required
string

Unique ULID value for this Product Type

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "unit": {
    }
}

Search Product Data

Product, a Container for one or more Lot objects.

query Parameters
q
string

Search Term.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a Product

Product defines attributes of an Inventory Lot such as Weight/Volume, Package Size

Request Body schema: application/x-www-form-urlencoded
required

Product Details

name
string

Name

type
string

Product Type

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": {
    },
  • "package": {
    },
  • "serving": {
    }
}

Get Specific Product Data

Product defines attributes of an Inventory Lot such as Weight/Volume, Package Size

path Parameters
id
required
string

Unique ULID value for this Product

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": {
    },
  • "package": {
    },
  • "serving": {
    }
}

Update a Product

Product defines attributes of an Inventory Lot such as Weight/Volume, Package Size

path Parameters
id
required
string

Unique ULID value for this Product

Request Body schema: application/x-www-form-urlencoded
required

Product Details

name
string

Name

type
string

Product Type

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": {
    },
  • "package": {
    },
  • "serving": {
    }
}

Search Vehicle Data

Search vehicles regsitered under this company/license

query Parameters
q
string

Search Term.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a Vehicle

Create a Vehicle to transport material

Request Body schema: application/x-www-form-urlencoded
required

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)

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": {
    },
  • "package": {
    },
  • "serving": {
    }
}

Get Specific Vehcile Data

path Parameters
id
required
string

Unique ULID value for this Vehicle

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "make": "string",
  • "model": "string",
  • "color": "string",
  • "vin": "string",
  • "vrn": "string"
}

Update a Vehicle

path Parameters
id
required
string

Unique ULID value for this Vehicle

Request Body schema: application/x-www-form-urlencoded
required

Vehicle Details

name
string

Name

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": {
    },
  • "package": {
    },
  • "serving": {
    }
}

Crop

Crop, Plant, Growth and Collection details

Get a List of Plants

query Parameters
q
string

Generic Search

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a Plant

Create a New Plant from Seeds, Clones

Request Body schema: application/x-www-form-urlencoded
required

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

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Modify Plant Data

path Parameters
id
required
string

Unique ULID value for this Plant

Request Body schema: application/x-www-form-urlencoded
required

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)

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "variety": {
    }
}

Delete the Plants

path Parameters
id
required
string

Unique ULID value for this Plant

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "variety": {
    }
}

Collect Materials from a Plant

path Parameters
id
required
string

Tracking Identifier of Plant

Request Body schema: application/x-www-form-urlencoded
required

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

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "plant": {
    },
  • "type": "raw",
  • "qty": 0.1,
  • "uom": "g"
}

Commit this Plant Collect group into Inventory Lot

path Parameters
id
required
string

Unique ULID value for this Plant

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "plant": {
    },
  • "type": "raw",
  • "qty": 0.1,
  • "uom": "g"
}

Commit this Plant Collect group into Inventory Lot

path Parameters
id
required
string

Unique ULID value for this Plant

Request Body schema: application/x-www-form-urlencoded
required

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

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "plant": {
    },
  • "type": "raw",
  • "qty": 0.1,
  • "uom": "g"
}

Inventory

Inventory (Product, Variety, Package) details

Get a list of Inventory Objects

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create, Convert or Split an Inventory object

Request Body schema:
required

Create a new Inventory Inventory

Schema not provided

Responses

Request samples

Content type
Example
{
  • "source": null,
  • "output": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "section": {
    },
  • "variety": {
    },
  • "product": {
    },
  • "qty": 0.1,
  • "qty_initial": 0.1
}

View Inventory Inventory

path Parameters
id
required
string

Unique ULID value for this Inventory

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "section": {
    },
  • "variety": {
    },
  • "product": {
    },
  • "qty": 0.1,
  • "qty_initial": 0.1
}

Update Inventory Inventory

path Parameters
id
required
string

Unique ID value for this Inventory

Request Body schema: application/json

Optional Inventory Details

product
required
string

Product ULID ID value

variety
required
string

Variety ULID ID value

name
required
string

User defined Inventory name

Responses

Request samples

Content type
application/json
{
  • "product": "string",
  • "variety": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "section": {
    },
  • "variety": {
    },
  • "product": {
    },
  • "qty": 0.1,
  • "qty_initial": 0.1
}

Delete the Inventory Inventory

path Parameters
id
required
string

Unique ID value for this Inventory

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "section": {
    },
  • "variety": {
    },
  • "product": {
    },
  • "qty": 0.1,
  • "qty_initial": 0.1
}

Adjust Inventory

path Parameters
id
required
string

Unique ID value for this Inventory

Request Body schema: application/x-www-form-urlencoded
required

Inventory Quantity Adjustment Details

qty
required
number

The new Quantity of the specified Inventory

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "section": {
    },
  • "variety": {
    },
  • "product": {
    },
  • "qty": 0.1,
  • "qty_initial": 0.1
}

Destroy Inventory

path Parameters
id
required
string

Unique ID value for this Inventory

Request Body schema: application/x-www-form-urlencoded
required

Delete or Destruction details

reason_code
string

Special Code

reason_text
string

Why

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "section": {
    },
  • "variety": {
    },
  • "product": {
    },
  • "qty": 0.1,
  • "qty_initial": 0.1
}

Lab

Details about the Quality Assurance data, Laboratory results

Get a List of Supported Lab Metrics

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a list of Lab Samples

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

query Parameters
q
string

Generic Search

company
string

The Company who has supplied the Inventory

inventory
string
dt0
string
dt1
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "stat": "200",
  • "created_at": "string",
  • "updated_at": "string",
  • "deleted_at": "string",
  • "license_origin": {
    }
}

Get a Specific Sample

path Parameters
id
required
string

Unique ULID value for this Lab Result

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "stat": "200",
  • "created_at": "string",
  • "updated_at": "string",
  • "deleted_at": "string",
  • "license_origin": {
    }
}

Void a Lab Sample

path Parameters
id
required
string

Unique ID value for this Lab Result

Responses

Response samples

Content type
application/json
{
  • "data": null,
  • "meta": { }
}

Search the Lab Result

Lab Result links a Lab Sample to one or more Lab Metrics

query Parameters
q
string

Search Term.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get just the Lab Result Details for this specific Lab Sample

Lab Results are ....

path Parameters
id
required
string

Unique ULID value for this Lab Result

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "company": {
    },
  • "license": {
    },
  • "lab_sample": {
    },
  • "contact": { },
  • "certificate": "string",
  • "image": "string",
  • "metric_list": [
    ]
}

Modify/Update the Lab Results

Modify one or more metrics for a specific Lab result

path Parameters
id
required
string

Unique ULID value for this Lab Result

Request Body schema: application/json
required

Result and Metrics to update

id
string
object (Company)

A Company is a container for License and Contact models

id
required
string

Global/Universal Unique Identifier

name
required
string

Name of Company

code
string

A Unique Identifier Code; typically a Government issued ID

object (Company_Type)

Designations for the a Type of a company

object (License)

A License is part of a Company and is a container for Inventory, Products, Variety, Section, B2B and B2C Transactions

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

object (Lab_Sample)

A Special type of Inventory Lot that becomes a Laboratory Sample

id
required
string

ID of this specific Lab Sample

stat
integer
Enum: "200" "410"

Status/State indicator

created_at
string <dateTime>

DateTime

updated_at
string <dateTime>

DateTime

deleted_at
string <dateTime>

DateTime when deleted -- null indicates NOT deleted

object (License)

A License is part of a Company and is a container for Inventory, Products, Variety, Section, B2B and B2C Transactions

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
lab_result_id
string

The Lab Result

lab_metric_id
string

The Well Known Identifier of this Metric, may be null

qom
string

Quantity of Measure, the value measured

uom
string
Enum: "mg/g" "percent" "ppb" "ppm"

Unit of Measure

lod
string

The Level of Detection

loq
string

Limit of Quantitation

limit
any

Upper limit of detected stuff in the sample, below which the sample has passed

status
string
Enum: "fail" "na" "nd" "nr" "nt" "pass"

The status of this Lab Metric on this Lab Result

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "company": {
    },
  • "license": {
    },
  • "lab_sample": {
    },
  • "contact": { },
  • "certificate": "string",
  • "image": "string",
  • "metric_list": [
    ]
}

Response samples

Content type
application/json
{
  • "data": null,
  • "meta": null
}

Get just the Lab Report Details for this specific Lab Sample

Lab Reports are ....

path Parameters
id
required
string

Unique ULID value for this Lab Report

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "company": {
    },
  • "license": {
    },
  • "lab_sample": {
    },
  • "contact": { },
  • "certificate": "string",
  • "image": "string",
  • "metric_list": [
    ]
}

Void the Lab Reports

Void a Lab Report

path Parameters
id
required
string

Unique ULID value for this Lab Report

Responses

Response samples

Content type
application/json
{
  • "data": null,
  • "meta": null
}

B2B Transaction

B2B Transactions

Get Export or Import B2B Transaction List

query Parameters
type
string
Enum: "incoming" "outgoing"

Type of B2B Transaction

q
string

Generic Search Operator

dt0
string <dateTime>
dt1
string <dateTime>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create B2B Transaction

Create a B2B Transaction

Request Body schema: application/x-www-form-urlencoded
required

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

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

required
object (License)

A License is part of a Company and is a container for Inventory, Products, Variety, Section, B2B and B2C Transactions

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

depart
string <dateTime>
arrive
string <dateTime>

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": "incoming",
  • "source": {
    },
  • "target": {
    },
  • "depart_at": "string",
  • "arrive_at": "string",
  • "item_list": [
    ]
}

Get Export B2B Transaction List

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Specific B2B Transaction

path Parameters
id
required
string

Unique ULID value for this B2B Transaction

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": "incoming",
  • "source": {
    },
  • "target": {
    },
  • "depart_at": "string",
  • "arrive_at": "string",
  • "item_list": [
    ]
}

Update a B2B Transaction

path Parameters
id
required
string

Unique ULID value for this B2B Transaction

Request Body schema: application/x-www-form-urlencoded
required

Authentication Data

contact
string
vehicle
string
depart_at
string <dateTime>
arrive_at
string <dateTime>

Responses

Void the B2B Transaction

path Parameters
id
required
string

Unique ULID value for this B2B Transaction

Responses

Create a B2B Transaction Item

path Parameters
id
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a single B2B Transaction Item

path Parameters
id
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get File Attachments

path Parameters
id
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create B2B Transaction File Attachment

Create a B2B Transaction File Attachment

Request Body schema: application/x-www-form-urlencoded
required

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

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

required
object (License)

A License is part of a Company and is a container for Inventory, Products, Variety, Section, B2B and B2C Transactions

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

depart
string <dateTime>
arrive
string <dateTime>

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": "string",
  • "b2b_incoming_id": "string",
  • "b2b_outgoing_id": "string",
  • "data": null,
  • "link": "string"
}

Commit a B2B Transaction

path Parameters
id
required
string

Unique ULID value for this B2B Transaction

Responses

Response samples

Content type
application/json
{
  • "data": null,
  • "meta": { }
}

Get Export B2B Transaction List

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Specific B2B Transaction

path Parameters
id
required
string

Unique ULID value for this B2B Transaction

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": "incoming",
  • "source": {
    },
  • "target": {
    },
  • "depart_at": "string",
  • "arrive_at": "string",
  • "item_list": [
    ]
}

Update a B2B Transaction

path Parameters
id
required
string

Unique ULID value for this B2B Transaction

Request Body schema: application/x-www-form-urlencoded
required

Authentication Data

contact
string
vehicle
string
depart_at
string <dateTime>
arrive_at
string <dateTime>

Responses

Void the B2B Transaction

path Parameters
id
required
string

Unique ULID value for this B2B Transaction

Responses

Commit a B2B Transaction

path Parameters
id
required
string

Unique ULID value for this B2B Transaction

Responses

Response samples

Content type
application/json
{
  • "data": null,
  • "meta": { }
}

B2C Transaction

B2C Transactions

Get Sale Data

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Post a Sale

Request Body schema: application/x-www-form-urlencoded
required

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

Global/Universal Unique Identifier

required
object (Contact_Type)

Well-known Types of Contacts

name
required
string

Full Name

email
string

Contacts primary email address.

phone
string

Contacts primary phone number

required
object (Company)

A Company is a container for License and Contact models

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "created_at": "string"
}

Get B2C Transaction Details

path Parameters
id
required
string

Unique ID value for this B2C Transaction

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "created_at": "string"
}

Void a B2C Transaction

path Parameters
id
required
string

Unique ID value for this B2C Transaction

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "created_at": "string"
}

Create a B2C Transaction Item

path Parameters
id
required
any

Transaction ID

Request Body schema:
required

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

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "id": "string",
  • "inventory": "string",
  • "unit_count": "string",
  • "unit_price": "string"
}

Get B2C Transaction Item List

path Parameters
id
required
string

Unique ID value for this B2C Transaction

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "inventory": "string",
  • "unit_count": "string",
  • "unit_price": "string"
}