NAV

Distru API

Stay Up To Date

To stay up to date with the latest breaking changes to the Distru public API, please sign up for our email list.

Overview

Distru's public API allows you to easily access and manipulate your data in our system automatically.

Base URL

All API requests should be made to the base URL: https://app.distru.com

Getting Started

To integrate with Distru, you'll need to contact a representative that will can enable your account's API access. From there, have a look at the following information on how to authenticate with Distru.

Authentication

An admin user can generate API keys in the Distru app by following these steps.

Steps:

  1. Log in to Distru with your admin account.
  2. Navigate to the Settings page from the left menu.
  3. Click on Distru API under the Integrations section.
  4. Use the Create API Key option to generate your API token.

Models

Strain

A strain as shown in Distru

{
  "id": "12345",
  "name": "Strain 123"
}
Property Description Type Required
id Unique ID for this strain string false
name Name of the strain string false

StockAdjustments

A collection of Stock Adjustments

Property Description Type Required

Product

A product as shown in Distru

{
  "brand": {
    "name": "Brand 123"
  },
  "category": {
    "id": "89c8323f-aaaa-45v3-88f9-64009d68h3n8",
    "name": "Super Dank Buds"
  },
  "id": "02c88a3f-d759-4973-88f9-60049d682524",
  "images": [
    {
      "id": "12345",
      "name": "image.jpg",
      "url": "https://example.com/image.jpg"
    }
  ],
  "is_active": true,
  "msrp": 100.1,
  "name": "Blue Dream Preroll 1G",
  "sku": "BDP-1G",
  "unit_price": 1.5,
  "unit_type": {
    "name": "Gram"
  },
  "units_per_case": 6
}
Property Description Type Required
brand A brand as shown in Distru Brand false
category A product category as shown in Distru ProductCategory false
company A company as shown in Distru Company false
custom_data The custom data for this product array(CustomField) false
description The description of this product string false
id Unique ID for this product string false
images The images associated with the product array(Image) false
is_active Is this product active? boolean false
msrp The MSRP of the product number false
name Human readable name for this product string false
sku The SKU configured for the product string false
strain A strain as shown in Distru Strain false
subcategory A product subcategory as shown in Distru ProductSubcategory false
unit_price The price of one unit of this product number false
unit_type A unit type as shown in Distru UnitType false
units_per_case The number of units of this product that come in one case, if any number false
updated_datetime The datetime this product was last updated at string false

AdditionalCost

An additional cost for an assembly as shown in Distru

Property Description Type Required
cost_per_unit The cost per unit of the additional cost number false
description The description of the additional cost string false
name The name of the additional cost string false
quantity The quantity of the additional cost number false
unit_type A unit type as shown in Distru UnitType false

Products

A collection of Products

Property Description Type Required

Assembly

An assembly as shown in Distru

Property Description Type Required
completion_datetime The datetime this assembly was completed at string false
compliance_type The compliance type for this assembly. Options include METRC, BIOTRACK or NONE string false
creation_source The creation source for this assembly string false
custom_data The custom data for this assembly array(CustomField) false
description The description for this assembly string false
estimated_work_hours The estimated work hours for this assembly integer false
estimated_work_minutes The estimated work minutes for this assembly integer false
fulfilled True if all assembly inputs have been fulfilled with batches or packages, false otherwise. boolean false
id Unique ID for this assembly string false
is_metrc_processing_job True if this assembly is associated with a Metrc processing job, false otherwise boolean false
license The license number for this assembly string false
outputs The outputs for this assembly array(AssemblyOutput) false
owner_id The ID of the user that owns this assembly string false
status The status of this assembly string false

OrderItemsRequest

A collection of Order item params

Property Description Type Required

Locations

A collection of Locations

Property Description Type Required

Charge

A line representing a Tax, Discount, or Charge added to an order

Property Description Type Required
id Unique ID for this charge string false
name The name for this charge string false
percent The percent to charge for this line if it is a percentage number false
price The price of this line if it is a flat charge number false
type What type of additional line is this array(any) false
unit_type Determines if this line is tracked as a percentage or a flat charge array(any) false
tax.id Unique ID for this Tax string false
tax.name The name of this tax string false
tax.percent The amount of tax levied string false

Strains

A collection of Strains. Note: This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses.

Property Description Type Required

Role

A user role as shown in Distru

{
  "id": "12345",
  "name": "Admin"
}
Property Description Type Required
id Unique ID for this role string false
name Name of the role string false

OrderTransferTemplateTransporterInfoRequest

A Metrc-specific Order transfer template transporter info

Property Description Type Required
driver_license_number The driver's license number string false
driver_name The driver's name string false
driver_occupational_license_number The driver's occupational license number string false
driver_phone_number The driver's phone number string false
transporter_license_number The transporter's license number string false
vehicle_license_plate_number The vehicle's license plate number string false
vehicle_make The vehicle's make string false
vehicle_model The vehicle's model string false

InvoiceItemsRequest

A collection of invoice item params

Property Description Type Required

InvoiceItem

A invoice line item as shown in Distru

Property Description Type Required
batch A batch for a product as shown in Distru Batch false
id Unique ID for this invoice item string false
package A package as shown in Distru Package false
price Price per unit of this invoice item number false
product A product as shown in Distru Product false
quantity Quantity used on this invoice item number false
returned_quantity Quantity returned on this invoice item. This is the sum of all return items associated with this invoice item allocated proportionally based on the quantity

of the invoice item relative to its associated order item. For example, if an invoice item with a quantity of 1 has an order item with a quantity of 2, and a return item with a quantity of 2, the returned_quantity would be 1, calculated as (1 ÷ 2) × 2. |number|false| |total_cost_actual|Total cost of the non-returned quantity in this order item, in other words, this is the total cost of order_item.quantity minus order_item.returned quantity. The cost is allocated proportionally based on the quantity of the invoice item relative to its associated order item. For example, if an invoice item with a quantity of 1 has an order item with a quantity of 2 and a total cost of $10, the total_cost_actual would be $5, calculated as (1 ÷ 2) × $10. |number|false| |total_cost_default|Default cost of the non-returned quantity in this order item, in other words, this is the default cost of order_item.quantity minus order_item.returned quantity. The cost is allocated proportionally based on the quantity of the invoice item relative to its associated order item. For example, if an invoice item with a quantity of 1 has an order item with a quantity of 2 and a total cost of $10, the total_cost_default would be $5, calculated as (1 ÷ 2) × $10. |number|false|

RelationshipType

A relationship type as shown in Distru

{
  "id": "12345",
  "name": "Supplier"
}
Property Description Type Required
id Unique ID for this relationship type string false
name Name of the relationship type string false

OrderItemRequest

Order item params

Property Description Type Required
batch_id The ID of the batch (if the product is batch-tracked) string false
id Unique ID for this order item. If it exists, an update will be performed; otherwise, it will be used as the ID of a new order item record string false
package_id The ID of the package (if the product is package-tracked) string false
price_base Price per unit of this order item (prior to price tier items being applied) number true
product_id The ID of the product (if the product is product-tracked) string false
quantity Quantity used on this order item number true

Batch

A batch for a product as shown in Distru

Property Description Type Required
id Unique ID for this batch string false
name Human readable name for this batch string false

PurchaseChargesRequest

A collection of Invoice charge params

Property Description Type Required

PurchaseItemRequest

Purchase item params

Property Description Type Required
batch_id The ID of the batch (if the product is batch-tracked) string false
id Unique ID for this order item. If it exists, an update will be performed; otherwise, it will be used as the ID of a new invoice item record string false
price Price per unit of the inventory being received on this line item number true
product_id The ID of the product (if the product is product-tracked) string false
quantity Quantity received in this order item number true

OrderTransferTemplateTransporterInfosRequest

A collection of Metrc-specific Order transfer template transporter info params

Property Description Type Required

InvoiceChargesRequest

A collection of Invoice charge params

Property Description Type Required

PurchaseOrderItem

An order line item as shown in Distru

Property Description Type Required
batch A batch for a product as shown in Distru Batch false
id Unique ID for this order item string false
package A package as shown in Distru Package false
price Price per unit of this order item (with discounts applied) number false
price_base Price per unit of this order item number false
product A product as shown in Distru Product false
quantity Quantity used on this order item number false
received_quantity Quantity received on this order item. Less than or equal to the quantity field number false

PageWithSize

Pagination information for a request

{
  "number": 1,
  "size": 100
}
Property Description Type Required
number Page number integer true
size Amount of records per page integer true

InvoicePayment

An invoice payment as shown in Distru

{
  "amount": 100.0,
  "description": "Payment for invoice 12345",
  "id": "12345",
  "method_id": "12345",
  "payment_datetime": "2024-12-12 20:26:19.297537",
  "payment_number": "12345",
  "quickbooks_deposit_account_id": "12345"
}
Property Description Type Required
amount The amount of the payment number false
descriptiontime The description of this payment string false
id Unique ID for this invoice payment string false
invoice_id The ID of the invoice this payment is for string false
method_id The ID of the payment method used for this payment string false
payment_date The date of this payment string false
payment_number The payment number for this payment string false
quickbooks_deposit_account_id The id of the Quickbooks deposit account used for this payment string false

InvoiceItemRequest

Invoice item params

Property Description Type Required
id Unique ID for this order item. If it exists, an update will be performed; otherwise, it will be used as the ID of a new invoice item record string false
order_item_id The ID of order item with which this invoice item is associated string false
quantity Quantity used on this order item number true

CustomField

A custom field as shown in Distru

{
  "id": "12345",
  "name": "Custom Field 1",
  "value": "Custom Field Value 1"
}
Property Description Type Required
id Unique ID for this custom field string false
name The name of this custom field string false
value The value of the custom field in the context of the object it's associated with string false

Image

An image as shown in Distru

{
  "id": "12345",
  "name": "image.jpg",
  "rank": 0,
  "url": "https://example.com/image.jpg"
}
Property Description Type Required
id Unique ID for this image string false
name Name of the file for this image string false
rank The rank of this image in the list of images for the product integer false
url URL to the image file string false

User

Information about a user in Distru

{
  "banned": false,
  "email": "jeanb@zorgindustries.com",
  "full_name": "Jean-Baptiste Emanuel Zorg",
  "id": "12345",
  "role": "Admin"
}
Property Description Type Required
banned Is this user banned by Distru? boolean false
email The email address of this user string false
full_name The full name of this user string false
id Unique ID for this user string false
role A user role as shown in Distru Role false

OrderChargeRequest

Order charge params

Property Description Type Required
id Unique ID for this order charge. If it exists, an update will be performed; otherwise, it will be used as the ID of a new order charge record string false
name The ID of the batch (if the product is batch-tracked) string false
percent The ID of the package (if the product is package-tracked) number false
price The ID of the product (if the product is product-tracked) number false
type What type of additional line is this string true
unit_type Determines if this line is tracked as a percentage or a flat charge string true

PurchasePayment

A purchase payment as shown in Distru

{
  "amount": 100.0,
  "description": "Payment for invoice 12345",
  "id": "12345",
  "method_id": "12345",
  "payment_datetime": "2024-12-12 20:26:19.297537",
  "payment_number": "12345",
  "quickbooks_deposit_account_id": "12345"
}
Property Description Type Required
amount The amount of the payment number false
descriptiontime The description of this payment string false
id Unique ID for this purchase payment string false
method_id The ID of the payment method used for this payment string false
payment_date The date of this payment string false
payment_number The payment number for this payment string false
purchase_id The ID of the purchase this payment is for string false
quickbooks_deposit_account_id The id of the Quickbooks deposit account used for this payment string false

Packages

A collection of Packages

Property Description Type Required

StockAdjustment

A stock adjustment as shown in Distru

{
  "batch_id": "12345",
  "completion_datetime": "2024-12-12 20:26:19.297537",
  "compliance_quantity": 10,
  "description": "The description for this adjustment",
  "id": "12345",
  "license_id": "12345",
  "location_id": "12345",
  "owner_id": "12345",
  "package_id": "12345",
  "product_id": "12345",
  "quantity": 10,
  "reason": "Waste",
  "total_cost": 100
}
Property Description Type Required
batch_id The ID of this adjustment's batch. Null if this adjustment is not associated with a batch-tracked product string false
completion_datetime The datetime this adjustment was completed at datetime false
compliance_quantity The quantity of this adjustment expressed in it's package's unit type. Null if this adjustment is not associated with a package-tracked product. number false
description The description for this adjustment string false
id Unique ID for this stock adjustment string false
license_id ID of the license that this adjustment is associated with string false
location_id ID of the location that this adjustment is associated with string false
owner_id The ID of the user that owns this adjustment string false
package_id The ID of this adjustment's package. Null if this adjustment is not associated with a package-tracked product string false
product_id The ID of this adjustment's product. Populated regardless of the product's inventory tracking method. string false
quantity The quantity of the adjustment number false
reason The reason for this adjustment string false
total_cost The total cost of this adjustment number false

Batches

A collection of Batches

Property Description Type Required

Inventory

{
  "active": "500.000000000",
  "available": "400.000000000",
  "batch_number": "1234",
  "location_id": "1764da45-c1be-425c-9b31-b860cdb93e98",
  "product_id": "67ae9080-8dc2-4ab7-9704-19673f4d9f21"
}
Property Description Type Required
active Active quantity number true
available Available quantity (active - reserved) number true
batch_number The batch number of the batch or the package string false
location_id ID of the location string false
product_id ID of the product string true

Order

A sales order as shown in Distru. Ordered by order date

{
  "billing_location": {
    "address": "123 Compton Street, CA, USA, 12345",
    "id": "d06a5135-dccf-4d62-a922-804190213c10",
    "name": "Warehouse 1"
  },
  "charges": [
    {
      "id": "8h7512d2-g4h6-jj89-92h7-12f9ed9ls8f5",
      "name": "Friends and Family",
      "percent": -10,
      "type": "DISCOUNT",
      "unit_type": "PERCENT"
    },
    {
      "id": "duy67x9r-0d4k-mmk5-8u9u-l3k8ed9lj900",
      "name": "Excise Tax",
      "percent": 27,
      "tax": {
        "id": "9876",
        "name": "Excise Tax - CA 27%",
        "percent": 27.0
      },
      "type": "TAX",
      "unit_type": "PERCENT"
    },
    {
      "id": "ko38h9ju-ndn7-76h8-jio9-j98yhd93h6fh",
      "name": "Membership Fee",
      "price": 25.0,
      "type": "CHARGE",
      "unit_type": "PRICE"
    }
  ],
  "creator": {
    "banned": false,
    "email": "jeanb@zorgindustries.com",
    "full_name": "Jean-Baptiste Emanuel Zorg",
    "id": "3e98e590-85b6-4247-b2e9-96fc2f45802e"
  },
  "delivery_datetime": "2022‐07‐02T00:00:00Z",
  "due_datetime": "2022‐07‐02T00:00:00Z",
  "id": "193c12d2-bc68-46fa-a221-12f9ed958ef4",
  "inserted_datetime": "2022‐07‐02T00:00:00Z",
  "internal_notes": "Internal note example",
  "items": [
    {
      "id": "3e98e590-85b6-4247-b2e9-96fc2f45802e",
      "price": 0.006,
      "price_base": 0.006,
      "product": {
        "id": "4ec0ac89-a382-409c-ae67-4478e7e681ac",
        "name": "Crawdad Crippler - 1g - PreRoll",
        "sku": "WHODAT"
      },
      "quantity": 786
    }
  ],
  "order_datetime": "2022‐07‐02T00:00:00Z",
  "order_number": "SO-00012345",
  "shipping_location": {
    "address": "123 Compton Street, CA, USA, 12345",
    "id": "d06a5135-dccf-4d62-a922-804190213c10",
    "name": "Warehouse 1"
  },
  "status": "PENDING",
  "total": 150.23,
  "updated_datetime": "2022‐07‐02T00:00:00Z"
}
Property Description Type Required
billing_location A location as shown in Distru Location false
charges A collection of Charges array(Charge) false
company A company as shown in Distru Company false
creator Information about a user in Distru User false
custom_data A collection of CustomData array(CustomData) false
delivery_datetime The datetime on which the order was / will be delivered string false
due_datetime The datetime by which the order should be completed for the customer string false
id Unique ID for this order string false
inserted_datetime The datetime at which the order was created in Distru string false
internal_notes Internal notes for this order string false
items A collection of SalesOrderItems array(SalesOrderItem) false
order_datetime The datetime on which the order was placed string false
order_number The order number as shown in the Distru UI string false
owner Information about a user in Distru User false
shipping_location A location as shown in Distru Location false
status The status of this sales order string false
total The total for this order including taxes, discounts, and all line items number false
updated_datetime The datetime at which the order was last updated in Distru string false

Contacts

A collection of Contacts

Property Description Type Required

Page

Pagination information for a request

{
  "number": 1
}
Property Description Type Required
number Page number integer true

Purchase

A purchase order as shown in Distru. Ordered by order date

{
  "charges": [
    {
      "id": "8h7512d2-g4h6-jj89-92h7-12f9ed9ls8f5",
      "name": "Friends and Family",
      "percent": -10,
      "type": "Discount",
      "unit_type": "Percent"
    },
    {
      "id": "duy67x9r-0d4k-mmk5-8u9u-l3k8ed9lj900",
      "name": "Excise Tax",
      "percent": 27,
      "tax": {
        "id": "9876",
        "name": "Excise Tax - CA 27%",
        "percent": 27.0
      },
      "type": "Tax",
      "unit_type": "Percent"
    },
    {
      "id": "ko38h9ju-ndn7-76h8-jio9-j98yhd93h6fh",
      "name": "Membership Fee",
      "price": 25.0,
      "type": "Charge",
      "unit_type": "Price"
    }
  ],
  "due_datetime": "2022‐07‐02T00:00:00Z",
  "id": "193c12d2-bc68-46fa-a221-12f9ed958ef4",
  "inserted_datetime": "2022‐07‐02T00:00:00Z",
  "items": [
    {
      "id": "3e98e590-85b6-4247-b2e9-96fc2f45802e",
      "price": 0.006,
      "product": {
        "id": "4ec0ac89-a382-409c-ae67-4478e7e681ac",
        "name": "Crawdad Crippler - 1g - PreRoll",
        "sku": "WHODAT"
      },
      "quantity": 786,
      "received_quantity": 786
    }
  ],
  "order_datetime": "2022‐07‐02T00:00:00Z",
  "purchase_number": "PO-00012345",
  "status": "Pending",
  "total": 150.23,
  "updated_datetime": "2022‐07‐02T00:00:00Z"
}
Property Description Type Required
charges A collection of Charges array(Charge) false
company A company as shown in Distru Company false
creator Information about a user in Distru User false
custom_data The custom data for this purchase order array(CustomField) false
due_datetime The datetime by which the order should be completed for the customer string false
id Unique ID for this order string false
inserted_datetime The datetime at which the order was created in Distru string false
items A collection of PurchaseOrderItems array(PurchaseOrderItem) false
order_datetime The datetime on which the order was placed string false
order_number The order number as shown in the Distru UI string false
owner Information about a user in Distru User false
status The status of this purchase order string false
total The total for this order including taxes, discounts, and all line items number false
updated_datetime The datetime at which the order was last updated in Distru string false

PaymentMethod

A payment method as shown in Distru

{
  "id": "12345",
  "name": "Credit Card"
}
Property Description Type Required
id Unique ID for this payment method string false
name Name of the payment method string false

Package

A package as shown in Distru

Property Description Type Required
batch_number The non-compliance batch number for this package string false
compliance_label The compliance (e.g. Metrc) label for this package string false
id Unique ID for this package in Distru string false
status The status of this package array(any) false

BatchFull

Extended details about a batch for a product as shown in Distru

Property Description Type Required
batch_number The batch number for this batch string false
custom_data The custom data for this batch array(CustomField) false
description The description for this batch string false
expiration_date The expiration date for this batch string false
id Unique ID for this batch string false
name Human readable name for this batch string false
owner_id The ID of the user that owns this batch string false
product_id The ID of the batch's product string false

Invoices

A collection of Invoices

Property Description Type Required

ProductSubcategory

A product subcategory as shown in Distru

{
  "id": "88c02a3f-57d9-9473-f8f9-40609d68bbh4",
  "name": "High Grade Flower"
}
Property Description Type Required
id Unique ID for this subcategory string false
name Human readable name for this subcategory string false

Orders

A collection of Orders

Property Description Type Required

SalesOrderItem

An order line item as shown in Distru

Property Description Type Required
batch A batch for a product as shown in Distru Batch false
id Unique ID for this order item string false
package A package as shown in Distru Package false
price Price per unit of this order item number false
product A product as shown in Distru Product false
quantity Quantity sold on this order item number false
returned_quantity Quantity returned on this order item number false
total_cost_actual Total cost of the non-returned quantity in this order item, in other words, this is the total cost of order_item.quantity minus order_item.returned quantity. number false
total_cost_default Default cost of the non-returned quantity in this order item, in other words, this is the default cost of order_item.quantity minus order_item.returned quantity. number false

Assemblies

A collection of Assemblies

Property Description Type Required

Invoice

An invoice as shown in Distru. Ordered by invoice date

{
  "creator": {
    "banned": false,
    "email": "jeanb@zorgindustries.com",
    "full_name": "Jean-Baptiste Emanuel Zorg",
    "id": "12345"
  },
  "due_datetime": "2022‐07‐02T00:00:00Z",
  "id": "193c12d2-bc68-46fa-a221-12f9ed958ef4",
  "inserted_datetime": "2022‐07‐02T00:00:00Z",
  "invoice_datetime": "2022‐07‐02T00:00:00Z",
  "invoice_number": "INV-00012345",
  "items": [
    {
      "id": "1",
      "price": 3.0,
      "product": {
        "id": "543",
        "name": "Crawdad Crippler - 1g - PreRoll",
        "sku": "WHODAT"
      },
      "quantity": 5
    }
  ],
  "order": {
    "id": "931c12d2-68bc-fa46-a221-12f9edcg5hd7",
    "order_number": "SO-0000657",
    "status": "Delivering",
    "total": 999.99
  },
  "status": "Pending",
  "total": 543.23,
  "updated_datetime": "2022‐07‐02T00:00:00Z"
}
Property Description Type Required
charges A collection of Charges array(Charge) false
company A company as shown in Distru Company false
creator Information about a user in Distru User false
custom_data A collection of CustomData array(CustomField) false
due_datetime The datetime by which the invoice should be paid by the customer string false
id Unique ID for this invoice string false
inserted_datetime The datetime at which the invoice was created in Distru string false
invoice_datetime The datetime on which the invoice was placed string false
invoice_number The invoice number as shown in the Distru UI string false
items A collection of InvoiceItems array(InvoiceItem) false
owner Information about a user in Distru User false
paid_amount The payment amount recorded against this invoice so far. number false
status The status of this invoice string false
total The total for this invoice including taxes, discounts, and all line items number false
updated_datetime The datetime at which the invoice was last updated in Distru string false
order.id Unique ID for this order string false
order.order_number The order number for this sale as seen in the Distru UI string false
order.status Status of the associated order string false
order.total The total on the order number false

PurchaseChargeRequest

Purchase charge params

Property Description Type Required
id Unique ID for this purchase charge. If it exists, an update will be performed; otherwise, it will be used as the ID of a new purchase charge record string false
name The name of this charge string false
percent The percent (if it is percent-based) of this charge number false
price The flat price (if it is price-based) of this charge number false
type Determines if this is a charge or discount string true
unit_type Determines if this line is tracked as a percentage or a flat charge string true

PackageFull

A package with extended details as shown in Distru

Property Description Type Required
batch_number The non-compliance batch number for this package string false
compliance_label The compliance (e.g. Metrc) label for this package string false
custom_data The custom data for this package array(CustomField) false
expiration_date The date that this package expires string false
id Unique ID for this package in Distru string false
is_trade_sample True if this package is a Metrc trade sample boolean false
license A license as shown in Distru License false
product_unit_quantity The quantity of this package expressed in it's product's unit type string false
product_unit_type A unit type as shown in Distru UnitType false
quantity The last known accurate quantity of this package string false
quantity_assembling This quantity of this package currently allocated towards a pending assembly string false
quantity_available The quantity available for use of this package (i.e. inventory that is not held up on a sales order or assembly.) string false
status The status of this package array(any) false
unit_type A unit type as shown in Distru UnitType false
location.id Unique ID for this Location string false
location.name The name of this Location string false

License

A license as shown in Distru

Property Description Type Required
id Unique ID for this license string false
license_number License number string false

Purchases

A collection of Purchases

Property Description Type Required

AssemblyOutput

An output for an assembly as shown in Distru

Property Description Type Required
additional_costs The additional costs for this assembly output array(AdditionalCost) false
batch A batch for a product as shown in Distru Batch false
compliance_label The compliance label for this assembly output string false
compliance_quantity The quantity of this output expressed in the package's unit type. Null if this input is not package-tracked. number false
expiration_date The expiration date for this assembly output string false
ingredients The ingredients for this assembly output array(AssemblyInput) false
is_production_batch Is this output a production batch? boolean false
location A location as shown in Distru Location false
package A package as shown in Distru Package false
package_date The date that this package was created at string false
package_unit_type A unit type as shown in Distru UnitType false
product A product as shown in Distru Product false
quantity The quantity of this output in its product's unit number false

PurchaseItemsRequest

A collection of purchase item params

Property Description Type Required

Location

A location as shown in Distru

Property Description Type Required
address Human readable address for this location string false
company_id ID of the company that owns this location string false
id Unique ID for this location string false
license A license as shown in Distru License false
license_id ID of the license that this location is associated with, if null, then this location is not associated to a license string false
name Human readable name for this location string false

ProductCategory

A product category as shown in Distru

{
  "id": "88c02a3f-57d9-9473-f8f9-40609d68bbh4",
  "name": "Flower",
  "type": "FLOWER"
}
Property Description Type Required
id Unique ID for this category string false
name Human readable name for this category string false
type The type of this category string false

OrderChargesRequest

A collection of Order charge params

Property Description Type Required

Contact

Information about a contact in Distru's CRM

{
  "company": {
    "id": "3f128a34-cc59-4b49-8883-23bf10e59c6c"
  },
  "email": "contact@example.com",
  "full_name": "John Doe",
  "id": "12345",
  "owner": {
    "id": "02c88a3f-d759-4973-88f9-60049d682524"
  }
}
Property Description Type Required
company A company as shown in Distru Company false
custom_data The custom data for this contact array(CustomField) false
email The email address of this contact string false
full_name The full name of this contact string false
id Unique ID for this contact string false
owner Information about a user in Distru User false
phone_number The phone number of this contact string false
title The title of this contact string false

PaymentMethods

A collection of Payment Methods

Property Description Type Required

InvoiceChargeRequest

Invoice charge params

Property Description Type Required
id Unique ID for this invoice charge. If it exists, an update will be performed; otherwise, it will be used as the ID of a new invoice charge record string false
name The name of this charge string false
percent The percent (if it is percent-based) of this charge number false
price The flat price (if it is price-based) of this charge number false
type Determines if this is a charge or discount string true
unit_type Determines if this line is tracked as a percentage or a flat charge string true

Companies

A collection of companies

Property Description Type Required

UnitType

A unit type as shown in Distru

{
  "name": "Gram"
}
Property Description Type Required
id Unique ID for this unit type string false
name Human readable name for this unit type string false

Company

A company as shown in Distru

Property Description Type Required
category The category of this company string false
custom_data The custom data for this company array(CustomField) false
default_email The default email for this company string false
default_purchase_order_notes The default notes that will be automatically added to purchase orders when this company is the supplier string false
default_sales_order_notes The default external notes that will be automatically added to sales orders when this company is the customer string false
id Unique ID for this company string false
invoice_email The email address where sales order invoices are delivered string false
legal_business_name The legal business name for this company string false
licenses The license for the company array(License) false
locations The location for the company array(Location) false
name Human readable name for this company string false
order_shipment_email The email address where sales order shipment packing slips are delivered string false
outstanding_balance_threshold Threshold that determines when a company is considered to have a too high an outstanding balance. When exceeded, Distru will show a warning banner in the company's page and when selling to this company. integer false
owner_id The ID of the user that owns this company string false
phone_number The phone number for this company string false
purchase_order_email The email address where purchase order slips are delivered string false
relationship_type A relationship type as shown in Distru RelationshipType false
sales_order_email The email address where sales order slips are delivered string false
updated_datetime The datetime this company was last updated at string false
website The website for this company string false

AssemblyInput

An input for an assembly as shown in Distru

Property Description Type Required
batch A batch for a product as shown in Distru Batch false
compliance_quantity The quantity of this input expressed in the package's unit type. Null if this input is not package-tracked. number false
cost The cost of this input number false
location A location as shown in Distru Location false
package A package as shown in Distru Package false
product A product as shown in Distru Product false
quantity The quantity of this input in its product's unit number false

Inventories

A list of active and available quantity for each group

Property Description Type Required

Brand

A brand as shown in Distru

{
  "name": "Brand 123"
}
Property Description Type Required
name Name of the brand string false

Users

A collection of Users

Property Description Type Required

Assembly

Get assemblies

GET /public/v1/assemblies returns proper data for non-compliance assembly

GET /public/v1/assemblies?creation_source=MANUALLY_CREATED&page[number]=1
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI3MzQsImlhdCI6MTc0NDk5MzEzNCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiOGFkZWRjZTAtYjFlYS00ZTNhLWEzZWYtMzU2OGM1ZTgwMGIxIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMTMzLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgwODk4MDAiLCJ0eXAiOiJhY2Nlc3MifQ.xuXeQVVKGaEusnPcYG7Oe-d7eQae-oD7N4ufYJd0oks

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 4ad26cd649b70c000000000000000001-75b6837695e0d893-0
{
  "data": [
    {
      "completion_datetime": null,
      "compliance_type": "NONE",
      "creation_source": "MANUALLY_CREATED",
      "custom_data": [
        {
          "id": 64358,
          "name": "Custom Field 22",
          "value": "Custom Field Value"
        }
      ],
      "description": null,
      "estimated_work_hours": 1,
      "estimated_work_minutes": 5,
      "fulfilled": true,
      "id": "0acc5bf9-dbd8-473d-996c-ac3633692360",
      "is_metrc_processing_job": false,
      "license": null,
      "outputs": [
        {
          "additional_costs": [
            {
              "cost_per_unit": "-1",
              "description": null,
              "name": "CostType 5",
              "quantity": "1",
              "unit_type": {
                "id": "00000000-0000-0000-0000-00000b7609ce",
                "name": "Unit Type 59"
              }
            }
          ],
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004aeaf2",
            "name": "B3290"
          },
          "compliance_label": null,
          "compliance_quantity": null,
          "expiration_datetime": null,
          "ingredients": [
            {
              "batch": {
                "batch_number": null,
                "id": "00000000-0000-0000-0000-0000004aeaf2",
                "name": "B3290"
              },
              "compliance_quantity": null,
              "cost": 0,
              "location": {
                "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
                "company_id": "00000000-0000-0000-0000-000000cfb865",
                "id": "00000000-0000-0000-0000-00000053e51f",
                "license_id": null,
                "name": "Place 2043"
              },
              "package": null,
              "product": {
                "id": "b8d71b62-cecf-45b0-be6c-cb22f62c6b97",
                "name": "Product 3287",
                "sku": "sku 3288",
                "updated_datetime": "2025-04-18T16:18:54.430393Z"
              },
              "quantity": "1"
            }
          ],
          "is_production_batch": false,
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfb865",
            "id": "00000000-0000-0000-0000-00000053e51f",
            "license_id": null,
            "name": "Place 2043"
          },
          "package": null,
          "package_datetime": null,
          "package_unit_type": null,
          "product": {
            "id": "b8d71b62-cecf-45b0-be6c-cb22f62c6b97",
            "name": "Product 3287",
            "sku": "sku 3288",
            "updated_datetime": "2025-04-18T16:18:54.430393Z"
          },
          "quantity": "1"
        }
      ],
      "owner_id": "00000000-0000-0000-0000-000001140748",
      "status": "PENDING"
    }
  ]
}

GET /public/v1/assemblies returns proper data for pending metrc assembly

GET /public/v1/assemblies?creation_source=MANUALLY_CREATED&license_number=CDPH-00001228&page[number]=1
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI3MzYsImlhdCI6MTc0NDk5MzEzNiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMzJhMDFjMDMtMjk3Ni00ZWE4LWE4YTMtYjAyNGEwNjNiZGRhIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMTM1LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgwOTAxNzkiLCJ0eXAiOiJhY2Nlc3MifQ.J18xWebMD4Vgk5aXoijcd-fZqbcCbAJpyyMAUgR-kk4

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 4d93e3b052d054000000000000000001-2b36b8008096e325-0
{
  "data": [
    {
      "completion_datetime": null,
      "compliance_type": "METRC",
      "creation_source": "MANUALLY_CREATED",
      "custom_data": [
        {
          "id": 64359,
          "name": "Custom Field 23",
          "value": null
        }
      ],
      "description": null,
      "estimated_work_hours": null,
      "estimated_work_minutes": null,
      "fulfilled": true,
      "id": "bdc1cef1-b724-44b3-a154-1d5c3141ed9e",
      "is_metrc_processing_job": false,
      "license": {
        "id": "00000000-0000-0000-0000-00000035ac85",
        "license_number": "CDPH-00001228"
      },
      "outputs": [
        {
          "additional_costs": [],
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004aeb45",
            "name": "B3549"
          },
          "compliance_label": "1A4010200001234000000048",
          "compliance_quantity": "2",
          "expiration_datetime": null,
          "ingredients": [
            {
              "batch": {
                "batch_number": null,
                "id": "00000000-0000-0000-0000-0000004aeb45",
                "name": "B3549"
              },
              "compliance_quantity": "0.0353",
              "cost": 0,
              "location": {
                "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
                "company_id": "00000000-0000-0000-0000-000000cfb970",
                "id": "00000000-0000-0000-0000-00000053e5bd",
                "license_id": "00000000-0000-0000-0000-00000035ac85",
                "name": "Place 2189"
              },
              "package": {
                "batch_number": "1234567890",
                "compliance_label": "ABCDEF012345670000001501",
                "id": "00000000-0000-0000-0000-0000001b061b",
                "metrc_label": "ABCDEF012345670000001501",
                "status": "active"
              },
              "product": {
                "id": "b6b78047-648a-4b66-87d1-c47b48b927fd",
                "name": "Product 3536",
                "sku": "sku 3537",
                "updated_datetime": "2025-04-18T16:18:56.566305Z"
              },
              "quantity": "1"
            }
          ],
          "is_production_batch": false,
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfb970",
            "id": "00000000-0000-0000-0000-00000053e5bd",
            "license_id": "00000000-0000-0000-0000-00000035ac85",
            "name": "Place 2189"
          },
          "package": null,
          "package_datetime": "2025-04-18",
          "package_unit_type": {
            "id": "00000000-0000-0000-0000-00000b7617bf",
            "name": "Gram"
          },
          "product": {
            "id": "b6b78047-648a-4b66-87d1-c47b48b927fd",
            "name": "Product 3536",
            "sku": "sku 3537",
            "updated_datetime": "2025-04-18T16:18:56.566305Z"
          },
          "quantity": "2"
        }
      ],
      "owner_id": "00000000-0000-0000-0000-0000011408c3",
      "status": "PENDING"
    }
  ]
}

GET /public/v1/assemblies returns proper data for completed metrc assembly

GET /public/v1/assemblies?completion_datetime=2025-04-18+15%3A18%3A55.722452Z%2C2025-04-18+17%3A18%3A55.722452Z&creation_source=MANUALLY_CREATED&license_number=CDPH-00001182&page[number]=1
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI3MzUsImlhdCI6MTc0NDk5MzEzNSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNTA0NzFjYTEtZWZmYS00OWM2LThlMTMtZTI3ODJmZDIwZTJkIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMTM0LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgwODk5NzYiLCJ0eXAiOiJhY2Nlc3MifQ.MrQ3ihMq5W76CNkxtR-KRc9ywPrMhfA0qG5hQsmsdgA

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 973238d531ec08000000000000000001-50d98a210d4e3375-0
{
  "data": [
    {
      "completion_datetime": "2025-04-18T16:18:55.722452Z",
      "compliance_type": "METRC",
      "creation_source": "MANUALLY_CREATED",
      "custom_data": [],
      "description": null,
      "estimated_work_hours": null,
      "estimated_work_minutes": null,
      "fulfilled": true,
      "id": "08658fc5-6cdf-4b43-9b6f-5458faa38bf2",
      "is_metrc_processing_job": false,
      "license": {
        "id": "00000000-0000-0000-0000-00000035ac5e",
        "license_number": "CDPH-00001182"
      },
      "outputs": [
        {
          "additional_costs": [],
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004aeb13",
            "name": "B3387"
          },
          "compliance_label": "1A4010200001234000000046",
          "compliance_quantity": "2",
          "expiration_datetime": null,
          "ingredients": [
            {
              "batch": {
                "batch_number": null,
                "id": "00000000-0000-0000-0000-0000004aeb13",
                "name": "B3387"
              },
              "compliance_quantity": "0.0353",
              "cost": 0,
              "location": {
                "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
                "company_id": "00000000-0000-0000-0000-000000cfb8cc",
                "id": "00000000-0000-0000-0000-00000053e561",
                "license_id": "00000000-0000-0000-0000-00000035ac5e",
                "name": "Place 2105"
              },
              "package": {
                "batch_number": "1234567890",
                "compliance_label": "ABCDEF012345670000001467",
                "id": "00000000-0000-0000-0000-0000001b060e",
                "metrc_label": "ABCDEF012345670000001467",
                "status": "active"
              },
              "product": {
                "id": "5ad2e19c-fc55-4b55-bb8b-9562219fedd4",
                "name": "Product 3384",
                "sku": "sku 3385",
                "updated_datetime": "2025-04-18T16:18:55.501281Z"
              },
              "quantity": "1"
            }
          ],
          "is_production_batch": false,
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfb8cc",
            "id": "00000000-0000-0000-0000-00000053e561",
            "license_id": "00000000-0000-0000-0000-00000035ac5e",
            "name": "Place 2105"
          },
          "package": {
            "batch_number": null,
            "compliance_label": "1A4010200001234000000046",
            "id": "00000000-0000-0000-0000-0000001b060f",
            "metrc_label": "1A4010200001234000000046",
            "status": "active"
          },
          "package_datetime": "2025-04-18",
          "package_unit_type": {
            "id": "00000000-0000-0000-0000-00000b760ee2",
            "name": "Gram"
          },
          "product": {
            "id": "5ad2e19c-fc55-4b55-bb8b-9562219fedd4",
            "name": "Product 3384",
            "sku": "sku 3385",
            "updated_datetime": "2025-04-18T16:18:55.501281Z"
          },
          "quantity": "2"
        }
      ],
      "owner_id": "00000000-0000-0000-0000-0000011407f8",
      "status": "COMPLETED"
    }
  ]
}

GET /public/v1/assemblies returns proper data for biotrack assembly

GET /public/v1/assemblies?completion_datetime=2025-04-18+15%3A18%3A52.849922Z%2C2025-04-18+17%3A18%3A52.849922Z&creation_source=MANUALLY_CREATED&license_number=CDPH-00001094&page[number]=1
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI3MzIsImlhdCI6MTc0NDk5MzEzMiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNjI1NmUzZjUtMGI3OS00YTBhLWI2NzEtYmYzOTNiM2FmNWNhIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMTMxLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgwODk1NDEiLCJ0eXAiOiJhY2Nlc3MifQ.ljiWEndyip0ozpovoezEOyKgGX9G3tnWRLLc71H1h8E

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 7eb7a60a9f3f98000000000000000001-980208687f7dc673-0
{
  "data": [
    {
      "completion_datetime": "2025-04-18T16:18:52.849922Z",
      "compliance_type": "BIOTRACK",
      "creation_source": "MANUALLY_CREATED",
      "custom_data": [],
      "description": null,
      "estimated_work_hours": null,
      "estimated_work_minutes": null,
      "fulfilled": true,
      "id": "3bd7e331-852c-4371-9b77-d58c7b11324b",
      "is_metrc_processing_job": false,
      "license": {
        "id": "00000000-0000-0000-0000-00000035ac0d",
        "license_number": "CDPH-00001094"
      },
      "outputs": [
        {
          "additional_costs": [],
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004aeac0",
            "name": "B3120"
          },
          "compliance_label": null,
          "compliance_quantity": "1",
          "expiration_datetime": null,
          "ingredients": [
            {
              "batch": {
                "batch_number": null,
                "id": "00000000-0000-0000-0000-0000004aeac0",
                "name": "B3120"
              },
              "compliance_quantity": "1",
              "cost": 0,
              "location": {
                "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
                "company_id": "00000000-0000-0000-0000-000000cfb7b4",
                "id": "00000000-0000-0000-0000-00000053e4b0",
                "license_id": "00000000-0000-0000-0000-00000035ac0d",
                "name": "Place 1941"
              },
              "package": {
                "batch_number": null,
                "compliance_label": "273",
                "id": "00000000-0000-0000-0000-0000001b05e7",
                "metrc_label": "273",
                "status": "active"
              },
              "product": {
                "id": "6238dea6-c31a-4fed-beef-e20f2e9d9e68",
                "name": "Product 3116",
                "sku": "sku 3117",
                "updated_datetime": "2025-04-18T16:18:52.516461Z"
              },
              "quantity": "1"
            }
          ],
          "is_production_batch": false,
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfb7b4",
            "id": "00000000-0000-0000-0000-00000053e4b0",
            "license_id": "00000000-0000-0000-0000-00000035ac0d",
            "name": "Place 1941"
          },
          "package": {
            "batch_number": null,
            "compliance_label": null,
            "id": "00000000-0000-0000-0000-0000001b05ed",
            "metrc_label": null,
            "status": "active"
          },
          "package_datetime": null,
          "package_unit_type": {
            "id": "00000000-0000-0000-0000-00000b75ff74",
            "name": "Gram"
          },
          "product": {
            "id": "6238dea6-c31a-4fed-beef-e20f2e9d9e68",
            "name": "Product 3116",
            "sku": "sku 3117",
            "updated_datetime": "2025-04-18T16:18:52.516461Z"
          },
          "quantity": "1"
        }
      ],
      "owner_id": "00000000-0000-0000-0000-000001140645",
      "status": "COMPLETED"
    }
  ]
}

Get assemblies ordered from oldest to newest by their last modified date.

Note: The page size for this endpoint is 500 assemblies per page. This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses.

Request

GET /public/v1/assemblies

Parameters

Parameter Description In Type Required Default Example
completion_datetime Filter assemblies by their completion datetime query string false 2022-07-10T00:00:00Z,
page Pagination information body Page false
creation_source Filter assemblies by their creation source. Options include MANUALLY_CREATED, SPLIT_PACKAGE, SALES_ORDER and LAB_TESTING query string false
license_number Filter assemblies by their license number query string false

Responses

Status Description Schema
200 A list of assemblies Assemblies

Batch

Get batches

GET /public/v1/batches returns batches related to the company

GET /public/v1/batches
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI3MTIsImlhdCI6MTc0NDk5MzExMiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiZDM1ZjI4ZTItNzcyYS00ZDQyLTk3YjQtNDhmNjkwMjdjNjAzIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMTExLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgwODU4NjciLCJ0eXAiOiJhY2Nlc3MifQ.p7GadfO97f189eXC0N3z_41N7bN1cXqGu1MTokLOig4

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 93dda3087b5408000000000000000001-012bf833755ad199-0
{
  "data": [
    {
      "batch_number": null,
      "custom_data": [
        {
          "id": 64350,
          "name": "Custom Field 14",
          "value": "Custom Data 1"
        }
      ],
      "description": null,
      "expiration_date": "2024-01-01T00:00:00.000000Z",
      "id": "00000000-0000-0000-0000-0000004ae79d",
      "name": "B486",
      "owner_id": "00000000-0000-0000-0000-00000113f7ee",
      "primary_test_result": null,
      "product_id": "8241c6c4-989f-47d3-adcc-82b718325202"
    },
    {
      "batch_number": null,
      "custom_data": [
        {
          "id": 64350,
          "name": "Custom Field 14",
          "value": null
        }
      ],
      "description": null,
      "expiration_date": null,
      "id": "00000000-0000-0000-0000-0000004ae79e",
      "name": "B491",
      "owner_id": "00000000-0000-0000-0000-00000113f7f3",
      "primary_test_result": {
        "cbd_mg_per_unit": "1",
        "cbd_mg_per_unit_total": "2",
        "cbd_percentage": "3",
        "cbd_percentage_total": "4",
        "mg_per_unit_type": "mg/mL",
        "name": "File.pdf",
        "thc_mg_per_unit": "5",
        "thc_mg_per_unit_total": "6",
        "thc_percentage": "7",
        "thc_percentage_total": "8"
      },
      "product_id": "572ddc62-a958-4001-9ccb-22d443123a4b"
    }
  ]
}

Get batches sorted by their creation date and filtered by various attributes.

Note: The page size for this endpoint is 5000 batches per page. This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses.

Request

GET /public/v1/batches

Parameters

Parameter Description In Type Required Default Example
inserted_datetime Filter batches by their creation datetime query string false 2022-07-10T00:00:00Z,
page Pagination information body Page false
updated_datetime Filter batches by the datetime they were most recently modified query string false ,2022-07-10T00:00:00Z

Responses

Status Description Schema
200 A list of batches Batches

Create a batch

POST /public/v1/batches Errors from service messages are properly reflected in the response

POST /public/v1/batches
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI3MTMsImlhdCI6MTc0NDk5MzExMywiaXNzIjoiRGlzdHJ1IiwianRpIjoiZDRlZTgzN2MtYzU5Yy00MTBhLWI1NDgtOTI0NWJlMzVmYWI1IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMTEyLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgwODYxMTgiLCJ0eXAiOiJhY2Nlc3MifQ.BVLST65_Q4R0PX29pLY68rRVUNMFdt35hBgXEGcHvdA
{
  "owner_id": "c1aa4685-e33e-4e58-8f0b-d604a1651974",
  "product_id": "9c82f874-9a7a-490a-a67e-1e99d2e31aaa"
}

Response

400
cache-control: max-age=0, private, must-revalidate
content-type: application/json; charset=utf-8
b3: 56986298142d34000000000000000001-9ecbf43c3134032c-0
{
  "errors": [
    {
      "context": {},
      "message": "Owner not found",
      "pointer": ["owner_id"],
      "section": "body"
    },
    {
      "context": {},
      "message": "Product not found",
      "pointer": ["product_id"],
      "section": "body"
    },
    {
      "context": {},
      "message": "Unable to verify inventory tracking method",
      "pointer": ["product_id"],
      "section": "body"
    }
  ]
}

POST /public/v1/batches Can create batch with all optional fields missing

POST /public/v1/batches
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI3MDksImlhdCI6MTc0NDk5MzEwOSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMDY3NzlmY2YtMzQ2MS00MGFiLTg3MTEtZDAwNGI1MTQ1MWIwIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMTA4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgwODUzMjgiLCJ0eXAiOiJhY2Nlc3MifQ.7GdStBAd6yfQAit6kcI9DHUZTt1RQCTIRwzI0nCkQeM
{
  "product_id": "9aa0c123-8f02-4dff-9513-067bb0ad2b95"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 898fdbd94d4908000000000000000001-aebd666195cf4cbd-0
{
  "data": {
    "batch_number": null,
    "custom_data": [],
    "description": null,
    "expiration_date": null,
    "id": "00000000-0000-0000-0000-0000004ae763",
    "name": "B1",
    "owner_id": null,
    "product_id": "9aa0c123-8f02-4dff-9513-067bb0ad2b95"
  }
}

POST /public/v1/batches Can create batch with all optional fields provided

POST /public/v1/batches
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI3MTMsImlhdCI6MTc0NDk5MzExMywiaXNzIjoiRGlzdHJ1IiwianRpIjoiMzA3OWUwYzAtMWQ4Yy00NmE0LWE0NTItZWVlYTEyZDBkM2IzIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMTEyLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgwODYwNjYiLCJ0eXAiOiJhY2Nlc3MifQ.4WUAAV6vnDpjvZXF837VjowTh8tD5V9ZTXaxfjdoT_U
{
  "batch_number": "B1",
  "description": "Test batch",
  "expiration_date": "2025-01-01T00:00:00.000000Z",
  "owner_id": "00000000-0000-0000-0000-00000113f8bb",
  "product_id": "8bafb7ca-c7ab-4a28-979e-0c613f794316"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 9e3249b1337e10000000000000000001-1fc463977fa4157f-0
{
  "data": {
    "batch_number": "B1",
    "custom_data": [],
    "description": "Test batch",
    "expiration_date": "2025-01-01T00:00:00.000000Z",
    "id": "00000000-0000-0000-0000-0000004ae7c6",
    "name": "B1",
    "owner_id": "00000000-0000-0000-0000-00000113f8bb",
    "product_id": "8bafb7ca-c7ab-4a28-979e-0c613f794316"
  }
}

Create a single batch.

Request

POST /public/v1/batches

Parameters

Parameter Description In Type Required Default Example
product_id The ID of the product that this batch belongs to. query string false
batch_number The batch number of the batch. query string false
expiration_date The expiration date of the batch. query string false
owner_id The ID of the user that is the designated owner of this batch. query string false
description The description of the batch. query string false

Responses

Status Description Schema
200 A single batch Batch

Company

Get companies

GET /public/companies returns companies related to the company

GET /public/v1/companies
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5NTMsImlhdCI6MTc0NDk5MzM1MywiaXNzIjoiRGlzdHJ1IiwianRpIjoiOWQ3YWEwNDAtMjhhMi00MjcxLTlmZWQtNGUxZDFkNThlZTM2IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzUyLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMjQ0MTkiLCJ0eXAiOiJhY2Nlc3MifQ.qaYYTbjrQ5KGqDgvyb1iGFoAH5F2-Edl709qjskgtyE

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: e71f32e2a9db50000000000000000001-781930651ea15524-0
{
  "data": [
    {
      "category": "Retailer",
      "custom_data": [
        {
          "id": 64446,
          "name": "Custom Field 140",
          "value": "Custom Data 1"
        }
      ],
      "default_email": "company-1@example.com",
      "default_purchase_order_notes": "Default Purchase Order Notes 1",
      "default_sales_order_notes": "Default Order External Notes 1",
      "id": "00000000-0000-0000-0000-0000007a2e0d",
      "invoice_email": "invoice email",
      "legal_business_name": "Company Legal Name 1",
      "licenses": [],
      "locations": [
        {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d015ee",
          "id": "00000000-0000-0000-0000-000000540d91",
          "license_id": null,
          "name": "Place 12227"
        }
      ],
      "name": "Company 27798",
      "order_shipment_email": "order shipment email",
      "outstanding_balance_threshold": 1000,
      "owner_id": "00000000-0000-0000-0000-000001148e8f",
      "phone_number": "1234567890",
      "purchase_order_email": "purchase email",
      "relationship_type": {
        "id": "00000000-0000-0000-0000-00000003c3a1",
        "name": "Supplier"
      },
      "sales_order_email": "order email",
      "updated_datetime": "2023-11-03T00:00:00.000000Z",
      "website": "https://www.example.com"
    },
    {
      "category": "Other",
      "custom_data": [
        {
          "id": 64446,
          "name": "Custom Field 140",
          "value": null
        }
      ],
      "default_email": "company-67350@example.com",
      "default_purchase_order_notes": null,
      "default_sales_order_notes": null,
      "id": "00000000-0000-0000-0000-0000007a2e10",
      "invoice_email": null,
      "legal_business_name": "Company Legal Name 27801",
      "licenses": [
        {
          "id": "00000000-0000-0000-0000-00000035c735",
          "license_number": "CDPH-00008919"
        }
      ],
      "locations": [],
      "name": "Company 27801",
      "order_shipment_email": null,
      "outstanding_balance_threshold": null,
      "owner_id": null,
      "phone_number": null,
      "purchase_order_email": null,
      "relationship_type": null,
      "sales_order_email": null,
      "updated_datetime": "2023-12-02T00:00:00.000000Z",
      "website": null
    }
  ]
}

Get companies sorted by their creation date and filtered by various attributes

Note: The page size for this endpoint is 5000 companies per page. This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses.

Request

GET /public/v1/companies

Parameters

Parameter Description In Type Required Default Example
inserted_datetime Filter companies by their creation datetime query string false 2022-07-10T00:00:00Z,
page Pagination information body Page false
updated_datetime Filter companies by the datetime they were most recently modified query string false ,2022-07-10T00:00:00Z

Responses

Status Description Schema
200 A list of companies Companies

Contact

Get contacts

GET /public/v1/contacts returns contacts related to the company

GET /public/v1/contacts
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI3MTQsImlhdCI6MTc0NDk5MzExNCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNWY5YmZjNzItZTYxZC00ZGI1LWEzYzMtYmVkMWFkMjNmZTA5IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMTEzLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgwODYzMDUiLCJ0eXAiOiJhY2Nlc3MifQ.7FIr76LYt3MGs9DsEbwvU2UOPNOtstBKs5wEjqKbUKQ

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 80f604eafb6ab8000000000000000001-0c7bf5936b1f684a-0
{
  "data": [
    {
      "company": {
        "id": "00000000-0000-0000-0000-00000079f294"
      },
      "custom_data": [
        {
          "id": 64351,
          "name": "Custom Field 15",
          "value": "Custom Data 1"
        }
      ],
      "email": "email1",
      "full_name": "FirstName3078 LastName3079",
      "id": "00000000-0000-0000-0000-000000012446",
      "owner": {
        "id": "00000000-0000-0000-0000-00000113f9a4"
      },
      "phone_number": "1234567890",
      "title": null
    },
    {
      "company": {
        "id": "00000000-0000-0000-0000-00000079f296"
      },
      "custom_data": [
        {
          "id": 64351,
          "name": "Custom Field 15",
          "value": null
        }
      ],
      "email": "email2",
      "full_name": "FirstName3080 LastName3081",
      "id": "00000000-0000-0000-0000-000000012447",
      "owner": {
        "id": "00000000-0000-0000-0000-00000113f9a8"
      },
      "phone_number": "1234567890",
      "title": null
    }
  ]
}

Get contacts sorted by their creation date and filtered by various attributes

Note: The page size for this endpoint is 1000 contacts per page. This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses.

Request

GET /public/v1/contacts

Parameters

Parameter Description In Type Required Default Example
inserted_datetime Filter contacts by their creation datetime query string false 2022-07-10T00:00:00Z,
page Pagination information body Page false
updated_datetime Filter contacts by the datetime they were most recently modified query string false ,2022-07-10T00:00:00Z

Responses

Status Description Schema
200 A list of contacts Contacts

Inventory

Get inventory levels

GET /public/inventory returns stock quantities filtered by product IDs

GET /public/v1/inventory?grouping[]=PRODUCT&product_ids[]=eb596b70-d3fc-45eb-81c2-0c0c740dc4a7
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5MDEsImlhdCI6MTc0NDk5MzMwMSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMTU0MTljZGYtYWE4YS00ZDY1LTk1ZTItMTliYzEwNmMyOTI5IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzAwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMTQ3NDgiLCJ0eXAiOiJhY2Nlc3MifQ.m-40fyvw0dpvxog63FI4Q0YyczRbRN05j-U0gg2cgWQ

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 25884c79b76d9c000000000000000001-501b541ac0884b8c-0
{
  "data": [
    {
      "active": "10.000000000",
      "available": "10.000000000",
      "product_id": "eb596b70-d3fc-45eb-81c2-0c0c740dc4a7",
      "updated_datetime": "2025-04-18T16:21:41.122405Z"
    }
  ]
}

GET /public/inventory returns stock quantities grouped by product

GET /public/v1/inventory?grouping[]=PRODUCT
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5MDEsImlhdCI6MTc0NDk5MzMwMSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNGU2YmM5NDktMzU4Ny00ODYzLWE1MDItZmQ1YjM4NTE5ZGM4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzAwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMTQ5MzQiLCJ0eXAiOiJhY2Nlc3MifQ.a4Pki6BvCGpoU8kVhIZTGaeci3NAe4FtoReVTVSGfs8

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 57accd750ae938000000000000000001-9be8a96d4b80e1c9-0
{
  "data": [
    {
      "active": "50.000000000",
      "available": "50.000000000",
      "product_id": "04780e98-829e-41eb-b88a-2f8191daabe7",
      "updated_datetime": "2023-11-05T00:00:00.000000Z"
    },
    {
      "active": "100.000000000",
      "available": "90.000000000",
      "product_id": "a9b821a4-4087-4143-a1e1-eec8d8f94e69",
      "updated_datetime": "2023-12-03T00:00:00.000000Z"
    },
    {
      "active": "95.000000000",
      "available": "80.000000000",
      "product_id": "fce8b76b-3ceb-4bea-87d7-7e04ce00a8da",
      "updated_datetime": "2023-11-06T00:00:00.000000Z"
    }
  ]
}

GET /public/inventory returns stock quantities grouped by product & location

GET /public/v1/inventory?grouping[]=PRODUCT&grouping[]=LOCATION
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4OTksImlhdCI6MTc0NDk5MzI5OSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMjk1YTE2YjgtZWMxMC00NDE5LTllYmItOTcxYzQ5OTIzMjBjIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjk4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMTQ1NzkiLCJ0eXAiOiJhY2Nlc3MifQ.DwORSbaL-OXG5xPmtNlMMYiLbX-IrNuOgvYmBla79AA

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 0beb4b3d8db3df800000000000000001-699abe3a22944b01-0
{
  "data": [
    {
      "active": "100.000000000",
      "available": "85.000000000",
      "location_id": "00000000-0000-0000-0000-00000054032f",
      "product_id": "0f73f4ba-008a-4d6f-b0eb-0f4531d6317b",
      "updated_datetime": "2030-10-03T00:00:00.000000Z"
    },
    {
      "active": "90.000000000",
      "available": "82.000000000",
      "location_id": "00000000-0000-0000-0000-000000540330",
      "product_id": "0f73f4ba-008a-4d6f-b0eb-0f4531d6317b",
      "updated_datetime": "2030-10-04T00:00:00.000000Z"
    },
    {
      "active": "150.000000000",
      "available": "129.000000000",
      "location_id": "00000000-0000-0000-0000-000000540331",
      "product_id": "0f73f4ba-008a-4d6f-b0eb-0f4531d6317b",
      "updated_datetime": "2030-10-05T00:00:00.000000Z"
    },
    {
      "active": "0.000000000",
      "available": "-1.000000000",
      "location_id": null,
      "product_id": "0f73f4ba-008a-4d6f-b0eb-0f4531d6317b",
      "updated_datetime": "2030-10-08T00:00:00.000000Z"
    },
    {
      "active": "100.000000000",
      "available": "90.000000000",
      "location_id": "00000000-0000-0000-0000-00000054032f",
      "product_id": "1f601561-33a4-4acd-a505-66df0e2c9f28",
      "updated_datetime": "2030-10-01T00:00:00.000000Z"
    },
    {
      "active": "0.000000000",
      "available": "-1.000000000",
      "location_id": "00000000-0000-0000-0000-000000540330",
      "product_id": "1f601561-33a4-4acd-a505-66df0e2c9f28",
      "updated_datetime": "2030-10-02T00:00:00.000000Z"
    },
    {
      "active": "100.000000000",
      "available": "100.000000000",
      "location_id": "00000000-0000-0000-0000-000000540330",
      "product_id": "4ac0cefd-380c-4f8f-b426-05c32e813f5e",
      "updated_datetime": "2030-09-01T00:00:00.000000Z"
    },
    {
      "active": "30.000000000",
      "available": "26.000000000",
      "location_id": null,
      "product_id": "4ac0cefd-380c-4f8f-b426-05c32e813f5e",
      "updated_datetime": "2030-10-07T00:00:00.000000Z"
    }
  ]
}

GET /public/inventory returns stock quantities grouped by product & batch number

GET /public/v1/inventory?grouping[]=PRODUCT&grouping[]=BATCH_NUMBER
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5MDMsImlhdCI6MTc0NDk5MzMwMywiaXNzIjoiRGlzdHJ1IiwianRpIjoiYTc0MjlkNzYtMWUzNi00OWY1LWIyMjktZmY0NzQ3N2EyZDU2IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzAyLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMTUyMTciLCJ0eXAiOiJhY2Nlc3MifQ.2Zcatgi07h3iBsm_MaAWFJIaR3XtZaj6DNp52KQMfgw

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 8a6d57cc32fa40000000000000000001-7daef366b205733d-0
{
  "data": [
    {
      "active": "26.000000000",
      "available": "26.000000000",
      "batch_number": null,
      "product_id": "2d73f33d-a052-4e94-a001-af2f3fa0ba04",
      "updated_datetime": "2030-12-01T00:00:00.000000Z"
    },
    {
      "active": "27.000000000",
      "available": "27.000000000",
      "batch_number": "1",
      "product_id": "2d73f33d-a052-4e94-a001-af2f3fa0ba04",
      "updated_datetime": "2030-12-02T00:00:00.000000Z"
    },
    {
      "active": "8.000000000",
      "available": "8.000000000",
      "batch_number": "TEST-1",
      "product_id": "794247fb-20b6-4022-9cd9-e62acad9aa9a",
      "updated_datetime": "2030-09-01T00:00:00.000000Z"
    },
    {
      "active": "19.000000000",
      "available": "19.000000000",
      "batch_number": null,
      "product_id": "7c6b132c-b3f5-4fd9-b8fc-1db7c34f0586",
      "updated_datetime": "2030-10-02T00:00:00.000000Z"
    },
    {
      "active": "13.000000000",
      "available": "13.000000000",
      "batch_number": "TEST-1",
      "product_id": "7c6b132c-b3f5-4fd9-b8fc-1db7c34f0586",
      "updated_datetime": "2030-10-04T00:00:00.000000Z"
    },
    {
      "active": "43.000000000",
      "available": "43.000000000",
      "batch_number": null,
      "product_id": "cc30ff57-d9a0-4bac-a055-053b7984c357",
      "updated_datetime": "2030-11-02T00:00:00.000000Z"
    },
    {
      "active": "47.000000000",
      "available": "47.000000000",
      "batch_number": "1",
      "product_id": "cc30ff57-d9a0-4bac-a055-053b7984c357",
      "updated_datetime": "2030-11-04T00:00:00.000000Z"
    },
    {
      "active": "25.000000000",
      "available": "25.000000000",
      "batch_number": "2",
      "product_id": "cc30ff57-d9a0-4bac-a055-053b7984c357",
      "updated_datetime": "2030-11-05T00:00:00.000000Z"
    }
  ]
}

GET /public/inventory returns stock quantities grouped by product & location & batch number

GET /public/v1/inventory?grouping[]=PRODUCT&grouping[]=LOCATION&grouping[]=BATCH_NUMBER
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4OTcsImlhdCI6MTc0NDk5MzI5NywiaXNzIjoiRGlzdHJ1IiwianRpIjoiNGY2MmVlMjEtY2JhZi00MzBiLTkxNTktZTNkM2EyNDc0NzdiIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjk2LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMTQyMzgiLCJ0eXAiOiJhY2Nlc3MifQ._zKvAkWGnQR521E2UrwEXzKySqO-GzdjVAhtTmRdKwk

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 116294c509a15a000000000000000001-fcd0ca33bd2a2628-0
{
  "data": [
    {
      "active": "41.000000000",
      "available": "41.000000000",
      "batch_number": null,
      "location_id": "00000000-0000-0000-0000-0000005402c6",
      "product_id": "71ba311f-d9f6-4121-b07f-d6d635180d1f",
      "updated_datetime": "2031-01-02T00:00:00.000000Z"
    },
    {
      "active": "49.000000000",
      "available": "49.000000000",
      "batch_number": "TEST-1",
      "location_id": "00000000-0000-0000-0000-0000005402c6",
      "product_id": "71ba311f-d9f6-4121-b07f-d6d635180d1f",
      "updated_datetime": "2031-02-02T00:00:00.000000Z"
    },
    {
      "active": "45.000000000",
      "available": "45.000000000",
      "batch_number": null,
      "location_id": "00000000-0000-0000-0000-0000005402c7",
      "product_id": "71ba311f-d9f6-4121-b07f-d6d635180d1f",
      "updated_datetime": "2031-01-04T00:00:00.000000Z"
    },
    {
      "active": "53.000000000",
      "available": "53.000000000",
      "batch_number": "TEST-1",
      "location_id": "00000000-0000-0000-0000-0000005402c7",
      "product_id": "71ba311f-d9f6-4121-b07f-d6d635180d1f",
      "updated_datetime": "2031-02-04T00:00:00.000000Z"
    },
    {
      "active": "21.000000000",
      "available": "21.000000000",
      "batch_number": null,
      "location_id": "00000000-0000-0000-0000-0000005402c6",
      "product_id": "c2dc64d2-b8ec-4dd9-86e3-06c9b2f6184c",
      "updated_datetime": "2030-11-02T00:00:00.000000Z"
    },
    {
      "active": "29.000000000",
      "available": "29.000000000",
      "batch_number": "TEST-1",
      "location_id": "00000000-0000-0000-0000-0000005402c6",
      "product_id": "c2dc64d2-b8ec-4dd9-86e3-06c9b2f6184c",
      "updated_datetime": "2030-12-02T00:00:00.000000Z"
    },
    {
      "active": "25.000000000",
      "available": "25.000000000",
      "batch_number": null,
      "location_id": "00000000-0000-0000-0000-0000005402c7",
      "product_id": "c2dc64d2-b8ec-4dd9-86e3-06c9b2f6184c",
      "updated_datetime": "2030-11-04T00:00:00.000000Z"
    },
    {
      "active": "33.000000000",
      "available": "33.000000000",
      "batch_number": "TEST-1",
      "location_id": "00000000-0000-0000-0000-0000005402c7",
      "product_id": "c2dc64d2-b8ec-4dd9-86e3-06c9b2f6184c",
      "updated_datetime": "2030-12-04T00:00:00.000000Z"
    }
  ]
}

Get active and available quantities grouped by a specified list of attributes. Groups with 0 active and 0 available quantity won't be returned. Groups are sorted by the IDs of the attributes they are grouped by. Note: The page size for this endpoint is 5000 groups per page. This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses.

Request

GET /public/v1/inventory

Parameters

Parameter Description In Type Required Default Example
grouping Attributes to group inventory by. PRODUCT is required to be in the list. Accepted values are "BATCH_NUMBER", "LOCATION" and "PRODUCT". query array false ["PRODUCT","LOCATION"]
page Pagination information body Page false
product_ids Filter inventory levels by product IDs query array false ["67ae9080-8dc2-4ab7-9704-19673f4d9f21","213c7080-8dc2-4ab7-9704-19673f4d9f22"]

Responses

Status Description Schema
200 A list of active and available quantity for each group Inventories

Invoice

Get invoices

GET /invoices/ returns invoices related to the access token's company

GET /public/v1/invoices
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5NzksImlhdCI6MTc0NDk5MzM3OSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiN2JlZjI0ZWItNTU5Yy00MGNiLWFmMDYtYjkxMjljZTAwNmU1IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzc4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzA0MzgiLCJ0eXAiOiJhY2Nlc3MifQ.v4j--1GFdfm2bNneMtnEkXB_unAYxFS4exlD9wMk1vU

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: b58a2ed79589f8000000000000000001-33cec4fa3d3f99a8-0
{
  "data": [
    {
      "charges": [],
      "company": {
        "id": "00000000-0000-0000-0000-0000007a38f9",
        "name": "Company 32348",
        "updated_datetime": "2025-04-18T16:23:00.236744Z"
      },
      "creator": {
        "banned": false,
        "email": "owner-46229@example.com",
        "full_name": "FirstName90752 LastName90753",
        "id": "00000000-0000-0000-0000-00000114a65f",
        "role": {
          "id": "00000000-0000-0000-0000-00000112f9d1",
          "name": "Admin 45498"
        }
      },
      "custom_data": [
        {
          "id": 64494,
          "name": "Custom Field 188",
          "value": null
        }
      ],
      "due_datetime": "2025-04-18T16:23:00.427494Z",
      "id": "00000000-0000-0000-0000-00000006a34e",
      "inserted_datetime": "2025-04-18T16:23:00.429425Z",
      "invoice_datetime": "2025-04-18T16:23:00.427492Z",
      "invoice_number": "Invoice #827",
      "items": [
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b1615",
            "name": "B36513"
          },
          "id": "00000000-0000-0000-0000-000000083896",
          "order_item_id": "c82c03a7-fd59-47a1-b881-85271f1138be",
          "package": null,
          "price": "10.000000000",
          "product": {
            "id": "92992519-c2a5-4e39-849f-5be07f64a889",
            "name": "Product 36509",
            "sku": "sku 36510",
            "updated_datetime": "2025-04-18T16:23:00.261094Z"
          },
          "quantity": "10.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b1616",
            "name": "B36520"
          },
          "id": "00000000-0000-0000-0000-000000083897",
          "order_item_id": "1654069b-f788-47cd-a506-21a31c90172d",
          "package": null,
          "price": "10.000000000",
          "product": {
            "id": "d6d27f6a-2ca4-4bcf-9368-3bb406d0a155",
            "name": "Product 36516",
            "sku": "sku 36517",
            "updated_datetime": "2025-04-18T16:23:00.293650Z"
          },
          "quantity": "10.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        }
      ],
      "order": {
        "id": "0834c226-f0b6-48ae-8b2d-e19b75854c52",
        "order_number": "SO-2238",
        "status": "Pending",
        "total": "320.00"
      },
      "owner": {
        "banned": false,
        "email": "owner-46229@example.com",
        "full_name": "FirstName90752 LastName90753",
        "id": "00000000-0000-0000-0000-00000114a65f",
        "role": {
          "id": "00000000-0000-0000-0000-00000112f9d1",
          "name": "Admin 45498"
        }
      },
      "paid_amount": "0.0",
      "status": "NOT_PAID",
      "total": "32.00",
      "updated_datetime": "2025-04-18T16:23:00.429425Z"
    },
    {
      "charges": [
        {
          "id": "ff8f5bce-d3b2-4106-ad70-695ce56104c2",
          "name": "C1",
          "percent": "10.0000",
          "price": "1.00",
          "type": "CHARGE",
          "unit_type": "PERCENT"
        }
      ],
      "company": {
        "id": "00000000-0000-0000-0000-0000007a38d6",
        "name": "Company 32290",
        "updated_datetime": "2025-04-18T16:22:59.937181Z"
      },
      "creator": {
        "banned": false,
        "email": "user1@a.com",
        "full_name": "John Foo",
        "id": "00000000-0000-0000-0000-00000114a601",
        "role": {
          "id": "00000000-0000-0000-0000-00000112f973",
          "name": "Admin 45404"
        }
      },
      "custom_data": [
        {
          "id": 64494,
          "name": "Custom Field 188",
          "value": "Custom Field Value 1"
        }
      ],
      "due_datetime": "2020-01-01T00:00:01.000000Z",
      "id": "00000000-0000-0000-0000-00000006a34d",
      "inserted_datetime": "2025-04-18T16:22:59.983943Z",
      "invoice_datetime": "2020-01-01T00:00:02.000000Z",
      "invoice_number": "INV-123",
      "items": [
        {
          "batch": {
            "batch_number": "UID1",
            "id": "00000000-0000-0000-0000-0000004b1602",
            "name": "B1"
          },
          "id": "00000000-0000-0000-0000-000000083895",
          "order_item_id": "ed9fb421-431f-4195-8f2a-b46fd4036385",
          "package": {
            "batch_number": "B1",
            "compliance_label": "ABCDEF012345670000080033",
            "id": "00000000-0000-0000-0000-0000001b1695",
            "metrc_label": "ABCDEF012345670000080033",
            "status": "active"
          },
          "price": "10.000000000",
          "product": {
            "id": "273aa242-ac60-4523-aa8d-bef2f6b8ad23",
            "name": "P1",
            "sku": "SKU1",
            "updated_datetime": "2025-04-18T16:22:59.890009Z"
          },
          "quantity": "1.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        }
      ],
      "order": {
        "id": "dc8437e9-2191-4d6d-8e8b-781da32155ae",
        "order_number": "SO-123",
        "status": "Completed",
        "total": "10.00"
      },
      "owner": {
        "banned": false,
        "email": "user2@a.com",
        "full_name": "John Bar",
        "id": "00000000-0000-0000-0000-00000114a603",
        "role": {
          "id": "00000000-0000-0000-0000-00000112f976",
          "name": "Admin 45407"
        }
      },
      "paid_amount": "5.00",
      "status": "PARTIALLY_PAID",
      "total": "8.00",
      "updated_datetime": "2025-04-18T16:23:00.088202Z"
    }
  ]
}

GET /invoices/ returns cost/returned_quantity data for invoice items

GET /public/v1/invoices
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5ODgsImlhdCI6MTc0NDk5MzM4OCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiZWY0OWNjYjUtNTJiYy00ZDEyLTk1MzgtNGMyYmM3ZDQ2M2YxIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzg3LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzIyNjciLCJ0eXAiOiJhY2Nlc3MifQ.foQ-0XnDsdv_wwh3E9DLOES74OmN_YuqMG7t5_hKXTI

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: ec2b4219a81180000000000000000001-49cb5d36ec84c75a-0
{
  "data": [
    {
      "charges": [],
      "company": {
        "id": "00000000-0000-0000-0000-0000007a3c41",
        "name": "Company 33667",
        "updated_datetime": "2025-04-18T16:23:09.125706Z"
      },
      "creator": {
        "banned": false,
        "email": "owner-48148@example.com",
        "full_name": "FirstName94396 LastName94397",
        "id": "00000000-0000-0000-0000-00000114ad93",
        "role": {
          "id": "00000000-0000-0000-0000-0000011300f4",
          "name": "Admin 47325"
        }
      },
      "custom_data": [],
      "due_datetime": "2025-04-18T16:23:09.381913Z",
      "id": "00000000-0000-0000-0000-00000006a38b",
      "inserted_datetime": "2025-04-18T16:23:09.382812Z",
      "invoice_datetime": "2025-04-18T16:23:09.381911Z",
      "invoice_number": "Invoice #874",
      "items": [
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b17ef",
            "name": "B38177"
          },
          "id": "00000000-0000-0000-0000-0000000838e1",
          "order_item_id": "24f72efd-4016-44cc-967b-9fc318d65641",
          "package": null,
          "price": "208801.000000000",
          "product": {
            "id": "5ed35c95-30c6-4e49-9bec-b12f41538113",
            "name": "Product 38172",
            "sku": "sku 38173",
            "updated_datetime": "2025-04-18T16:23:09.003549Z"
          },
          "quantity": "2.000000000",
          "returned_quantity": "2",
          "total_cost_actual": "20.052",
          "total_cost_default": "10"
        }
      ],
      "order": {
        "id": "befe4b57-2c8e-4a0b-a7a4-ca00580083d0",
        "order_number": "SO-0000001",
        "status": "Processing",
        "total": "417602.00"
      },
      "owner": {
        "banned": false,
        "email": "owner-48148@example.com",
        "full_name": "FirstName94396 LastName94397",
        "id": "00000000-0000-0000-0000-00000114ad93",
        "role": {
          "id": "00000000-0000-0000-0000-0000011300f4",
          "name": "Admin 47325"
        }
      },
      "paid_amount": "0.0",
      "status": "NOT_PAID",
      "total": "32.00",
      "updated_datetime": "2025-04-18T16:23:09.382812Z"
    }
  ]
}

GET /invoices/ allows filtering by several statuses

GET /public/v1/invoices?status[]=Fully+Paid&status[]=Not+Paid
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5ODcsImlhdCI6MTc0NDk5MzM4NywiaXNzIjoiRGlzdHJ1IiwianRpIjoiYjdkM2FiODQtYWMxMy00NTkwLTk4ODMtYzUzYjc1MmRmM2QwIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzg2LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzIwNDMiLCJ0eXAiOiJhY2Nlc3MifQ.sWPJ67xrf9ofAKgfKUZQVsqcVyjCtMmHjeWYrOA4tpo

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 8d9849663dd520000000000000000001-a75ce04cc75c7c37-0
{
  "data": [
    {
      "charges": [],
      "company": {
        "id": "00000000-0000-0000-0000-0000007a3c08",
        "name": "Company 33591",
        "updated_datetime": "2025-04-18T16:23:08.641945Z"
      },
      "creator": {
        "banned": false,
        "email": "owner-47966@example.com",
        "full_name": "FirstName94062 LastName94063",
        "id": "00000000-0000-0000-0000-00000114ace8",
        "role": {
          "id": "00000000-0000-0000-0000-000001130050",
          "name": "Admin 47161"
        }
      },
      "custom_data": [],
      "due_datetime": "2025-04-18T16:23:08.792020Z",
      "id": "00000000-0000-0000-0000-00000006a387",
      "inserted_datetime": "2025-04-18T16:23:08.793419Z",
      "invoice_datetime": "2020-01-01T12:30:00.000000Z",
      "invoice_number": "Invoice #870",
      "items": [
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b17db",
            "name": "B38097"
          },
          "id": "00000000-0000-0000-0000-0000000838dd",
          "order_item_id": "111eb8e2-2694-4e0e-89bc-6f45992d1bee",
          "package": null,
          "price": "10.000000000",
          "product": {
            "id": "1e8050cc-accd-4d29-9d92-31d40dbee523",
            "name": "Product 38095",
            "sku": "sku 38096",
            "updated_datetime": "2025-04-18T16:23:08.665518Z"
          },
          "quantity": "10.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b17dd",
            "name": "B38107"
          },
          "id": "00000000-0000-0000-0000-0000000838de",
          "order_item_id": "62ebdccd-acc2-4501-898f-6604c4d047a8",
          "package": null,
          "price": "10.000000000",
          "product": {
            "id": "6568d0da-e684-483c-888a-ea894962ef52",
            "name": "Product 38105",
            "sku": "sku 38106",
            "updated_datetime": "2025-04-18T16:23:08.688132Z"
          },
          "quantity": "10.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        }
      ],
      "order": {
        "id": "3b65790d-356d-463c-a19c-ad7d74757169",
        "order_number": "SO-2346",
        "status": "Pending",
        "total": "320.00"
      },
      "owner": {
        "banned": false,
        "email": "owner-47966@example.com",
        "full_name": "FirstName94062 LastName94063",
        "id": "00000000-0000-0000-0000-00000114ace8",
        "role": {
          "id": "00000000-0000-0000-0000-000001130050",
          "name": "Admin 47161"
        }
      },
      "paid_amount": "0.0",
      "status": "NOT_PAID",
      "total": "32.00",
      "updated_datetime": "2025-04-18T16:23:08.793419Z"
    },
    {
      "charges": [],
      "company": {
        "id": "00000000-0000-0000-0000-0000007a3bf8",
        "name": "Company 33571",
        "updated_datetime": "2025-04-18T16:23:08.421341Z"
      },
      "creator": {
        "banned": false,
        "email": "owner-47943@example.com",
        "full_name": "FirstName94016 LastName94017",
        "id": "00000000-0000-0000-0000-00000114acd1",
        "role": {
          "id": "00000000-0000-0000-0000-000001130038",
          "name": "Admin 47137"
        }
      },
      "custom_data": [],
      "due_datetime": "2025-04-18T16:23:08.580307Z",
      "id": "00000000-0000-0000-0000-00000006a384",
      "inserted_datetime": "2025-04-18T16:23:08.582297Z",
      "invoice_datetime": "2020-01-01T12:20:00.000000Z",
      "invoice_number": "Invoice #868",
      "items": [
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b17ce",
            "name": "B38060"
          },
          "id": "00000000-0000-0000-0000-0000000838d7",
          "order_item_id": "84c705ec-e453-4618-8cd9-62e540c27b20",
          "package": null,
          "price": "10.000000000",
          "product": {
            "id": "506e35ec-d198-43f7-a903-564b1907f01b",
            "name": "Product 38057",
            "sku": "sku 38058",
            "updated_datetime": "2025-04-18T16:23:08.444434Z"
          },
          "quantity": "10.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b17cf",
            "name": "B38063"
          },
          "id": "00000000-0000-0000-0000-0000000838d8",
          "order_item_id": "3676b83f-0cc9-46a8-b54f-42fc0b35e1da",
          "package": null,
          "price": "10.000000000",
          "product": {
            "id": "d6534dfa-0adc-46e2-8304-62f368e82107",
            "name": "Product 38061",
            "sku": "sku 38062",
            "updated_datetime": "2025-04-18T16:23:08.466145Z"
          },
          "quantity": "10.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        }
      ],
      "order": {
        "id": "8e0b04b8-65bd-4f76-b806-14615f187f88",
        "order_number": "SO-2343",
        "status": "Pending",
        "total": "320.00"
      },
      "owner": {
        "banned": false,
        "email": "owner-47943@example.com",
        "full_name": "FirstName94016 LastName94017",
        "id": "00000000-0000-0000-0000-00000114acd1",
        "role": {
          "id": "00000000-0000-0000-0000-000001130038",
          "name": "Admin 47137"
        }
      },
      "paid_amount": "0.0",
      "status": "FULLY_PAID",
      "total": "32.00",
      "updated_datetime": "2025-04-18T16:23:08.582297Z"
    },
    {
      "charges": [],
      "company": {
        "id": "00000000-0000-0000-0000-0000007a3bae",
        "name": "Company 33464",
        "updated_datetime": "2025-04-18T16:23:07.937047Z"
      },
      "creator": {
        "banned": false,
        "email": "owner-47800@example.com",
        "full_name": "FirstName93756 LastName93757",
        "id": "00000000-0000-0000-0000-00000114ac4d",
        "role": {
          "id": "00000000-0000-0000-0000-00000112ffb4",
          "name": "Admin 47005"
        }
      },
      "custom_data": [],
      "due_datetime": "2025-04-18T16:23:08.130792Z",
      "id": "00000000-0000-0000-0000-00000006a37e",
      "inserted_datetime": "2025-04-18T16:23:08.132717Z",
      "invoice_datetime": "2020-01-01T12:00:00.000000Z",
      "invoice_number": "Invoice #864",
      "items": [
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b1795",
            "name": "B37907"
          },
          "id": "00000000-0000-0000-0000-0000000838cd",
          "order_item_id": "886828cf-32bc-4369-a1d1-a36e52a8c3e7",
          "package": null,
          "price": "10.000000000",
          "product": {
            "id": "5d475546-fb99-43be-af26-582181f0c405",
            "name": "Product 37905",
            "sku": "sku 37906",
            "updated_datetime": "2025-04-18T16:23:07.967384Z"
          },
          "quantity": "10.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b179b",
            "name": "B37917"
          },
          "id": "00000000-0000-0000-0000-0000000838ce",
          "order_item_id": "d4455d7a-4e22-4652-a6d3-6283476cd42f",
          "package": null,
          "price": "10.000000000",
          "product": {
            "id": "f7b39efc-11f2-44ff-a8f1-1149044fc6f5",
            "name": "Product 37914",
            "sku": "sku 37915",
            "updated_datetime": "2025-04-18T16:23:08.000004Z"
          },
          "quantity": "10.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        }
      ],
      "order": {
        "id": "1eb791b9-1e68-4e29-aff8-5ef704c4394f",
        "order_number": "SO-2330",
        "status": "Pending",
        "total": "320.00"
      },
      "owner": {
        "banned": false,
        "email": "owner-47800@example.com",
        "full_name": "FirstName93756 LastName93757",
        "id": "00000000-0000-0000-0000-00000114ac4d",
        "role": {
          "id": "00000000-0000-0000-0000-00000112ffb4",
          "name": "Admin 47005"
        }
      },
      "paid_amount": "0.0",
      "status": "FULLY_PAID",
      "total": "32.00",
      "updated_datetime": "2025-04-18T16:23:08.132717Z"
    }
  ]
}

GET /invoices/:id returns cost/returned_quantity data for invoice items

GET /public/v1/invoices
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5OTAsImlhdCI6MTc0NDk5MzM5MCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiOWI4NzI5NDQtYTEyYS00YjQxLWI0MWUtMmQ4Njk4YTQ1OWE2IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzg5LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzI1OTgiLCJ0eXAiOiJhY2Nlc3MifQ.YlxXPKTeCt9rhGXgUOn9k0sUlHTruOVbZb5OKNrtcSg

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 27d710efaa4362000000000000000001-5f11778ad354f3f1-0
{
  "data": [
    {
      "charges": [],
      "company": {
        "id": "00000000-0000-0000-0000-0000007a3cf9",
        "name": "Company 33930",
        "updated_datetime": "2025-04-18T16:23:10.384785Z"
      },
      "creator": {
        "banned": false,
        "email": "owner-48474@example.com",
        "full_name": "FirstName95000 LastName95001",
        "id": "00000000-0000-0000-0000-00000114aec8",
        "role": {
          "id": "00000000-0000-0000-0000-000001130222",
          "name": "Admin 47627"
        }
      },
      "custom_data": [],
      "due_datetime": "2025-04-18T16:23:10.585817Z",
      "id": "00000000-0000-0000-0000-00000006a396",
      "inserted_datetime": "2025-04-18T16:23:10.586577Z",
      "invoice_datetime": "2025-04-18T16:23:10.585816Z",
      "invoice_number": "Invoice #882",
      "items": [
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b1861",
            "name": "B38534"
          },
          "id": "00000000-0000-0000-0000-0000000838f0",
          "order_item_id": "048834a5-fc0e-417d-9ebe-557d19096bd5",
          "package": null,
          "price": "330734.000000000",
          "product": {
            "id": "11cceae3-758f-482d-83fb-3b1ba6763a55",
            "name": "Product 38531",
            "sku": "sku 38532",
            "updated_datetime": "2025-04-18T16:23:10.314518Z"
          },
          "quantity": "1.000000000",
          "returned_quantity": "1",
          "total_cost_actual": "10.026",
          "total_cost_default": "5"
        }
      ],
      "order": {
        "id": "b6fc3336-9605-4da5-ba3e-ed48ccf2048e",
        "order_number": "SO-0000001",
        "status": "Processing",
        "total": "661468.00"
      },
      "owner": {
        "banned": false,
        "email": "owner-48474@example.com",
        "full_name": "FirstName95000 LastName95001",
        "id": "00000000-0000-0000-0000-00000114aec8",
        "role": {
          "id": "00000000-0000-0000-0000-000001130222",
          "name": "Admin 47627"
        }
      },
      "paid_amount": "0.0",
      "status": "NOT_PAID",
      "total": "32.00",
      "updated_datetime": "2025-04-18T16:23:10.586577Z"
    }
  ]
}

Get invoices sorted by Invoice Date descendingly date and filtered by various attributes

Note: The page size for this endpoint is 500 invoices per page. This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses.

Request

GET /public/v1/invoices

Parameters

Parameter Description In Type Required Default Example
due_datetime Filter invoices by the due datetime query string false ,2022-07-10T00:00:00Z
inserted_datetime Filter invoices by their creation datetime query string false 2022-07-10T00:00:00Z,2022-07-11T00:00:00Z
invoice_datetime Filter invoices by the invoice datetime query string false 2022-07-10T00:00:00Z,
invoice_number Filter invoices by whether their invoice number contains the given string query string false 001
order_id Filter invoices by order IDs query array false ["67ae9080-8dc2-4ab7-9704-19673f4d9f21","213c7080-8dc2-4ab7-9704-19673f4d9f22"]
page Pagination information body Page false
status Filter invoices by their status. Accepted values are "Not Paid", "Over Paid", "Fully Paid" and "Partially Paid". query array false ["Not Paid","Over Paid"]
updated_datetime Filter invoices by the datetime they were most recently modified query string false ,2022-07-10T00:00:00Z

Responses

Status Description Schema
200 A list of invoices Invoices

Insert a payment for an invoice

POST /invoices/:id/payments can create a payment for an invoice with both quickbooks id and name

POST /public/v1/invoices/00000000-0000-0000-0000-00000006a39d/payments
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5OTEsImlhdCI6MTc0NDk5MzM5MSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYmVhMTJiN2YtN2Y2YS00OWI5LTk3NTUtYzk4MmRiYWExMGE2IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzkwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzI4OTQiLCJ0eXAiOiJhY2Nlc3MifQ.HPwpOFf5f9RKADSCTkFiWhsAkJyPHNXLtjcflzJz2v4
{
  "amount": 100.01,
  "description": "Payment for invoice",
  "payment_datetime": "2020-01-01T00:00:00.000000Z",
  "payment_method_id": "00000000-0000-0000-0000-000000017599",
  "quickbooks_deposit_account_id": "QBD-123"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: f199a74b3bd338000000000000000001-0d4eb53003b3e44a-0
{
  "data": {
    "amount": "100.01",
    "description": "Payment for invoice",
    "id": "00000000-0000-0000-0000-000000015d00",
    "inserted_datetime": "2025-04-18T16:23:11.374940Z",
    "invoice_id": "00000000-0000-0000-0000-00000006a39d",
    "payment_date": "2020-01-01T00:00:00.000000Z",
    "payment_method": {
      "id": "00000000-0000-0000-0000-000000017599",
      "name": "Payment Method 0"
    },
    "payment_number": "PYT-0000001",
    "quickbooks_deposit_account_id": "QBD-123"
  }
}

POST /invoices/:id/payments can create a payment for an invoice with both quickbooks id and name

POST /public/v1/invoices/00000000-0000-0000-0000-00000006a39d/payments
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5OTEsImlhdCI6MTc0NDk5MzM5MSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYmVhMTJiN2YtN2Y2YS00OWI5LTk3NTUtYzk4MmRiYWExMGE2IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzkwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzI4OTQiLCJ0eXAiOiJhY2Nlc3MifQ.HPwpOFf5f9RKADSCTkFiWhsAkJyPHNXLtjcflzJz2v4
{
  "amount": 100.01,
  "description": "Payment for invoice",
  "payment_datetime": "2020-01-01T00:00:00.000000Z",
  "payment_method_id": "00000000-0000-0000-0000-000000017599",
  "quickbooks_deposit_account_name": "QBD-NAME"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: f199a74b3bd338000000000000000001-77364747993dc614-0
{
  "data": {
    "amount": "100.01",
    "description": "Payment for invoice",
    "id": "00000000-0000-0000-0000-000000015d03",
    "inserted_datetime": "2025-04-18T16:23:11.451000Z",
    "invoice_id": "00000000-0000-0000-0000-00000006a39d",
    "payment_date": "2020-01-01T00:00:00.000000Z",
    "payment_method": {
      "id": "00000000-0000-0000-0000-000000017599",
      "name": "Payment Method 0"
    },
    "payment_number": "PYT-0000002",
    "quickbooks_deposit_account_id": "QBD-123"
  }
}

Request

POST /public/v1/invoices/{id}/payments

Parameters

Parameter Description In Type Required Default Example
payment_method_id Payment method ID query string true
amount Amount of the payment. Will round to 2 decimal places query decimal true
payment_datetime Payment date query string true
description Description of the payment query string true
quickbooks_deposit_account_id Quickbooks deposit account ID. Cannot include both this and quickbooks_deposit_account_name. If user's company is integrated with Quickbooks, either this or quickbooks_deposit_account_name must be provided. Account type must be "Bank" or "Other Current Asset" query string false
quickbooks_deposit_account_name Quickbooks deposit account name. Cannot include both this and quickbooks_deposit_account_id. If user's company is integrated with Quickbooks, either this or quickbooks_deposit_account_id must be provided. Account type must be "Bank" or "Other Current Asset" query string false

Responses

Status Description Schema
200 A single payment InvoicePayment

Get an invoice

GET /invoices/:id returns the expected invoice

GET /public/v1/invoices/00000000-0000-0000-0000-00000006a347
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5NzgsImlhdCI6MTc0NDk5MzM3OCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYzNjZjI5ZDMtMjNkMS00NTcyLTkyMTgtNjc2ZmExMTE0NWI0IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzc3LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMjk5MTIiLCJ0eXAiOiJhY2Nlc3MifQ.Qgv_TrPlJ475bjeddKp1IX4IPOqn5ssF85Ewl2Qcwgg

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: beceda5a634a30000000000000000001-6c39c18444ea3bb1-0
{
  "data": {
    "charges": [],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a37fd",
      "name": "Company 31924",
      "updated_datetime": "2025-04-18T16:22:58.129213Z"
    },
    "creator": {
      "banned": false,
      "email": "owner-45643@example.com",
      "full_name": "FirstName89538 LastName89539",
      "id": "00000000-0000-0000-0000-00000114a3f9",
      "role": {
        "id": "00000000-0000-0000-0000-00000112f772",
        "name": "Admin 44891"
      }
    },
    "custom_data": [
      {
        "id": 64493,
        "name": "Custom Field 187",
        "value": "Custom Field Value 1"
      }
    ],
    "due_datetime": "2025-04-18T16:22:58.281032Z",
    "id": "00000000-0000-0000-0000-00000006a347",
    "inserted_datetime": "2025-04-18T16:22:58.282534Z",
    "invoice_datetime": "2025-04-18T16:22:58.281029Z",
    "invoice_number": "Invoice #824",
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1596",
          "name": "B35974"
        },
        "id": "00000000-0000-0000-0000-000000083889",
        "order_item_id": "77013d4e-f133-4514-b641-24b50eb32e14",
        "package": null,
        "price": "10.000000000",
        "product": {
          "id": "c3158cfa-34c2-4569-871f-c18fafa4d57a",
          "name": "Product 35971",
          "sku": "sku 35972",
          "updated_datetime": "2025-04-18T16:22:58.150837Z"
        },
        "quantity": "10.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      },
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1599",
          "name": "B35985"
        },
        "id": "00000000-0000-0000-0000-00000008388a",
        "order_item_id": "4817af82-abc1-45a0-ad27-2325359e1eb4",
        "package": null,
        "price": "10.000000000",
        "product": {
          "id": "af97a3ac-f661-4050-887e-df737e61e7d9",
          "name": "Product 35983",
          "sku": "sku 35984",
          "updated_datetime": "2025-04-18T16:22:58.175021Z"
        },
        "quantity": "10.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      }
    ],
    "order": {
      "id": "bfb39cab-ea98-4007-ae24-ebc77594b2d2",
      "order_number": "SO-2215",
      "status": "Pending",
      "total": "320.00"
    },
    "owner": {
      "banned": false,
      "email": "owner-45643@example.com",
      "full_name": "FirstName89538 LastName89539",
      "id": "00000000-0000-0000-0000-00000114a3f9",
      "role": {
        "id": "00000000-0000-0000-0000-00000112f772",
        "name": "Admin 44891"
      }
    },
    "paid_amount": "0.0",
    "status": "NOT_PAID",
    "total": "32.00",
    "updated_datetime": "2025-04-18T16:22:58.282534Z"
  }
}

Get a single invoice given the ID

Request

GET /public/v1/invoices/{id}

Parameters

Parameter Description In Type Required Default Example
id Unique ID for an invoice path string true

Responses

Status Description Schema
200 An invoice Invoice

Upsert an invoice

POST /invoices creates an invoice

POST /public/v1/invoices
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5NzgsImlhdCI6MTc0NDk5MzM3OCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYjE1M2QwYmMtYjk4NS00YzlkLTk0MmQtOTE4N2YwOWU5YTE4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzc3LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzAxNDAiLCJ0eXAiOiJhY2Nlc3MifQ.hqeo2l8kkMiiWNP62rUo9nEuS9NzYRH9CakiJ9iYVxk
{
  "billing_location_id": "00000000-0000-0000-0000-00000054146e",
  "charges": [
    {
      "name": "C1",
      "percent": "10.0000",
      "type": "CHARGE",
      "unit_type": "PERCENT"
    },
    {
      "name": "C2",
      "price": "-5.0000",
      "type": "DISCOUNT",
      "unit_type": "PRICE"
    }
  ],
  "due_datetime": "2020-01-30T00:00:01.000000Z",
  "invoice_datetime": "2020-01-01T00:00:00.000000Z",
  "items": [
    {
      "order_item_id": "f5230148-5bdf-48de-84f9-56969d26ae07",
      "quantity": "1.000000000"
    },
    {
      "order_item_id": "6dc83434-fc79-4c9b-b5e7-4b254bd93d8e",
      "quantity": "10.000000000"
    }
  ],
  "order_id": "f28e7990-22b7-4469-ac6d-c906d55cf392"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 60ce1fa0f122a8000000000000000001-6adaae7b96346b28-0
{
  "data": {
    "charges": [
      {
        "id": "28a61d41-30e3-4803-9f45-4003558e58b2",
        "name": "C1",
        "percent": "10.0000",
        "price": "5.30",
        "type": "CHARGE",
        "unit_type": "PERCENT"
      },
      {
        "id": "f2bd9c13-29db-4998-8bea-d39607337141",
        "name": "C2",
        "percent": null,
        "price": "-5.00",
        "type": "DISCOUNT",
        "unit_type": "PRICE"
      }
    ],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a3851",
      "name": "Company 32065",
      "updated_datetime": "2025-04-18T16:22:58.815762Z"
    },
    "creator": {
      "banned": false,
      "email": "user1@a.com",
      "full_name": "John Foo",
      "id": "00000000-0000-0000-0000-00000114a4dc",
      "role": {
        "id": "00000000-0000-0000-0000-00000112f850",
        "name": "Admin 45113"
      }
    },
    "custom_data": [],
    "due_datetime": "2020-01-30T00:00:01.000000Z",
    "id": "00000000-0000-0000-0000-00000006a349",
    "inserted_datetime": "2025-04-18T16:22:58.938089Z",
    "invoice_datetime": "2020-01-01T00:00:00.000000Z",
    "invoice_number": "INV-0000001",
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b15c9",
          "name": "B1"
        },
        "id": "00000000-0000-0000-0000-00000008388e",
        "order_item_id": "f5230148-5bdf-48de-84f9-56969d26ae07",
        "package": null,
        "price": "3.000000000",
        "product": {
          "id": "011b7f86-279b-4c8b-9b64-e269f23dec34",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:22:58.848574Z"
        },
        "quantity": "1.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      },
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b15ca",
          "name": "B2"
        },
        "id": "00000000-0000-0000-0000-00000008388f",
        "order_item_id": "6dc83434-fc79-4c9b-b5e7-4b254bd93d8e",
        "package": null,
        "price": "5.000000000",
        "product": {
          "id": "92e38f4b-f8f3-4217-b8f2-a3281c8762f4",
          "name": "P2",
          "sku": "SKU2",
          "updated_datetime": "2025-04-18T16:22:58.868803Z"
        },
        "quantity": "10.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      }
    ],
    "order": {
      "id": "f28e7990-22b7-4469-ac6d-c906d55cf392",
      "order_number": "SO-2224",
      "status": "Processing",
      "total": "0.00"
    },
    "owner": null,
    "paid_amount": "0.0",
    "status": "NOT_PAID",
    "total": "53.30",
    "updated_datetime": "2025-04-18T16:22:58.948380Z"
  }
}

POST /invoices updates an invoice

POST /public/v1/invoices
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5ODksImlhdCI6MTc0NDk5MzM4OSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYTVjMDc3YjktOWM4ZC00MjQwLWFlZmUtYWYzMTRlZTE3ZWU0IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzg4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzI1MTciLCJ0eXAiOiJhY2Nlc3MifQ.wVYT_sCV4fNjOeHszAfrpgE76deXQ8SW0VCTGAzHvBc
{
  "billing_location_id": "00000000-0000-0000-0000-00000054170c",
  "charges": [
    {
      "name": "C1",
      "percent": "10.0000",
      "type": "CHARGE",
      "unit_type": "PERCENT"
    },
    {
      "name": "C2",
      "price": "-5.0000",
      "type": "DISCOUNT",
      "unit_type": "PRICE"
    }
  ],
  "due_datetime": "2020-01-30T00:00:01.000000Z",
  "invoice_datetime": "2020-01-01T00:00:00.000000Z",
  "items": [
    {
      "order_item_id": "5cce8cc9-de22-4fdd-9f86-2d49c186ba25",
      "quantity": "1.000000000"
    },
    {
      "order_item_id": "8a209b1a-76f3-4aa9-a77b-f6482ab0ca71",
      "quantity": "10.000000000"
    }
  ],
  "order_id": "329cfeb9-6974-420d-8e56-b88a39417b1b"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 897c1e1bdcc810000000000000000001-74cc4cd970e65a77-0
{
  "data": {
    "charges": [
      {
        "id": "c7fe4bdd-7200-4738-8b2e-409f0ffd9e93",
        "name": "C1",
        "percent": "10.0000",
        "price": "5.30",
        "type": "CHARGE",
        "unit_type": "PERCENT"
      },
      {
        "id": "587d2c8c-80e5-47b9-8921-65fe4b85897a",
        "name": "C2",
        "percent": null,
        "price": "-5.00",
        "type": "DISCOUNT",
        "unit_type": "PRICE"
      }
    ],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a3cbe",
      "name": "Company 33845",
      "updated_datetime": "2025-04-18T16:23:09.921053Z"
    },
    "creator": {
      "banned": false,
      "email": "user1@a.com",
      "full_name": "John Foo",
      "id": "00000000-0000-0000-0000-00000114ae25",
      "role": {
        "id": "00000000-0000-0000-0000-000001130185",
        "name": "Admin 47470"
      }
    },
    "custom_data": [],
    "due_datetime": "2020-01-30T00:00:01.000000Z",
    "id": "00000000-0000-0000-0000-00000006a390",
    "inserted_datetime": "2025-04-18T16:23:10.043406Z",
    "invoice_datetime": "2020-01-01T00:00:00.000000Z",
    "invoice_number": "INV-0000001",
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1849",
          "name": "B1"
        },
        "id": "00000000-0000-0000-0000-0000000838e7",
        "order_item_id": "5cce8cc9-de22-4fdd-9f86-2d49c186ba25",
        "package": null,
        "price": "3.000000000",
        "product": {
          "id": "7a5bbd9c-f720-49ad-9c92-5c57f3464180",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:23:09.956394Z"
        },
        "quantity": "1.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      },
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b184b",
          "name": "B2"
        },
        "id": "00000000-0000-0000-0000-0000000838e8",
        "order_item_id": "8a209b1a-76f3-4aa9-a77b-f6482ab0ca71",
        "package": null,
        "price": "5.000000000",
        "product": {
          "id": "40cada5d-a237-4587-9bc2-1025447106fd",
          "name": "P2",
          "sku": "SKU2",
          "updated_datetime": "2025-04-18T16:23:09.980945Z"
        },
        "quantity": "10.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      }
    ],
    "order": {
      "id": "329cfeb9-6974-420d-8e56-b88a39417b1b",
      "order_number": "SO-2370",
      "status": "Processing",
      "total": "0.00"
    },
    "owner": null,
    "paid_amount": "0.0",
    "status": "NOT_PAID",
    "total": "53.30",
    "updated_datetime": "2025-04-18T16:23:10.055519Z"
  }
}

POST /invoices updates an invoice

POST /public/v1/invoices
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5ODksImlhdCI6MTc0NDk5MzM4OSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYTVjMDc3YjktOWM4ZC00MjQwLWFlZmUtYWYzMTRlZTE3ZWU0IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzg4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzI1MTciLCJ0eXAiOiJhY2Nlc3MifQ.wVYT_sCV4fNjOeHszAfrpgE76deXQ8SW0VCTGAzHvBc
{
  "billing_location_id": "00000000-0000-0000-0000-00000054170d",
  "charges": [
    {
      "id": "c7fe4bdd-7200-4738-8b2e-409f0ffd9e93",
      "name": "C1",
      "percent": "10.0000",
      "type": "CHARGE",
      "unit_type": "PERCENT"
    },
    {
      "name": "C3",
      "price": "-5.0000",
      "type": "DISCOUNT",
      "unit_type": "PRICE"
    }
  ],
  "due_datetime": "2020-01-28T00:00:01.000000Z",
  "id": "00000000-0000-0000-0000-00000006a390",
  "invoice_datetime": "2020-01-02T00:00:00.000000Z",
  "items": [
    {
      "id": "00000000-0000-0000-0000-0000000838e7",
      "order_item_id": "5cce8cc9-de22-4fdd-9f86-2d49c186ba25",
      "quantity": "1.000000000"
    },
    {
      "order_item_id": "8a209b1a-76f3-4aa9-a77b-f6482ab0ca71",
      "quantity": "8.000000000"
    }
  ],
  "order_id": "329cfeb9-6974-420d-8e56-b88a39417b1b"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 897c1e1bdcc810000000000000000001-1d5ecbe04b4b44ac-0
{
  "data": {
    "charges": [
      {
        "id": "c7fe4bdd-7200-4738-8b2e-409f0ffd9e93",
        "name": "C1",
        "percent": "10.0000",
        "price": "4.30",
        "type": "CHARGE",
        "unit_type": "PERCENT"
      },
      {
        "id": "ccd4e9e9-07df-4c50-9127-07db85ff674d",
        "name": "C3",
        "percent": null,
        "price": "-5.00",
        "type": "DISCOUNT",
        "unit_type": "PRICE"
      }
    ],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a3cbe",
      "name": "Company 33845",
      "updated_datetime": "2025-04-18T16:23:09.921053Z"
    },
    "creator": {
      "banned": false,
      "email": "user1@a.com",
      "full_name": "John Foo",
      "id": "00000000-0000-0000-0000-00000114ae25",
      "role": {
        "id": "00000000-0000-0000-0000-000001130185",
        "name": "Admin 47470"
      }
    },
    "custom_data": [],
    "due_datetime": "2020-01-28T00:00:01.000000Z",
    "id": "00000000-0000-0000-0000-00000006a390",
    "inserted_datetime": "2025-04-18T16:23:10.043406Z",
    "invoice_datetime": "2020-01-02T00:00:00.000000Z",
    "invoice_number": "INV-0000001",
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1849",
          "name": "B1"
        },
        "id": "00000000-0000-0000-0000-0000000838e7",
        "order_item_id": "5cce8cc9-de22-4fdd-9f86-2d49c186ba25",
        "package": null,
        "price": "3.000000000",
        "product": {
          "id": "7a5bbd9c-f720-49ad-9c92-5c57f3464180",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:23:09.956394Z"
        },
        "quantity": "1.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      },
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b184b",
          "name": "B2"
        },
        "id": "00000000-0000-0000-0000-0000000838eb",
        "order_item_id": "8a209b1a-76f3-4aa9-a77b-f6482ab0ca71",
        "package": null,
        "price": "5.000000000",
        "product": {
          "id": "40cada5d-a237-4587-9bc2-1025447106fd",
          "name": "P2",
          "sku": "SKU2",
          "updated_datetime": "2025-04-18T16:23:09.980945Z"
        },
        "quantity": "8.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      }
    ],
    "order": {
      "id": "329cfeb9-6974-420d-8e56-b88a39417b1b",
      "order_number": "SO-2370",
      "status": "Processing",
      "total": "0.00"
    },
    "owner": null,
    "paid_amount": "0.0",
    "status": "NOT_PAID",
    "total": "42.30",
    "updated_datetime": "2025-04-18T16:23:10.174787Z"
  }
}

POST /invoices reports various errors correctly on update

POST /public/v1/invoices
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5NzksImlhdCI6MTc0NDk5MzM3OSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNzQwODM0ZWItNDIzNi00MTBhLTkyYmQtZWVkY2NkNDkwOWU0IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzc4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzAzMjMiLCJ0eXAiOiJhY2Nlc3MifQ.CGDTiuMVPuBv9Td39JGU2ZAZ9mNGCEFxfV32fRcBMU8
{
  "billing_location_id": "00000000-0000-0000-0000-00000054149c",
  "charges": [
    {
      "name": "C1",
      "percent": "-1000.0000",
      "type": "CHARGE",
      "unit_type": "PERCENT"
    }
  ],
  "due_datetime": "2020-01-30T00:00:01.000000Z",
  "id": "00000000-0000-0000-0000-00000006a34b",
  "invoice_datetime": "2020-01-01T00:00:00.000000Z",
  "items": [
    {
      "order_item_id": "00000000-0000-0000-0000-000000000000",
      "quantity": "15.000"
    },
    {
      "order_item_id": "857ba726-500f-4c0f-b509-2aa011a49b2c",
      "quantity": "19.000"
    }
  ],
  "order_id": "72248bda-1b95-4238-90b6-c23211671ad8"
}

Response

400
cache-control: max-age=0, private, must-revalidate
content-type: application/json; charset=utf-8
b3: 833301446c4a58000000000000000001-cf7aca35b3883688-0
{
  "errors": [
    {
      "context": {
        "id": "ab3ec3d1-27a9-42b9-a337-5e336acb8a0e"
      },
      "message": "Must be less than or equal to 100",
      "pointer": ["charges", 0, "percent"],
      "section": "body"
    },
    {
      "context": {},
      "message": "Order item not found",
      "pointer": ["items", 2, "order_item_id"],
      "section": "body"
    },
    {
      "context": {},
      "message": "Only 10 left uninvoiced",
      "pointer": ["items", 3, "quantity"],
      "section": "body"
    }
  ]
}

Upsert a single invoice. To update an existing invoice, pass in an existing invoice ID in the id field. When updating an invoice, you must pass in all fields (no sparse update currently supported). Any existing invoice item or charge you do not pass in to items and charges respectively will be deleted

Request

POST /public/v1/invoices

Parameters

Parameter Description In Type Required Default Example
due_datetime The datetime at which the invoice is due query string false
id Unique ID for this invoice. If it exists, an update will be performed; otherwise, it will be used as the ID of a new invoice record query string false
invoice_datetime The datetime on which the invoice was placed query string false
charges The additional lines of Charge, Discount, or Tax added to this invoice body InvoiceChargesRequest false
items The invoice items present on this order body InvoiceItemsRequest false
billing_location_id The billing location's ID query string false

Responses

Status Description Schema
200 A single invoice Invoice

Location

Get locations

GET /public/v1/locations returns locations related to the company

GET /public/v1/locations
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4OTEsImlhdCI6MTc0NDk5MzI5MSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMDZiMjFkYzctN2I3My00YzY4LWFlNGUtZTQ4YmExZDZkOWJjIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjkwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMTMzMzMiLCJ0eXAiOiJhY2Nlc3MifQ.jBVmddhNU1GV6xOGaC__UyzEUCVX_RcN2iGi9D-NxrA

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: ed0b07e2b99148000000000000000001-9cc4575fbdbacbff-0
{
  "data": [
    {
      "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
      "company_id": "00000000-0000-0000-0000-000000cff73e",
      "id": "00000000-0000-0000-0000-0000005401c3",
      "license": null,
      "license_id": null,
      "name": "Place 9226"
    },
    {
      "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
      "company_id": "00000000-0000-0000-0000-000000cff73e",
      "id": "00000000-0000-0000-0000-0000005401c5",
      "license": {
        "id": "00000000-0000-0000-0000-00000035be7f",
        "license_number": "CDPH-00006555"
      },
      "license_id": "00000000-0000-0000-0000-00000035be7f",
      "name": "Place 9228"
    }
  ]
}

Get locations sorted by their creation date and filtered by various attributes

Note: The page size for this endpoint is 1000 locations per page. This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses.

Request

GET /public/v1/locations

Parameters

Parameter Description In Type Required Default Example
inserted_datetime Filter locations by their creation datetime query string false 2022-07-10T00:00:00Z,
page Pagination information body Page false
updated_datetime Filter locations by the datetime they were most recently modified query string false ,2022-07-10T00:00:00Z

Responses

Status Description Schema
200 A list of locations Locations

Order

Get orders

GET /public/v1/orders returns orders related to the company

GET /public/v1/orders
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5OTQsImlhdCI6MTc0NDk5MzM5NCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiODU1NzBjYTUtYjFhZS00MTE0LWFlZGEtMTY4M2ViMWUxYjMwIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzkzLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzM1NjkiLCJ0eXAiOiJhY2Nlc3MifQ.V1fU6SbkctZCllYoe5QxPyTnIK_hj0JISa13p1SSnZs

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 9c2187e521f0f8000000000000000001-3dbcec4240cb9f1e-0
{
  "data": [
    {
      "billing_location": {
        "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
        "company_id": "00000000-0000-0000-0000-000000d030cf",
        "id": "00000000-0000-0000-0000-000000541864",
        "license_id": null,
        "name": "Place 14978"
      },
      "charges": [
        {
          "id": "f02adcd4-bcb4-483a-a3f9-0aa044c12ae3",
          "name": "C1",
          "percent": "10.0000",
          "price": "1.00",
          "type": "CHARGE",
          "unit_type": "PERCENT"
        }
      ],
      "company": {
        "id": "00000000-0000-0000-0000-0000007a3f0c",
        "name": "Company 34703",
        "updated_datetime": "2030-11-01T00:00:00.000000Z"
      },
      "creator": {
        "banned": false,
        "email": "user1@a.com",
        "full_name": "John Foo",
        "id": "00000000-0000-0000-0000-00000114b23b",
        "role": {
          "id": "00000000-0000-0000-0000-000001130596",
          "name": "Admin 48511"
        }
      },
      "custom_data": [
        {
          "id": 64505,
          "name": "Custom Field 199",
          "value": "Custom Field Value 1"
        }
      ],
      "delivery_datetime": "2020-01-01T00:00:00.000000Z",
      "due_datetime": "2020-01-01T00:00:01.000000Z",
      "external_notes": null,
      "id": "87e658c6-1f80-4aed-b42b-7610e6bef76c",
      "inserted_datetime": "2020-01-01T00:00:03.000000Z",
      "internal_notes": "Internal notes for this order",
      "items": [
        {
          "batch": {
            "batch_number": "UID1",
            "id": "00000000-0000-0000-0000-0000004b1967",
            "name": "B1"
          },
          "compliance_quantity": "10.0000",
          "id": "0754053d-ef65-4569-92ad-9f91c006b268",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000d030cf",
            "id": "00000000-0000-0000-0000-000000541864",
            "license_id": null,
            "name": "Place 14978"
          },
          "package": {
            "batch_number": "B1",
            "compliance_label": "ABCDEF012345670000080683",
            "id": "00000000-0000-0000-0000-0000001b1795",
            "metrc_label": "ABCDEF012345670000080683",
            "status": "active"
          },
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "920c23ca-d55c-4ef5-8ff3-da8608cc21e1",
            "name": "P1",
            "sku": "SKU1",
            "updated_datetime": "2023-11-02T00:00:00.000000Z"
          },
          "quantity": "1.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        }
      ],
      "order_datetime": "2020-01-01T00:00:02.000000Z",
      "order_number": "SO-123",
      "owner": {
        "banned": false,
        "email": "user2@a.com",
        "full_name": "John Bar",
        "id": "00000000-0000-0000-0000-00000114b23e",
        "role": {
          "id": "00000000-0000-0000-0000-000001130599",
          "name": "Admin 48514"
        }
      },
      "shipping_location": {
        "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
        "company_id": "00000000-0000-0000-0000-000000d030cf",
        "id": "00000000-0000-0000-0000-000000541864",
        "license_id": null,
        "name": "Place 14978"
      },
      "status": "COMPLETED",
      "total": "11.00",
      "updated_datetime": "2020-01-01T00:00:04.000000Z"
    }
  ]
}

GET /public/v1/orders returns cost/returned_quantity data for order items

GET /public/v1/orders
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDMwMDIsImlhdCI6MTc0NDk5MzQwMiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMWYyNjBmNjgtY2Y0My00MDBhLWE1N2ItOTRkMTM5MjcyYmQ5IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzNDAxLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzU3MDgiLCJ0eXAiOiJhY2Nlc3MifQ.DYqI0lxCwEdpTnRz8wVTt7v3aPYkmZg6J7889aqKeTI

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 0a70322595227b000000000000000001-358f6fb4160175e8-0
{
  "data": [
    {
      "billing_location": null,
      "charges": [],
      "company": {
        "id": "00000000-0000-0000-0000-0000007a43d3",
        "name": "Company 36666",
        "updated_datetime": "2025-04-18T16:23:23.076486Z"
      },
      "creator": {
        "banned": false,
        "email": "owner-51618@example.com",
        "full_name": "FirstName101032 LastName101033",
        "id": "00000000-0000-0000-0000-00000114bac7",
        "role": {
          "id": "00000000-0000-0000-0000-000001130e09",
          "name": "Admin 50672"
        }
      },
      "custom_data": [],
      "delivery_datetime": null,
      "due_datetime": "2025-04-18T16:23:23.078038Z",
      "external_notes": null,
      "id": "4e6ede8c-d8ef-4da8-91e9-241e29803e17",
      "inserted_datetime": "2025-04-18T16:23:23.101904Z",
      "internal_notes": null,
      "items": [
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b1bce",
            "name": "B41758"
          },
          "compliance_quantity": null,
          "id": "4e258c92-8647-453e-8eef-dd9bded0a7e9",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000d0387a",
            "id": "00000000-0000-0000-0000-000000541b39",
            "license_id": null,
            "name": "Place 15698"
          },
          "package": null,
          "price": "837128.000000000",
          "price_base": "837128",
          "product": {
            "id": "953d1594-4467-4231-8896-66d711e39591",
            "name": "Product 41756",
            "sku": "sku 41757",
            "updated_datetime": "2025-04-18T16:23:22.967711Z"
          },
          "quantity": "2.000000000",
          "returned_quantity": "2",
          "total_cost_actual": "20.052",
          "total_cost_default": "10"
        }
      ],
      "order_datetime": "2025-04-18T16:23:23.078041Z",
      "order_number": "SO-0000001",
      "owner": null,
      "shipping_location": null,
      "status": "PROCESSING",
      "total": "1674256.00",
      "updated_datetime": "2025-04-18T16:23:23.101904Z"
    }
  ]
}

GET /public/v1/orders allows filtering by several statuses

GET /public/v1/orders?status[]=COMPLETED&status[]=CANCELED
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5OTcsImlhdCI6MTc0NDk5MzM5NywiaXNzIjoiRGlzdHJ1IiwianRpIjoiN2FjYzQyZjItZDI3MC00YzBkLWI0OTgtYjVmZWFhYjgxZDE4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzk2LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzQyNjYiLCJ0eXAiOiJhY2Nlc3MifQ.fg3XOFBNU6wRwmb9gWyLee3TZ0p72MGpBZN3HYzmDeM

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: fed6d1f7845a80000000000000000001-d448fc1ba6264716-0
{
  "data": [
    {
      "billing_location": null,
      "charges": [],
      "company": {
        "id": "00000000-0000-0000-0000-0000007a4101",
        "name": "Company 35504",
        "updated_datetime": "2025-04-18T16:23:17.906521Z"
      },
      "creator": {
        "banned": false,
        "email": "owner-50323@example.com",
        "full_name": "FirstName98476 LastName98477",
        "id": "00000000-0000-0000-0000-00000114b5b4",
        "role": {
          "id": "00000000-0000-0000-0000-00000113090d",
          "name": "Admin 49398"
        }
      },
      "custom_data": [],
      "delivery_datetime": null,
      "due_datetime": "2025-04-18T16:23:17.945769Z",
      "external_notes": null,
      "id": "f41ad43d-7029-435e-9eed-ceb5e1440f1d",
      "inserted_datetime": "2025-04-18T16:23:17.947340Z",
      "internal_notes": null,
      "items": [
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b1a73",
            "name": "B40479"
          },
          "compliance_quantity": null,
          "id": "6268ee89-12ac-4b2a-8a5f-55001cf21b6d",
          "location": null,
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "ffbc12d7-c5d0-4600-800c-ebb6095ebed1",
            "name": "Product 40477",
            "sku": "sku 40478",
            "updated_datetime": "2025-04-18T16:23:17.966869Z"
          },
          "quantity": "15.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b1a75",
            "name": "B40485"
          },
          "compliance_quantity": null,
          "id": "34ed2a09-c958-4f0a-bf4f-b72c3dd27fa4",
          "location": null,
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "be03b19f-7ec9-4002-973b-4019bee297d5",
            "name": "Product 40483",
            "sku": "sku 40484",
            "updated_datetime": "2025-04-18T16:23:17.990932Z"
          },
          "quantity": "10.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b1a77",
            "name": "B40495"
          },
          "compliance_quantity": null,
          "id": "91261427-6a72-4ea1-a350-c3a13d6a9b25",
          "location": null,
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "bc23695b-5c02-4c0c-9f1b-4f61433ad6be",
            "name": "Product 40491",
            "sku": "sku 40492",
            "updated_datetime": "2025-04-18T16:23:18.016540Z"
          },
          "quantity": "5.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b1a78",
            "name": "B40504"
          },
          "compliance_quantity": null,
          "id": "478e7915-272e-4aea-a769-5d99737909a7",
          "location": null,
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "d791c985-ce0d-4b4e-9915-acc0b4c65d6f",
            "name": "Product 40502",
            "sku": "sku 40503",
            "updated_datetime": "2025-04-18T16:23:18.038805Z"
          },
          "quantity": "2.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        }
      ],
      "order_datetime": "2020-01-01T12:30:00.000000Z",
      "order_number": "SO-2504",
      "owner": {
        "banned": false,
        "email": "owner-50323@example.com",
        "full_name": "FirstName98476 LastName98477",
        "id": "00000000-0000-0000-0000-00000114b5b4",
        "role": {
          "id": "00000000-0000-0000-0000-00000113090d",
          "name": "Admin 49398"
        }
      },
      "shipping_location": null,
      "status": "CANCELED",
      "total": "320.00",
      "updated_datetime": "2025-04-18T16:23:18.085914Z"
    },
    {
      "billing_location": null,
      "charges": [],
      "company": {
        "id": "00000000-0000-0000-0000-0000007a40de",
        "name": "Company 35454",
        "updated_datetime": "2025-04-18T16:23:17.715393Z"
      },
      "creator": {
        "banned": false,
        "email": "owner-50248@example.com",
        "full_name": "FirstName98324 LastName98325",
        "id": "00000000-0000-0000-0000-00000114b569",
        "role": {
          "id": "00000000-0000-0000-0000-0000011308c2",
          "name": "Admin 49323"
        }
      },
      "custom_data": [],
      "delivery_datetime": null,
      "due_datetime": "2025-04-18T16:23:17.749409Z",
      "external_notes": null,
      "id": "afbd59ad-d570-4137-8ea2-efeae8f4bea2",
      "inserted_datetime": "2025-04-18T16:23:17.750365Z",
      "internal_notes": null,
      "items": [
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b1a56",
            "name": "B40414"
          },
          "compliance_quantity": null,
          "id": "f0801e8a-8a12-43ac-9ec9-4bd17b4095c6",
          "location": null,
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "0d22ed1c-3acb-41b2-8332-b56fae0cd904",
            "name": "Product 40412",
            "sku": "sku 40413",
            "updated_datetime": "2025-04-18T16:23:17.772558Z"
          },
          "quantity": "15.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b1a5d",
            "name": "B40427"
          },
          "compliance_quantity": null,
          "id": "c8828fb6-5eed-48aa-ae7f-b4724038999e",
          "location": null,
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "47a8b4ba-f9fa-437a-b235-a25abec344b7",
            "name": "Product 40423",
            "sku": "sku 40424",
            "updated_datetime": "2025-04-18T16:23:17.795647Z"
          },
          "quantity": "10.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b1a63",
            "name": "B40447"
          },
          "compliance_quantity": null,
          "id": "832bedf6-2e6e-4c5f-aeac-3e96386eacee",
          "location": null,
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "5d8ee9f5-3563-4888-9a7f-b877d4975c8c",
            "name": "Product 40442",
            "sku": "sku 40443",
            "updated_datetime": "2025-04-18T16:23:17.821205Z"
          },
          "quantity": "5.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b1a67",
            "name": "B40453"
          },
          "compliance_quantity": null,
          "id": "e036c641-f28e-41af-a229-82c1197600b5",
          "location": null,
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "116f024e-8bd9-45b5-94c4-17ca87a065a8",
            "name": "Product 40451",
            "sku": "sku 40452",
            "updated_datetime": "2025-04-18T16:23:17.845587Z"
          },
          "quantity": "2.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        }
      ],
      "order_datetime": "2020-01-01T12:20:00.000000Z",
      "order_number": "SO-2498",
      "owner": {
        "banned": false,
        "email": "owner-50248@example.com",
        "full_name": "FirstName98324 LastName98325",
        "id": "00000000-0000-0000-0000-00000114b569",
        "role": {
          "id": "00000000-0000-0000-0000-0000011308c2",
          "name": "Admin 49323"
        }
      },
      "shipping_location": null,
      "status": "COMPLETED",
      "total": "320.00",
      "updated_datetime": "2025-04-18T16:23:17.891185Z"
    },
    {
      "billing_location": null,
      "charges": [],
      "company": {
        "id": "00000000-0000-0000-0000-0000007a409e",
        "name": "Company 35337",
        "updated_datetime": "2025-04-18T16:23:17.302373Z"
      },
      "creator": {
        "banned": false,
        "email": "owner-50139@example.com",
        "full_name": "FirstName98104 LastName98105",
        "id": "00000000-0000-0000-0000-00000114b4fc",
        "role": {
          "id": "00000000-0000-0000-0000-000001130855",
          "name": "Admin 49214"
        }
      },
      "custom_data": [],
      "delivery_datetime": null,
      "due_datetime": "2025-04-18T16:23:17.341514Z",
      "external_notes": null,
      "id": "76495225-d565-43e0-baa6-aba75b9dabf4",
      "inserted_datetime": "2025-04-18T16:23:17.342730Z",
      "internal_notes": null,
      "items": [
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b1a38",
            "name": "B40302"
          },
          "compliance_quantity": null,
          "id": "3b111b68-a8a6-4f80-baa3-e69a9bf17f43",
          "location": null,
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "05c84ae6-2494-476d-af5a-eac76366faba",
            "name": "Product 40299",
            "sku": "sku 40300",
            "updated_datetime": "2025-04-18T16:23:17.363330Z"
          },
          "quantity": "15.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b1a3b",
            "name": "B40315"
          },
          "compliance_quantity": null,
          "id": "fd983b2a-7e02-46ce-a924-2166fe1eaeca",
          "location": null,
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "f50d037d-66f6-47ea-be45-9d0b2c73191b",
            "name": "Product 40310",
            "sku": "sku 40311",
            "updated_datetime": "2025-04-18T16:23:17.388280Z"
          },
          "quantity": "10.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b1a3c",
            "name": "B40324"
          },
          "compliance_quantity": null,
          "id": "dd3d8870-82fc-4e76-9639-7a5475cd32ce",
          "location": null,
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "70b5eaac-7585-4ade-a96a-9fe9d4664679",
            "name": "Product 40320",
            "sku": "sku 40321",
            "updated_datetime": "2025-04-18T16:23:17.411725Z"
          },
          "quantity": "5.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004b1a3e",
            "name": "B40330"
          },
          "compliance_quantity": null,
          "id": "288f0672-92d2-4290-8348-736716a297be",
          "location": null,
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "780f6ad2-36ec-460b-b8b5-05cda3dc761d",
            "name": "Product 40328",
            "sku": "sku 40329",
            "updated_datetime": "2025-04-18T16:23:17.439351Z"
          },
          "quantity": "2.000000000",
          "returned_quantity": "0",
          "total_cost_actual": null,
          "total_cost_default": null
        }
      ],
      "order_datetime": "2020-01-01T12:00:00.000000Z",
      "order_number": "SO-2486",
      "owner": {
        "banned": false,
        "email": "owner-50139@example.com",
        "full_name": "FirstName98104 LastName98105",
        "id": "00000000-0000-0000-0000-00000114b4fc",
        "role": {
          "id": "00000000-0000-0000-0000-000001130855",
          "name": "Admin 49214"
        }
      },
      "shipping_location": null,
      "status": "COMPLETED",
      "total": "320.00",
      "updated_datetime": "2025-04-18T16:23:17.486387Z"
    }
  ]
}

Get orders sorted by Order Date descendingly date and filtered by various attributes

Note: The page size for this endpoint is 500 orders per page.

Request

GET /public/v1/orders

Parameters

Parameter Description In Type Required Default Example
delivery_datetime Filter orders by the delivery datetime query string false 2022-07-10T00:00:00Z,
due_datetime Filter orders by the due datetime query string false ,2022-07-10T00:00:00Z
inserted_datetime Filter orders by their creation datetime query string false 2022-07-10T00:00:00Z,
order_datetime Filter orders by the order datetime query string false 2022-07-10T00:00:00Z,2022-07-11T00:00:00Z
page Pagination information body Page false
status Filter orders by their status. Accepted values are "PENDING", "PROCESSING", "READY_TO_SHIP", "DELIVERING", "DELIVERED", "COMPLETED" and "CANCELED". query array false ["PENDING","PROCESSING"]
updated_datetime Filter orders by the datetime they were most recently modified query string false ,2022-07-10T00:00:00Z

Responses

Status Description Schema
200 A list of orders Orders

Get an order

GET /orders/:id returns the expected order

GET /public/v1/orders/b80790bf-2c2b-42b2-975b-04f94a3bee60
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5OTMsImlhdCI6MTc0NDk5MzM5MywiaXNzIjoiRGlzdHJ1IiwianRpIjoiNjNkYTBiMGItMzhkNC00NjY3LWJmM2QtOTA2ZjE4MTgwMDcxIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzkyLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzMzODMiLCJ0eXAiOiJhY2Nlc3MifQ.aU_otnUsC9kMkrOY7Tpm1j5ctH56cukpZt7BPuO4r5s

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 5c0d97774331c8000000000000000001-f3ca7fc570cd29f2-0
{
  "data": {
    "billing_location": null,
    "charges": [],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a3ea2",
      "name": "Company 34534",
      "updated_datetime": "2025-04-18T16:23:13.815872Z"
    },
    "creator": {
      "banned": false,
      "email": "owner-49246@example.com",
      "full_name": "FirstName96378 LastName96379",
      "id": "00000000-0000-0000-0000-00000114b18b",
      "role": {
        "id": "00000000-0000-0000-0000-0000011304e0",
        "name": "Admin 48329"
      }
    },
    "custom_data": [
      {
        "id": 64504,
        "name": "Custom Field 198",
        "value": "Custom Field Value 1"
      }
    ],
    "delivery_datetime": null,
    "due_datetime": "2025-04-18T16:23:13.852097Z",
    "external_notes": null,
    "id": "b80790bf-2c2b-42b2-975b-04f94a3bee60",
    "inserted_datetime": "2025-04-18T16:23:13.853491Z",
    "internal_notes": null,
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1945",
          "name": "B39344"
        },
        "compliance_quantity": null,
        "id": "844cd3ff-0edc-4471-b78a-56d3bb080669",
        "location": null,
        "package": null,
        "price": "10.000000000",
        "price_base": "10",
        "product": {
          "id": "4b41ea48-6143-4a08-b985-b946281a7824",
          "name": "Product 39340",
          "sku": "sku 39341",
          "updated_datetime": "2025-04-18T16:23:13.876376Z"
        },
        "quantity": "15.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      },
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1946",
          "name": "B39351"
        },
        "compliance_quantity": null,
        "id": "f5f12683-43d3-4316-9e34-85691e8cbe57",
        "location": null,
        "package": null,
        "price": "10.000000000",
        "price_base": "10",
        "product": {
          "id": "8fdcdeee-f8a3-4f6e-8f03-9af3e355f9f7",
          "name": "Product 39349",
          "sku": "sku 39350",
          "updated_datetime": "2025-04-18T16:23:13.902797Z"
        },
        "quantity": "10.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      },
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1948",
          "name": "B39359"
        },
        "compliance_quantity": null,
        "id": "9feb96a9-f4f9-4edb-8740-9625c450e7eb",
        "location": null,
        "package": null,
        "price": "10.000000000",
        "price_base": "10",
        "product": {
          "id": "606c7df5-8159-494b-b3b3-60482893ca63",
          "name": "Product 39357",
          "sku": "sku 39358",
          "updated_datetime": "2025-04-18T16:23:13.928890Z"
        },
        "quantity": "5.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      },
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b194a",
          "name": "B39367"
        },
        "compliance_quantity": null,
        "id": "c1a162eb-aeb0-4734-9b18-38737bee06b2",
        "location": null,
        "package": null,
        "price": "10.000000000",
        "price_base": "10",
        "product": {
          "id": "42ef8467-cf66-439c-a833-710d36630152",
          "name": "Product 39365",
          "sku": "sku 39366",
          "updated_datetime": "2025-04-18T16:23:13.956022Z"
        },
        "quantity": "2.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      }
    ],
    "order_datetime": "2025-04-18T16:23:13.852096Z",
    "order_number": "SO-2427",
    "owner": {
      "banned": false,
      "email": "owner-49246@example.com",
      "full_name": "FirstName96378 LastName96379",
      "id": "00000000-0000-0000-0000-00000114b18b",
      "role": {
        "id": "00000000-0000-0000-0000-0000011304e0",
        "name": "Admin 48329"
      }
    },
    "shipping_location": null,
    "status": "COMPLETED",
    "total": "320.00",
    "updated_datetime": "2025-04-18T16:23:14.002106Z"
  }
}

GET /orders/:id returns cost data for order items

GET /public/v1/orders/7a65a68b-ab06-4402-bb4d-2e450c3ac0ef
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5OTEsImlhdCI6MTc0NDk5MzM5MSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNmNjMDhkNmMtZDhmOS00ZjUwLWJiMjAtYjExNzZmMzNhM2E4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzkwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzI5NTEiLCJ0eXAiOiJhY2Nlc3MifQ.eYX7aGUvoyN8AId7VJZbe5951FCri2b-mu6fxe6vQX0

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 85a0ee7fc5b4c0000000000000000001-8db68b3d773a9dfd-0
{
  "data": {
    "billing_location": null,
    "charges": [],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a3dbd",
      "name": "Company 34210",
      "updated_datetime": "2025-04-18T16:23:11.841118Z"
    },
    "creator": {
      "banned": false,
      "email": "owner-48827@example.com",
      "full_name": "FirstName95600 LastName95601",
      "id": "00000000-0000-0000-0000-00000114affb",
      "role": {
        "id": "00000000-0000-0000-0000-000001130350",
        "name": "Admin 47929"
      }
    },
    "custom_data": [],
    "delivery_datetime": null,
    "due_datetime": "2025-04-18T16:23:11.843311Z",
    "external_notes": null,
    "id": "7a65a68b-ab06-4402-bb4d-2e450c3ac0ef",
    "inserted_datetime": "2025-04-18T16:23:11.943970Z",
    "internal_notes": null,
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b18c5",
          "name": "B38876"
        },
        "compliance_quantity": null,
        "id": "c9e80df1-c1bd-4d47-8695-ee6eb7c587c1",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d02ee0",
          "id": "00000000-0000-0000-0000-00000054179f",
          "license_id": null,
          "name": "Place 14783"
        },
        "package": null,
        "price": "65586.000000000",
        "price_base": "65586",
        "product": {
          "id": "94bb28e4-2ce1-40a0-a6ee-5c694eec8f1f",
          "name": "Product 38874",
          "sku": "sku 38875",
          "updated_datetime": "2025-04-18T16:23:11.732412Z"
        },
        "quantity": "2.000000000",
        "returned_quantity": "0",
        "total_cost_actual": "20.052",
        "total_cost_default": "10"
      }
    ],
    "order_datetime": "2025-04-18T16:23:11.843314Z",
    "order_number": "SO-0000001",
    "owner": null,
    "shipping_location": null,
    "status": "PROCESSING",
    "total": "131172.00",
    "updated_datetime": "2025-04-18T16:23:11.943970Z"
  }
}

Get a single order given the ID. Note: This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses.

Request

GET /public/v1/orders/{id}

Parameters

Parameter Description In Type Required Default Example
id Order ID path string true

Responses

Status Description Schema
200 A single order Order

Upsert an order

POST /public/v1/orders creates an order (with product-tracked item)

POST /public/v1/orders
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDMwMDMsImlhdCI6MTc0NDk5MzQwMywiaXNzIjoiRGlzdHJ1IiwianRpIjoiMTFhMmNlZWUtODkzYS00M2U3LWJlMGQtMWJkNjAzY2Y1N2U0IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzNDAyLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzU4NTgiLCJ0eXAiOiJhY2Nlc3MifQ.g0jOS-D8I7ng0DGdw3K8xEeMWyUsSsfHo8NGeUFgD5w
{
  "billing_location_id": "00000000-0000-0000-0000-000000541b6b",
  "charges": [
    {
      "name": "C1",
      "percent": "10.0000",
      "type": "CHARGE",
      "unit_type": "PERCENT"
    },
    {
      "name": "C2",
      "price": "-5.0000",
      "type": "DISCOUNT",
      "unit_type": "PRICE"
    }
  ],
  "company_id": "00000000-0000-0000-0000-0000007a4400",
  "delivery_datetime": "2020-01-01T00:00:00.000000Z",
  "due_datetime": "2020-01-01T00:00:01.000000Z",
  "external_notes": "Thank you for ordering!",
  "internal_notes": "Internal notes for this order",
  "items": [
    {
      "location_id": "00000000-0000-0000-0000-000000541b6b",
      "price_base": "10.000000000",
      "product_id": "90796852-f2b2-4515-b9e4-7b4c59d725f3",
      "quantity": "1.000000000"
    }
  ],
  "order_datetime": "2020-01-01T00:00:02.000000Z",
  "owner_id": "00000000-0000-0000-0000-00000114bb32",
  "shipping_location_id": "00000000-0000-0000-0000-000000541b6b",
  "status": "PROCESSING"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 4870a52f515a94000000000000000001-f175996cb45b6a24-0
{
  "data": {
    "billing_location": {
      "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
      "company_id": "00000000-0000-0000-0000-000000d038db",
      "id": "00000000-0000-0000-0000-000000541b6b",
      "license_id": "00000000-0000-0000-0000-00000035ced3",
      "name": "Place 15748"
    },
    "charges": [
      {
        "id": "531c675e-1f1e-4530-92b7-49339cc99e0f",
        "name": "C1",
        "percent": "10.0000",
        "price": "1.00",
        "type": "CHARGE",
        "unit_type": "PERCENT"
      },
      {
        "id": "9bc1f3ac-61fa-424b-8450-d867993107de",
        "name": "C2",
        "percent": null,
        "price": "-5.00",
        "type": "DISCOUNT",
        "unit_type": "PRICE"
      }
    ],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a4400",
      "name": "Company 36732",
      "updated_datetime": "2025-04-18T16:23:23.386563Z"
    },
    "creator": {
      "banned": false,
      "email": "user1@a.com",
      "full_name": "John Foo",
      "id": "00000000-0000-0000-0000-00000114bb32",
      "role": {
        "id": "00000000-0000-0000-0000-000001130e6e",
        "name": "Admin 50773"
      }
    },
    "custom_data": [
      {
        "id": 64512,
        "name": "Custom Field 206",
        "value": null
      }
    ],
    "delivery_datetime": "2020-01-01T00:00:00.000000Z",
    "due_datetime": "2020-01-01T00:00:01.000000Z",
    "external_notes": "Thank you for ordering!",
    "id": "e52fe908-dac1-4396-914f-d3382921bf83",
    "inserted_datetime": "2025-04-18T16:23:23.495585Z",
    "internal_notes": "Internal notes for this order",
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1bf2",
          "name": "B1"
        },
        "compliance_quantity": null,
        "id": "b8060cc0-054b-4b23-914d-7351076a73a3",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d038db",
          "id": "00000000-0000-0000-0000-000000541b6b",
          "license_id": "00000000-0000-0000-0000-00000035ced3",
          "name": "Place 15748"
        },
        "package": null,
        "price": "10.000000000",
        "price_base": "10.000000000",
        "product": {
          "id": "90796852-f2b2-4515-b9e4-7b4c59d725f3",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:23:23.436087Z"
        },
        "quantity": "1.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      }
    ],
    "order_datetime": "2020-01-01T00:00:02.000000Z",
    "order_number": "SO-0000001",
    "owner": {
      "banned": false,
      "email": "user1@a.com",
      "full_name": "John Foo",
      "id": "00000000-0000-0000-0000-00000114bb32",
      "role": {
        "id": "00000000-0000-0000-0000-000001130e6e",
        "name": "Admin 50773"
      }
    },
    "shipping_location": {
      "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
      "company_id": "00000000-0000-0000-0000-000000d038db",
      "id": "00000000-0000-0000-0000-000000541b6b",
      "license_id": "00000000-0000-0000-0000-00000035ced3",
      "name": "Place 15748"
    },
    "status": "PROCESSING",
    "total": "6.00",
    "updated_datetime": "2025-04-18T16:23:23.547584Z"
  }
}

POST /public/v1/orders creates an order (with product-tracked item) for a Blaze retailer, fails if payment type not specified

POST /public/v1/orders
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5OTIsImlhdCI6MTc0NDk5MzM5MiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiZmU0N2UzMzAtMWUwOS00NTEzLTlkNzctOTY5MWY2NTlhNWRkIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzkxLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzMxNjMiLCJ0eXAiOiJhY2Nlc3MifQ.POcsNjzy6jrkti1VDb1xaWIXkC0mxo5v16TcusCh8lc
{
  "billing_location_id": "00000000-0000-0000-0000-0000005417e9",
  "charges": [],
  "company_id": "00000000-0000-0000-0000-0000007a3e19",
  "delivery_datetime": "2020-01-01T00:00:00.000000Z",
  "due_datetime": "2020-01-01T00:00:01.000000Z",
  "items": [
    {
      "location_id": "00000000-0000-0000-0000-0000005417e9",
      "price_base": "10.000000000",
      "product_id": "071762e5-90c5-47a6-b849-033cb9691ec1",
      "quantity": "1.000000000"
    }
  ],
  "order_datetime": "2020-01-01T00:00:02.000000Z",
  "shipping_location_id": "00000000-0000-0000-0000-0000005417e9",
  "status": "PROCESSING"
}

Response

400
cache-control: max-age=0, private, must-revalidate
content-type: application/json; charset=utf-8
b3: 181aa61dd11b55000000000000000001-57e8345730e74fa2-0
{
  "errors": [
    {
      "context": {
        "id": "865980f9-aafa-4fbb-87cc-3685ade74d6e"
      },
      "message": "can't be blank",
      "pointer": ["blaze_payment_type"],
      "section": "body"
    }
  ]
}

POST /public/v1/orders creates an order (with product-tracked item) for a Blaze retailer, fails if payment type not specified

POST /public/v1/orders
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5OTIsImlhdCI6MTc0NDk5MzM5MiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiZmU0N2UzMzAtMWUwOS00NTEzLTlkNzctOTY5MWY2NTlhNWRkIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzkxLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzMxNjMiLCJ0eXAiOiJhY2Nlc3MifQ.POcsNjzy6jrkti1VDb1xaWIXkC0mxo5v16TcusCh8lc
{
  "billing_location_id": "00000000-0000-0000-0000-0000005417e9",
  "blaze_payment_type": "CASH",
  "charges": [],
  "company_id": "00000000-0000-0000-0000-0000007a3e19",
  "delivery_datetime": "2020-01-01T00:00:00.000000Z",
  "due_datetime": "2020-01-01T00:00:01.000000Z",
  "items": [
    {
      "location_id": "00000000-0000-0000-0000-0000005417e9",
      "price_base": "10.000000000",
      "product_id": "071762e5-90c5-47a6-b849-033cb9691ec1",
      "quantity": "1.000000000"
    }
  ],
  "order_datetime": "2020-01-01T00:00:02.000000Z",
  "shipping_location_id": "00000000-0000-0000-0000-0000005417e9",
  "status": "PROCESSING"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 181aa61dd11b55000000000000000001-023508749d14401c-0
{
  "data": {
    "billing_location": {
      "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
      "company_id": "00000000-0000-0000-0000-000000d02f77",
      "id": "00000000-0000-0000-0000-0000005417e9",
      "license_id": "00000000-0000-0000-0000-00000035cd47",
      "name": "Place 14857"
    },
    "charges": [],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a3e19",
      "name": "Company 34337",
      "updated_datetime": "2025-04-18T16:23:12.675405Z"
    },
    "creator": {
      "banned": false,
      "email": "owner-49025@example.com",
      "full_name": "FirstName95946 LastName95947",
      "id": "00000000-0000-0000-0000-00000114b0ab",
      "role": {
        "id": "00000000-0000-0000-0000-0000011303ff",
        "name": "Admin 48104"
      }
    },
    "custom_data": [],
    "delivery_datetime": "2020-01-01T00:00:00.000000Z",
    "due_datetime": "2020-01-01T00:00:01.000000Z",
    "external_notes": null,
    "id": "e610a80f-a7bf-47bf-b523-c518979e6993",
    "inserted_datetime": "2025-04-18T16:23:12.869847Z",
    "internal_notes": null,
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1907",
          "name": "B1"
        },
        "compliance_quantity": null,
        "id": "5b648835-ad2b-4d07-9f7e-b331c1660d86",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d02f77",
          "id": "00000000-0000-0000-0000-0000005417e9",
          "license_id": "00000000-0000-0000-0000-00000035cd47",
          "name": "Place 14857"
        },
        "package": null,
        "price": "10.000000000",
        "price_base": "10.000000000",
        "product": {
          "id": "071762e5-90c5-47a6-b849-033cb9691ec1",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:23:12.738988Z"
        },
        "quantity": "1.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      }
    ],
    "order_datetime": "2020-01-01T00:00:02.000000Z",
    "order_number": "SO-0000001",
    "owner": null,
    "shipping_location": {
      "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
      "company_id": "00000000-0000-0000-0000-000000d02f77",
      "id": "00000000-0000-0000-0000-0000005417e9",
      "license_id": "00000000-0000-0000-0000-00000035cd47",
      "name": "Place 14857"
    },
    "status": "PROCESSING",
    "total": "10.00",
    "updated_datetime": "2025-04-18T16:23:12.869847Z"
  }
}

POST /public/v1/orders applies the best fit price tier items to order items

POST /public/v1/orders
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDMwMDMsImlhdCI6MTc0NDk5MzQwMywiaXNzIjoiRGlzdHJ1IiwianRpIjoiNTM2NGU3MzktNWQzOC00NThjLThjNmYtZTZjYzI5MDVjNDZmIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzNDAyLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzU5NjMiLCJ0eXAiOiJhY2Nlc3MifQ.QIwU3NAfilhdechzh_snIYzF64Go6JcBDMRWVIH-Fzw
{
  "billing_location_id": "00000000-0000-0000-0000-000000541b94",
  "charges": [],
  "company_id": "00000000-0000-0000-0000-0000007a443c",
  "delivery_datetime": "2020-01-01T00:00:00.000000Z",
  "due_datetime": "2020-01-01T00:00:01.000000Z",
  "items": [
    {
      "location_id": "00000000-0000-0000-0000-000000541b94",
      "position": 1,
      "price_base": "100.000000000",
      "product_id": "bde538d9-d700-418e-8587-36661c85084f",
      "quantity": "80.000000000"
    },
    {
      "location_id": "00000000-0000-0000-0000-000000541b94",
      "position": 2,
      "price_base": "200.000000000",
      "product_id": "bde538d9-d700-418e-8587-36661c85084f",
      "quantity": "10.000000000"
    },
    {
      "location_id": "00000000-0000-0000-0000-000000541b94",
      "position": 3,
      "price_base": "300.000000000",
      "product_id": "6ea65a06-5992-4427-a9db-bd9167839a74",
      "quantity": "20.000000000"
    }
  ],
  "order_datetime": "2020-01-01T00:00:02.000000Z",
  "shipping_location_id": "00000000-0000-0000-0000-000000541b94",
  "status": "PROCESSING"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 905d0c116be380000000000000000001-136470c94dd200cc-0
{
  "data": {
    "billing_location": {
      "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
      "company_id": "00000000-0000-0000-0000-000000d03936",
      "id": "00000000-0000-0000-0000-000000541b94",
      "license_id": "00000000-0000-0000-0000-00000035cee2",
      "name": "Place 15789"
    },
    "charges": [],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a443c",
      "name": "Company 36822",
      "updated_datetime": "2025-04-18T16:23:23.833801Z"
    },
    "creator": {
      "banned": false,
      "email": "owner-51828@example.com",
      "full_name": "FirstName101446 LastName101447",
      "id": "00000000-0000-0000-0000-00000114bb9b",
      "role": {
        "id": "00000000-0000-0000-0000-000001130ed5",
        "name": "Admin 50875"
      }
    },
    "custom_data": [],
    "delivery_datetime": "2020-01-01T00:00:00.000000Z",
    "due_datetime": "2020-01-01T00:00:01.000000Z",
    "external_notes": null,
    "id": "59b9a2b0-735c-4295-8a69-301cbb7b362e",
    "inserted_datetime": "2025-04-18T16:23:24.027185Z",
    "internal_notes": null,
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1c19",
          "name": "B1"
        },
        "compliance_quantity": null,
        "id": "b57e8763-1cd4-4ad2-8377-88ef2cef8fe7",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d03936",
          "id": "00000000-0000-0000-0000-000000541b94",
          "license_id": "00000000-0000-0000-0000-00000035cee2",
          "name": "Place 15789"
        },
        "package": null,
        "price": "80.000000000",
        "price_base": "100.000000000",
        "product": {
          "id": "bde538d9-d700-418e-8587-36661c85084f",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:23:23.882562Z"
        },
        "quantity": "80.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      },
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1c19",
          "name": "B1"
        },
        "compliance_quantity": null,
        "id": "e9cc856d-d623-44d8-88c8-2e6aa1951800",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d03936",
          "id": "00000000-0000-0000-0000-000000541b94",
          "license_id": "00000000-0000-0000-0000-00000035cee2",
          "name": "Place 15789"
        },
        "package": null,
        "price": "180.000000000",
        "price_base": "200.000000000",
        "product": {
          "id": "bde538d9-d700-418e-8587-36661c85084f",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:23:23.882562Z"
        },
        "quantity": "10.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      },
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1c1f",
          "name": "B2"
        },
        "compliance_quantity": null,
        "id": "7663c1b4-14be-4b23-892c-bd02fc42db3d",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d03936",
          "id": "00000000-0000-0000-0000-000000541b94",
          "license_id": "00000000-0000-0000-0000-00000035cee2",
          "name": "Place 15789"
        },
        "package": null,
        "price": "270.000000000",
        "price_base": "300.000000000",
        "product": {
          "id": "6ea65a06-5992-4427-a9db-bd9167839a74",
          "name": "P2",
          "sku": "SKU2",
          "updated_datetime": "2025-04-18T16:23:23.920104Z"
        },
        "quantity": "20.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      }
    ],
    "order_datetime": "2020-01-01T00:00:02.000000Z",
    "order_number": "SO-0000001",
    "owner": null,
    "shipping_location": {
      "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
      "company_id": "00000000-0000-0000-0000-000000d03936",
      "id": "00000000-0000-0000-0000-000000541b94",
      "license_id": "00000000-0000-0000-0000-00000035cee2",
      "name": "Place 15789"
    },
    "status": "PROCESSING",
    "total": "13600.00",
    "updated_datetime": "2025-04-18T16:23:24.078780Z"
  }
}

POST /public/v1/orders creates an order (with batch-tracked item)

POST /public/v1/orders
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5OTEsImlhdCI6MTc0NDk5MzM5MSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYTE5ZTZiM2QtZjczMC00YjRhLTk4NmQtODlmNzM4YWMyM2YyIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzkwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzI4ODUiLCJ0eXAiOiJhY2Nlc3MifQ.gi2FwEGl6j9Knei70P7ZeaxnPQU8T1jsRjx4F9tO29M
{
  "due_datetime": "2020-01-01T00:00:01.000000Z",
  "items": [
    {
      "batch_id": "00000000-0000-0000-0000-0000004b18b4",
      "location_id": "00000000-0000-0000-0000-00000054177f",
      "price_base": "10.000000000",
      "quantity": "1.000000000"
    }
  ],
  "order_datetime": "2020-01-01T00:00:02.000000Z",
  "status": "PROCESSING"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: c5acb5f189eba0000000000000000001-2c5584bdfcfdb1c3-0
{
  "data": {
    "billing_location": null,
    "charges": [],
    "company": null,
    "creator": {
      "banned": false,
      "email": "user1@a.com",
      "full_name": "John Foo",
      "id": "00000000-0000-0000-0000-00000114af95",
      "role": {
        "id": "00000000-0000-0000-0000-0000011302ea",
        "name": "Admin 47827"
      }
    },
    "custom_data": [],
    "delivery_datetime": null,
    "due_datetime": "2020-01-01T00:00:01.000000Z",
    "external_notes": null,
    "id": "8f3df786-3ed0-427e-815f-dec0e004ba62",
    "inserted_datetime": "2025-04-18T16:23:11.354774Z",
    "internal_notes": null,
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b18b4",
          "name": "B1"
        },
        "compliance_quantity": null,
        "id": "f0f4733a-9443-4482-ac5a-79ba321b1b61",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d02ea8",
          "id": "00000000-0000-0000-0000-00000054177f",
          "license_id": "00000000-0000-0000-0000-00000035cd19",
          "name": "Place 14752"
        },
        "package": null,
        "price": "10.000000000",
        "price_base": "10.000000000",
        "product": {
          "id": "5a9e62b8-9b95-4b36-9533-8e0f07ae5690",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:23:11.311626Z"
        },
        "quantity": "1.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      }
    ],
    "order_datetime": "2020-01-01T00:00:02.000000Z",
    "order_number": "SO-0000001",
    "owner": null,
    "shipping_location": null,
    "status": "PROCESSING",
    "total": "10.00",
    "updated_datetime": "2025-04-18T16:23:11.354774Z"
  }
}

POST /public/v1/orders creates an order (with batch-tracked item without batch set)

POST /public/v1/orders
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDMwMDUsImlhdCI6MTc0NDk5MzQwNSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiZjA3OTFkZDYtYThlYS00MWQ2LWI5OGYtY2E0NDk4MTcxNDg0IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzNDA0LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzY0NzYiLCJ0eXAiOiJhY2Nlc3MifQ.XoVDvzAEJ1oIYJ3o_zualf-4mvPDyISW6BRpvTJ3MoI
{
  "due_datetime": "2020-01-01T00:00:01.000000Z",
  "items": [
    {
      "location_id": "00000000-0000-0000-0000-000000541c32",
      "price_base": "10.000000000",
      "product_id": "28b0e5c0-5528-4c18-bc77-8b1285ca3b9b",
      "quantity": "1.000000000"
    }
  ],
  "order_datetime": "2020-01-01T00:00:02.000000Z",
  "status": "PROCESSING"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 0b3a1711fcc361800000000000000001-cc003e66cb362370-0
{
  "data": {
    "billing_location": null,
    "charges": [],
    "company": null,
    "creator": {
      "banned": false,
      "email": "user1@a.com",
      "full_name": "John Foo",
      "id": "00000000-0000-0000-0000-00000114bd9c",
      "role": {
        "id": "00000000-0000-0000-0000-0000011310c2",
        "name": "Admin 51366"
      }
    },
    "custom_data": [],
    "delivery_datetime": null,
    "due_datetime": "2020-01-01T00:00:01.000000Z",
    "external_notes": null,
    "id": "ce6d31ca-ea33-49a1-9efe-30a531851f74",
    "inserted_datetime": "2025-04-18T16:23:25.705849Z",
    "internal_notes": null,
    "items": [
      {
        "batch": null,
        "compliance_quantity": null,
        "id": "4b527742-bd63-4f64-acf4-7d0aafd0d733",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d03ae5",
          "id": "00000000-0000-0000-0000-000000541c32",
          "license_id": "00000000-0000-0000-0000-00000035cf24",
          "name": "Place 15947"
        },
        "package": null,
        "price": "10.000000000",
        "price_base": "10.000000000",
        "product": {
          "id": "28b0e5c0-5528-4c18-bc77-8b1285ca3b9b",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:23:25.681745Z"
        },
        "quantity": "1.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      }
    ],
    "order_datetime": "2020-01-01T00:00:02.000000Z",
    "order_number": "SO-0000001",
    "owner": null,
    "shipping_location": null,
    "status": "PROCESSING",
    "total": "10.00",
    "updated_datetime": "2025-04-18T16:23:25.705849Z"
  }
}

POST /public/v1/orders creates an order (with package-tracked item)

POST /public/v1/orders
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5OTQsImlhdCI6MTc0NDk5MzM5NCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNzQ1YzBhNTQtNDg2NC00MzQ1LWEzZjUtMGRlNmQyYTQ5Mzg5IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzkzLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzM0NzAiLCJ0eXAiOiJhY2Nlc3MifQ.Kh6ar109xF52byecCJzn2U3ZAzKlLNVl4aKjYIO39dc
{
  "due_datetime": "2020-01-01T00:00:01.000000Z",
  "items": [
    {
      "compliance_quantity": "1.0000",
      "location_id": "00000000-0000-0000-0000-000000541843",
      "package_id": "00000000-0000-0000-0000-0000001b1789",
      "price_base": "10.000000000",
      "quantity": "1.000000000"
    }
  ],
  "order_datetime": "2020-01-01T00:00:02.000000Z",
  "status": "PROCESSING"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 32a50d1b4a5750000000000000000001-54cae1ec71a5a737-0
{
  "data": {
    "billing_location": null,
    "charges": [],
    "company": null,
    "creator": {
      "banned": false,
      "email": "owner-49330@example.com",
      "full_name": "FirstName96530 LastName96531",
      "id": "00000000-0000-0000-0000-00000114b1de",
      "role": {
        "id": "00000000-0000-0000-0000-000001130536",
        "name": "Admin 48415"
      }
    },
    "custom_data": [],
    "delivery_datetime": null,
    "due_datetime": "2020-01-01T00:00:01.000000Z",
    "external_notes": null,
    "id": "43fb179d-f9ed-4f4e-b055-8bd3be77fa47",
    "inserted_datetime": "2025-04-18T16:23:14.298817Z",
    "internal_notes": null,
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1957",
          "name": "B1"
        },
        "compliance_quantity": "1.0000",
        "id": "f612cc6e-9bf5-4254-b3d0-05283a77f70c",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d03082",
          "id": "00000000-0000-0000-0000-000000541843",
          "license_id": "00000000-0000-0000-0000-00000035cd73",
          "name": "Place 14945"
        },
        "package": {
          "batch_number": "B1",
          "compliance_label": "ABCDEF012345670000080653",
          "id": "00000000-0000-0000-0000-0000001b1789",
          "metrc_label": "ABCDEF012345670000080653",
          "status": "selling"
        },
        "price": "10.000000000",
        "price_base": "10.000000000",
        "product": {
          "id": "16c57bdd-c1fb-4aed-99fc-fab642b82fa6",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:23:14.170461Z"
        },
        "quantity": "1.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      }
    ],
    "order_datetime": "2020-01-01T00:00:02.000000Z",
    "order_number": "SO-0000001",
    "owner": null,
    "shipping_location": null,
    "status": "PROCESSING",
    "total": "10.00",
    "updated_datetime": "2025-04-18T16:23:14.298817Z"
  }
}

POST /public/v1/orders creates an order (with package-tracked item without package set)

POST /public/v1/orders
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5OTEsImlhdCI6MTc0NDk5MzM5MSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMTViNWVmMGItNTFiNC00NzVlLWE3ZDUtMDIyZDU3Yzg5YjVlIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzkwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzI4MDAiLCJ0eXAiOiJhY2Nlc3MifQ.NSGFlKE5Rf16220a_UaxVW0t5PJsVtrZnIDHfQpaKPI
{
  "due_datetime": "2020-01-01T00:00:01.000000Z",
  "items": [
    {
      "location_id": "00000000-0000-0000-0000-00000054175d",
      "price_base": "10.000000000",
      "product_id": "20b5d8d0-edbf-468b-8009-578b70cd4baa",
      "quantity": "1.000000000"
    }
  ],
  "order_datetime": "2020-01-01T00:00:02.000000Z",
  "status": "PROCESSING"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 569c74c7b93918000000000000000001-345defe0491b98b6-0
{
  "data": {
    "billing_location": null,
    "charges": [],
    "company": null,
    "creator": {
      "banned": false,
      "email": "user1@a.com",
      "full_name": "John Foo",
      "id": "00000000-0000-0000-0000-00000114af40",
      "role": {
        "id": "00000000-0000-0000-0000-00000113029a",
        "name": "Admin 47747"
      }
    },
    "custom_data": [],
    "delivery_datetime": null,
    "due_datetime": "2020-01-01T00:00:01.000000Z",
    "external_notes": null,
    "id": "fec796ab-cadb-4553-bac3-401f4e4f574b",
    "inserted_datetime": "2025-04-18T16:23:11.061670Z",
    "internal_notes": null,
    "items": [
      {
        "batch": null,
        "compliance_quantity": null,
        "id": "5b8d1dc2-aa9d-4b29-b8dd-1e58d9a8e2fb",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d02e64",
          "id": "00000000-0000-0000-0000-00000054175d",
          "license_id": "00000000-0000-0000-0000-00000035cd04",
          "name": "Place 14718"
        },
        "package": null,
        "price": "10.000000000",
        "price_base": "10.000000000",
        "product": {
          "id": "20b5d8d0-edbf-468b-8009-578b70cd4baa",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:23:11.032046Z"
        },
        "quantity": "1.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      }
    ],
    "order_datetime": "2020-01-01T00:00:02.000000Z",
    "order_number": "SO-0000001",
    "owner": null,
    "shipping_location": null,
    "status": "PROCESSING",
    "total": "10.00",
    "updated_datetime": "2025-04-18T16:23:11.061670Z"
  }
}

POST /public/v1/orders creates an order with metrc transfer template

POST /public/v1/orders
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5OTUsImlhdCI6MTc0NDk5MzM5NSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYWI2YWY4ZDItN2FhMi00ZmY3LWFkMzYtNmRlNjc3MmRkMGJmIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzk0LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzM3MTEiLCJ0eXAiOiJhY2Nlc3MifQ.L-NM1x7bLIlbrxTDqPmIdy57nb9EEZ2MCioHh8cpMeo
{
  "billing_location_id": "00000000-0000-0000-0000-00000054189c",
  "charges": [],
  "company_id": "00000000-0000-0000-0000-0000007a3f4e",
  "delivery_datetime": "2020-01-01T00:00:00.000000Z",
  "due_datetime": "2020-01-01T00:00:01.000000Z",
  "external_notes": null,
  "items": [
    {
      "compliance_quantity": "1.0000",
      "id": "ebc0160c-00d6-44d4-8809-3cf387586113",
      "location_id": "00000000-0000-0000-0000-00000054189c",
      "package_id": "00000000-0000-0000-0000-0000001b17a1",
      "price_base": "10.000000000",
      "quantity": "1.000000000"
    }
  ],
  "location_id": "00000000-0000-0000-0000-00000054189c",
  "metrc_transfer_template_directions": "Go to the store around the corner",
  "metrc_transfer_template_recipient_license_number": "C12-0123458-LIC",
  "metrc_transfer_template_status": "PENDING",
  "metrc_transfer_template_transporter_info": [
    {
      "driver_license_number": "1234567890",
      "driver_name": "John Doe",
      "driver_occupational_license_number": "1234567890",
      "driver_phone_number": "1234567890",
      "transporter_license_number": "C12-0123456-LIC",
      "vehicle_license_plate_number": "1234567890",
      "vehicle_make": "Toyota",
      "vehicle_model": "Prius"
    },
    {
      "driver_license_number": "1234567891",
      "driver_name": "Jane Doe",
      "driver_occupational_license_number": "1234567891",
      "driver_phone_number": "1234567891",
      "transporter_license_number": "C12-0123457-LIC",
      "vehicle_license_plate_number": "1234567891",
      "vehicle_make": "Toyota",
      "vehicle_model": "Corolla"
    }
  ],
  "metrc_transfer_template_type": "Transfer",
  "order_datetime": "2020-01-01T00:00:02.000000Z",
  "owner_id": "00000000-0000-0000-0000-00000114b2cf",
  "shipping_location_id": "00000000-0000-0000-0000-00000054189c",
  "status": "PROCESSING"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 1fdd3458d642fb000000000000000001-8a7bdcb9e77ba669-0
{
  "data": {
    "billing_location": {
      "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
      "company_id": "00000000-0000-0000-0000-000000d03150",
      "id": "00000000-0000-0000-0000-00000054189c",
      "license_id": "00000000-0000-0000-0000-00000035cd98",
      "name": "Place 15034"
    },
    "charges": [],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a3f4e",
      "name": "Company 34808",
      "updated_datetime": "2025-04-18T16:23:15.163322Z"
    },
    "creator": {
      "banned": false,
      "email": "user1@a.com",
      "full_name": "John Foo",
      "id": "00000000-0000-0000-0000-00000114b2cf",
      "role": {
        "id": "00000000-0000-0000-0000-000001130627",
        "name": "Admin 48656"
      }
    },
    "custom_data": [],
    "delivery_datetime": "2020-01-01T00:00:00.000000Z",
    "due_datetime": "2020-01-01T00:00:01.000000Z",
    "external_notes": null,
    "id": "244b8b83-7e62-4c9a-a4fa-cc1d0ea5ee7c",
    "inserted_datetime": "2025-04-18T16:23:15.339594Z",
    "internal_notes": null,
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b198b",
          "name": "B2"
        },
        "compliance_quantity": "1.0000",
        "id": "ebc0160c-00d6-44d4-8809-3cf387586113",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d03150",
          "id": "00000000-0000-0000-0000-00000054189c",
          "license_id": "00000000-0000-0000-0000-00000035cd98",
          "name": "Place 15034"
        },
        "package": {
          "batch_number": "B1",
          "compliance_label": "ABCDEF012345670000080708",
          "id": "00000000-0000-0000-0000-0000001b17a1",
          "metrc_label": "ABCDEF012345670000080708",
          "status": "selling"
        },
        "price": "10.000000000",
        "price_base": "10.000000000",
        "product": {
          "id": "8295db1e-9766-44ad-9043-a105800336fb",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:23:15.201581Z"
        },
        "quantity": "1.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      }
    ],
    "order_datetime": "2020-01-01T00:00:02.000000Z",
    "order_number": "SO-0000001",
    "owner": {
      "banned": false,
      "email": "user1@a.com",
      "full_name": "John Foo",
      "id": "00000000-0000-0000-0000-00000114b2cf",
      "role": {
        "id": "00000000-0000-0000-0000-000001130627",
        "name": "Admin 48656"
      }
    },
    "shipping_location": {
      "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
      "company_id": "00000000-0000-0000-0000-000000d03150",
      "id": "00000000-0000-0000-0000-00000054189c",
      "license_id": "00000000-0000-0000-0000-00000035cd98",
      "name": "Place 15034"
    },
    "status": "PROCESSING",
    "total": "10.00",
    "updated_datetime": "2025-04-18T16:23:15.450910Z"
  }
}

POST /public/v1/orders updates an order

POST /public/v1/orders
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDMwMDYsImlhdCI6MTc0NDk5MzQwNiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMDRkZjE4ZTctYmU1Mi00YjEwLWJhYzUtZDNlMmViMjhlNzkyIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzNDA1LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzY3NDQiLCJ0eXAiOiJhY2Nlc3MifQ.ArJVU6nYF5p91wjGO9gWrVYTdwyOiIbdKDoDs-45yzg
{
  "billing_location_id": "00000000-0000-0000-0000-000000541c87",
  "charges": [
    {
      "id": "bc2e8536-cfbd-40be-a2fc-e5932c6f06c2",
      "name": "C1",
      "percent": "10.0000",
      "type": "CHARGE",
      "unit_type": "PERCENT"
    },
    {
      "id": "268cfe84-3ed5-408d-9ddd-5daa2d48c837",
      "name": "C2",
      "price": "-5.00",
      "type": "DISCOUNT",
      "unit_type": "PRICE"
    }
  ],
  "company_id": "00000000-0000-0000-0000-0000007a45ce",
  "delivery_datetime": "2020-01-01T00:00:00.000000Z",
  "due_datetime": "2020-01-01T00:00:01.000000Z",
  "external_notes": "gonna make you sweat",
  "id": "b18a9084-11af-4f17-b04c-c8841847f878",
  "items": [
    {
      "id": "10ebd497-408e-4da7-9fc0-aa804a937035",
      "location_id": "00000000-0000-0000-0000-000000541c87",
      "price_base": "10.000000000",
      "product_id": "e6643d73-734c-4ca3-8001-2138cc5e8d66",
      "quantity": "2.000000000"
    },
    {
      "id": "7ab52ac2-d06f-4fe2-a8fe-681fb8adb481",
      "location_id": "00000000-0000-0000-0000-000000541c87",
      "price_base": "100.000000000",
      "product_id": "e6643d73-734c-4ca3-8001-2138cc5e8d66",
      "quantity": "3.000000000"
    },
    {
      "compliance_quantity": "1.0000",
      "id": "6b20bae2-4077-4f2c-9817-ed9c2b70f47c",
      "location_id": "00000000-0000-0000-0000-000000541c87",
      "package_id": "00000000-0000-0000-0000-0000001b1897",
      "price_base": "10.000000000",
      "quantity": "1.000000000"
    }
  ],
  "location_id": "00000000-0000-0000-0000-000000541c87",
  "metrc_transfer_template_directions": "Go to the store around the corner",
  "metrc_transfer_template_recipient_license_number": "C12-0123458-LIC",
  "metrc_transfer_template_status": "PENDING",
  "metrc_transfer_template_transporter_info": [
    {
      "driver_license_number": "1234567890",
      "driver_name": "John Doe",
      "driver_occupational_license_number": "1234567890",
      "driver_phone_number": "1234567890",
      "transporter_license_number": "C12-0123456-LIC",
      "vehicle_license_plate_number": "1234567890",
      "vehicle_make": "Toyota",
      "vehicle_model": "Prius"
    },
    {
      "driver_license_number": "1234567891",
      "driver_name": "Jane Doe",
      "driver_occupational_license_number": "1234567891",
      "driver_phone_number": "1234567891",
      "transporter_license_number": "C12-0123457-LIC",
      "vehicle_license_plate_number": "1234567891",
      "vehicle_make": "Toyota",
      "vehicle_model": "Corolla"
    }
  ],
  "metrc_transfer_template_type": "Transfer",
  "order_datetime": "2020-01-01T00:00:02.000000Z",
  "owner_id": "00000000-0000-0000-0000-00000114bedf",
  "shipping_location_id": "00000000-0000-0000-0000-000000541c87",
  "status": "PROCESSING"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: bb50b7d66c9550000000000000000001-634659b27d1206e5-0
{
  "data": {
    "billing_location": {
      "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
      "company_id": "00000000-0000-0000-0000-000000d03bd0",
      "id": "00000000-0000-0000-0000-000000541c87",
      "license_id": "00000000-0000-0000-0000-00000035cf48",
      "name": "Place 16032"
    },
    "charges": [
      {
        "id": "bc2e8536-cfbd-40be-a2fc-e5932c6f06c2",
        "name": "C1",
        "percent": "10.0000",
        "price": "33.00",
        "type": "CHARGE",
        "unit_type": "PERCENT"
      },
      {
        "id": "268cfe84-3ed5-408d-9ddd-5daa2d48c837",
        "name": "C2",
        "percent": null,
        "price": "-5.00",
        "type": "DISCOUNT",
        "unit_type": "PRICE"
      }
    ],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a45ce",
      "name": "Company 37496",
      "updated_datetime": "2025-04-18T16:23:26.423824Z"
    },
    "creator": {
      "banned": false,
      "email": "user1@a.com",
      "full_name": "John Foo",
      "id": "00000000-0000-0000-0000-00000114bea6",
      "role": {
        "id": "00000000-0000-0000-0000-0000011311cb",
        "name": "Admin 51631"
      }
    },
    "custom_data": [],
    "delivery_datetime": "2020-01-01T00:00:00.000000Z",
    "due_datetime": "2020-01-01T00:00:01.000000Z",
    "external_notes": "gonna make you sweat",
    "id": "b18a9084-11af-4f17-b04c-c8841847f878",
    "inserted_datetime": "2025-04-18T16:23:26.498316Z",
    "internal_notes": null,
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1cde",
          "name": "B1"
        },
        "compliance_quantity": null,
        "id": "10ebd497-408e-4da7-9fc0-aa804a937035",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d03bd0",
          "id": "00000000-0000-0000-0000-000000541c87",
          "license_id": "00000000-0000-0000-0000-00000035cf48",
          "name": "Place 16032"
        },
        "package": null,
        "price": "10.000000000",
        "price_base": "10.000000000",
        "product": {
          "id": "e6643d73-734c-4ca3-8001-2138cc5e8d66",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:23:26.463543Z"
        },
        "quantity": "2.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      },
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1cde",
          "name": "B1"
        },
        "compliance_quantity": null,
        "id": "7ab52ac2-d06f-4fe2-a8fe-681fb8adb481",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d03bd0",
          "id": "00000000-0000-0000-0000-000000541c87",
          "license_id": "00000000-0000-0000-0000-00000035cf48",
          "name": "Place 16032"
        },
        "package": null,
        "price": "100.000000000",
        "price_base": "100.000000000",
        "product": {
          "id": "e6643d73-734c-4ca3-8001-2138cc5e8d66",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:23:26.463543Z"
        },
        "quantity": "3.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      },
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1cdf",
          "name": "B2"
        },
        "compliance_quantity": "1.0000",
        "id": "6b20bae2-4077-4f2c-9817-ed9c2b70f47c",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d03bd0",
          "id": "00000000-0000-0000-0000-000000541c87",
          "license_id": "00000000-0000-0000-0000-00000035cf48",
          "name": "Place 16032"
        },
        "package": {
          "batch_number": "B2",
          "compliance_label": "ABCDEF012345670000081293",
          "id": "00000000-0000-0000-0000-0000001b1897",
          "metrc_label": "ABCDEF012345670000081293",
          "status": "selling"
        },
        "price": "10.000000000",
        "price_base": "10.000000000",
        "product": {
          "id": "a158c82a-5926-473a-85c4-62ce96a53224",
          "name": "P2",
          "sku": "SKU2",
          "updated_datetime": "2025-04-18T16:23:26.526589Z"
        },
        "quantity": "1.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      }
    ],
    "order_datetime": "2020-01-01T00:00:02.000000Z",
    "order_number": "SO-2668",
    "owner": {
      "banned": false,
      "email": "owner-52654@example.com",
      "full_name": "FirstName103100 LastName103101",
      "id": "00000000-0000-0000-0000-00000114bedf",
      "role": {
        "id": "00000000-0000-0000-0000-000001131206",
        "name": "Admin 51690"
      }
    },
    "shipping_location": {
      "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
      "company_id": "00000000-0000-0000-0000-000000d03bd0",
      "id": "00000000-0000-0000-0000-000000541c87",
      "license_id": "00000000-0000-0000-0000-00000035cf48",
      "name": "Place 16032"
    },
    "status": "PROCESSING",
    "total": "358.00",
    "updated_datetime": "2025-04-18T16:23:26.800783Z"
  }
}

POST /public/v1/orders does not alter locked price tier items on update

POST /public/v1/orders
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5OTgsImlhdCI6MTc0NDk5MzM5OCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNjMyZDYzZWItNjU5ZC00NDhlLWI3NGQtZTc0NWNlM2U4ZTRjIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzk3LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzQ2NDUiLCJ0eXAiOiJhY2Nlc3MifQ.XLVcOE1tj4R0RUcodADEpHfMV0G1P3s9Wv5IrDzx4m0
{
  "billing_location_id": "00000000-0000-0000-0000-0000005419c7",
  "charges": [],
  "company_id": "00000000-0000-0000-0000-0000007a416d",
  "delivery_datetime": "2020-01-01T00:00:00.000000Z",
  "due_datetime": "2020-01-01T00:00:01.000000Z",
  "items": [
    {
      "location_id": "00000000-0000-0000-0000-0000005419c7",
      "position": 1,
      "price_base": "100.000000000",
      "product_id": "e3658b54-f889-4e13-8ca9-776b99cd1f9c",
      "quantity": "10.000000000"
    },
    {
      "location_id": "00000000-0000-0000-0000-0000005419c7",
      "position": 2,
      "price_base": "200.000000000",
      "product_id": "c628876b-89f1-4eeb-b23a-ccdf48b92bc1",
      "quantity": "10.000000000"
    },
    {
      "location_id": "00000000-0000-0000-0000-0000005419c7",
      "position": 3,
      "price_base": "300.000000000",
      "product_id": "40ac655b-f42d-4972-b420-78b5dd4f4720",
      "quantity": "10.000000000"
    }
  ],
  "order_datetime": "2020-01-01T00:00:02.000000Z",
  "shipping_location_id": "00000000-0000-0000-0000-0000005419c7",
  "status": "PROCESSING"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: d44a733bbb98c8000000000000000001-8b184f95a3f7a364-0
{
  "data": {
    "billing_location": {
      "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
      "company_id": "00000000-0000-0000-0000-000000d034b0",
      "id": "00000000-0000-0000-0000-0000005419c7",
      "license_id": "00000000-0000-0000-0000-00000035ce0b",
      "name": "Place 15330"
    },
    "charges": [],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a416d",
      "name": "Company 35671",
      "updated_datetime": "2025-04-18T16:23:18.547999Z"
    },
    "creator": {
      "banned": false,
      "email": "owner-50515@example.com",
      "full_name": "FirstName98864 LastName98865",
      "id": "00000000-0000-0000-0000-00000114b675",
      "role": {
        "id": "00000000-0000-0000-0000-0000011309cc",
        "name": "Admin 49589"
      }
    },
    "custom_data": [],
    "delivery_datetime": "2020-01-01T00:00:00.000000Z",
    "due_datetime": "2020-01-01T00:00:01.000000Z",
    "external_notes": null,
    "id": "8e5af2c0-5e04-4b2c-9685-dbd123727ff8",
    "inserted_datetime": "2025-04-18T16:23:19.008597Z",
    "internal_notes": null,
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1a9c",
          "name": "B1"
        },
        "compliance_quantity": null,
        "id": "b7e46208-42c5-46ee-9d73-3dc384b9b397",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d034b0",
          "id": "00000000-0000-0000-0000-0000005419c7",
          "license_id": "00000000-0000-0000-0000-00000035ce0b",
          "name": "Place 15330"
        },
        "package": null,
        "price": "90.000000000",
        "price_base": "100.000000000",
        "product": {
          "id": "e3658b54-f889-4e13-8ca9-776b99cd1f9c",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:23:18.594086Z"
        },
        "quantity": "10.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      },
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1aa3",
          "name": "B2"
        },
        "compliance_quantity": null,
        "id": "28d619e4-ffdf-4d51-999c-c2277341fceb",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d034b0",
          "id": "00000000-0000-0000-0000-0000005419c7",
          "license_id": "00000000-0000-0000-0000-00000035ce0b",
          "name": "Place 15330"
        },
        "package": null,
        "price": "200.000000000",
        "price_base": "200.000000000",
        "product": {
          "id": "c628876b-89f1-4eeb-b23a-ccdf48b92bc1",
          "name": "P2",
          "sku": "SKU2",
          "updated_datetime": "2025-04-18T16:23:18.647768Z"
        },
        "quantity": "10.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      },
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1aa5",
          "name": "B3"
        },
        "compliance_quantity": null,
        "id": "8f1da9ab-e848-4a7f-afb5-8b77ad30bcfc",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d034b0",
          "id": "00000000-0000-0000-0000-0000005419c7",
          "license_id": "00000000-0000-0000-0000-00000035ce0b",
          "name": "Place 15330"
        },
        "package": null,
        "price": "290.000000000",
        "price_base": "300.000000000",
        "product": {
          "id": "40ac655b-f42d-4972-b420-78b5dd4f4720",
          "name": "P3",
          "sku": "SKU3",
          "updated_datetime": "2025-04-18T16:23:18.696275Z"
        },
        "quantity": "10.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      }
    ],
    "order_datetime": "2020-01-01T00:00:02.000000Z",
    "order_number": "SO-0000001",
    "owner": null,
    "shipping_location": {
      "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
      "company_id": "00000000-0000-0000-0000-000000d034b0",
      "id": "00000000-0000-0000-0000-0000005419c7",
      "license_id": "00000000-0000-0000-0000-00000035ce0b",
      "name": "Place 15330"
    },
    "status": "PROCESSING",
    "total": "5800.00",
    "updated_datetime": "2025-04-18T16:23:19.053945Z"
  }
}

POST /public/v1/orders deleting order items & charges

POST /public/v1/orders
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDMwMDYsImlhdCI6MTc0NDk5MzQwNiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiN2E1OTI0OGUtYmVmNy00NTdkLWJkZTgtNjQ2ZTMxYjVkZjlmIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzNDA1LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzY5MDUiLCJ0eXAiOiJhY2Nlc3MifQ.jFLSYrq-17sn54nttiX7uXoioageQZPgTw-boZ3TlGI
{
  "billing_location_id": "00000000-0000-0000-0000-000000541cb0",
  "charges": [],
  "company_id": "00000000-0000-0000-0000-0000007a462e",
  "delivery_datetime": "2020-01-01T00:00:00.000000Z",
  "due_datetime": "2020-01-01T00:00:01.000000Z",
  "id": "b72f90b2-d298-423d-870c-eb976b4a02da",
  "items": [
    {
      "id": "8609761d-59ce-4f3b-8d82-4386233d553e",
      "location_id": "00000000-0000-0000-0000-000000541cb0",
      "price_base": "10.000000000",
      "product_id": "75604be0-1f15-46ce-bf44-b40381217a64",
      "quantity": "1.000000000"
    }
  ],
  "order_datetime": "2020-01-01T00:00:02.000000Z",
  "shipping_location_id": "00000000-0000-0000-0000-000000541cb0",
  "status": "PROCESSING"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 8325858739e6d0000000000000000001-60152b9d906c2f05-0
{
  "data": {
    "billing_location": {
      "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
      "company_id": "00000000-0000-0000-0000-000000d03c71",
      "id": "00000000-0000-0000-0000-000000541cb0",
      "license_id": "00000000-0000-0000-0000-00000035cf5a",
      "name": "Place 16073"
    },
    "charges": [],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a462e",
      "name": "Company 37648",
      "updated_datetime": "2025-04-18T16:23:26.971116Z"
    },
    "creator": {
      "banned": false,
      "email": "user1@a.com",
      "full_name": "John Foo",
      "id": "00000000-0000-0000-0000-00000114bf49",
      "role": {
        "id": "00000000-0000-0000-0000-00000113126f",
        "name": "Admin 51793"
      }
    },
    "custom_data": [],
    "delivery_datetime": "2020-01-01T00:00:00.000000Z",
    "due_datetime": "2020-01-01T00:00:01.000000Z",
    "external_notes": null,
    "id": "b72f90b2-d298-423d-870c-eb976b4a02da",
    "inserted_datetime": "2025-04-18T16:23:27.050824Z",
    "internal_notes": null,
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004b1cfb",
          "name": "B1"
        },
        "compliance_quantity": null,
        "id": "8609761d-59ce-4f3b-8d82-4386233d553e",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000d03c71",
          "id": "00000000-0000-0000-0000-000000541cb0",
          "license_id": "00000000-0000-0000-0000-00000035cf5a",
          "name": "Place 16073"
        },
        "package": null,
        "price": "10.000000000",
        "price_base": "10.000000000",
        "product": {
          "id": "75604be0-1f15-46ce-bf44-b40381217a64",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:23:27.019310Z"
        },
        "quantity": "1.000000000",
        "returned_quantity": "0",
        "total_cost_actual": null,
        "total_cost_default": null
      }
    ],
    "order_datetime": "2020-01-01T00:00:02.000000Z",
    "order_number": "SO-2676",
    "owner": null,
    "shipping_location": {
      "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
      "company_id": "00000000-0000-0000-0000-000000d03c71",
      "id": "00000000-0000-0000-0000-000000541cb0",
      "license_id": "00000000-0000-0000-0000-00000035cf5a",
      "name": "Place 16073"
    },
    "status": "PROCESSING",
    "total": "10.00",
    "updated_datetime": "2025-04-18T16:23:27.161715Z"
  }
}

Upsert a single order. To update an existing order, pass in an existing order ID in the id field. When updating an order, you must pass in all fields (no sparse update currently supported). Any existing order item or charge you do not pass in to items and charges respectively will be deleted

Request

POST /public/v1/orders

Parameters

Parameter Description In Type Required Default Example
blaze_payment_type The payment type for an order shipping to a Blaze-associated company. Required when the company being used is mapped to a Blaze retailer via the Distru integration. query string false CASH
company_id Company ID query string false
delivery_datetime The datetime on which the order was / will be delivered query string false
due_datetime The datetime by which the order should be completed for the customer query string false
external_notes This is a message that will be shown to the customer on order slips. This is the "Message to Customer" field in the Distru order form. query string false
id Unique ID for this order. If it exists, an update will be performed; otherwise, it will be used as the ID of a new order record query string false
order_datetime The datetime on which the order was placed query string false
charges The additional lines of Charge, Discount, or Tax added to this order body OrderChargesRequest false
items The order items present on this order body OrderItemsRequest false
internal_notes Internal notes for this order query string false
metrc_transfer_template_transporter_info The Metrc transfer template transporter(s) information about this order body OrderTransferTemplateTransporterInfosRequest false
metrc_transfer_template_directions The Metrc transfer template directions query string false
metrc_transfer_template_recipient_license_number The Metrc transfer template recipient license number query string false
metrc_transfer_template_status The Metrc transfer template status query string false
metrc_transfer_template_type The Metrc transfer template type query string false
billing_location_id The billing location's ID query string false
shipping_location_id The shipping location's ID query string false
owner_id The ID of the Distru user that owns this order query string false
status Filter orders by their status. Accepted values are "PENDING", "PROCESSING", "READY_TO_SHIP", "DELIVERING", "DELIVERED", "COMPLETED" and "CANCELED". query string false PENDING

Responses

Status Description Schema
200 A single order Order

Package

Get packages

GET /public/v1/packages returns packages related to the company

GET /public/v1/packages
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5NDUsImlhdCI6MTc0NDk5MzM0NSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiODA1NTY2ODQtMDc3Ni00YTYzLWI5YjgtM2VjMTA3YTUzNjkxIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzQ0LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMjI2ODEiLCJ0eXAiOiJhY2Nlc3MifQ.ohUFOmOQyC1GH9Rnmgl-bSmfSbFWAQW7zogWBVqCB4k

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 60f09df485fa3c000000000000000001-0f4c33f27436d6c1-0
{
  "data": [
    {
      "batch_number": null,
      "compliance_label": "ABCDEF012345670000077853",
      "custom_data": [
        {
          "id": 64445,
          "name": "Custom Field 139",
          "value": "Custom Field Value 1"
        }
      ],
      "expiration_date": "2024-01-01T00:00:00.000000Z",
      "id": "00000000-0000-0000-0000-0000001b1356",
      "is_trade_sample": true,
      "license": {
        "id": "00000000-0000-0000-0000-00000035c5dd",
        "license_number": "CDPH-00008524"
      },
      "location": {
        "id": "00000000-0000-0000-0000-000000540bbb",
        "name": "Place 11757"
      },
      "metrc_label": "ABCDEF012345670000077853",
      "primary_test_result": null,
      "product_id": "646351b0-cf00-4e87-bc72-9a159b02fc52",
      "product_unit_quantity": "7.500000000",
      "product_unit_type": {
        "id": "00000000-0000-0000-0000-00000b7af57d",
        "name": "3"
      },
      "quantity": "5.000000000",
      "quantity_assembling": "0.000000000",
      "quantity_available": "5.000000000",
      "status": "active",
      "unit_type": {
        "id": "00000000-0000-0000-0000-00000b7af57e",
        "name": "2"
      }
    },
    {
      "batch_number": null,
      "compliance_label": "ABCDEF012345670000077858",
      "custom_data": [
        {
          "id": 64445,
          "name": "Custom Field 139",
          "value": null
        }
      ],
      "expiration_date": null,
      "id": "00000000-0000-0000-0000-0000001b135a",
      "is_trade_sample": false,
      "license": {
        "id": "00000000-0000-0000-0000-00000035c5dd",
        "license_number": "CDPH-00008524"
      },
      "location": {
        "id": "00000000-0000-0000-0000-000000540bbd",
        "name": "Place 11759"
      },
      "metrc_label": "ABCDEF012345670000077858",
      "primary_test_result": {
        "cbd_mg_per_unit": "1",
        "cbd_mg_per_unit_total": "2",
        "cbd_percentage": "3",
        "cbd_percentage_total": "4",
        "mg_per_unit_type": "mg/mL",
        "name": "File.pdf",
        "thc_mg_per_unit": "5",
        "thc_mg_per_unit_total": "6",
        "thc_percentage": "7",
        "thc_percentage_total": "8"
      },
      "product_id": "646351b0-cf00-4e87-bc72-9a159b02fc52",
      "product_unit_quantity": "15.000000000",
      "product_unit_type": {
        "id": "00000000-0000-0000-0000-00000b7af57d",
        "name": "3"
      },
      "quantity": "20.000000000",
      "quantity_assembling": "0.000000000",
      "quantity_available": "20.000000000",
      "status": "active",
      "unit_type": {
        "id": "00000000-0000-0000-0000-00000b7af57f",
        "name": "4"
      }
    }
  ]
}

Get packages sorted by their creation date and filtered by various attributes

Note: The page size for this endpoint is 5000 packages per page. This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses.

Request

GET /public/v1/packages

Parameters

Parameter Description In Type Required Default Example
inserted_datetime Filter packages by their creation datetime query string false 2022-07-10T00:00:00Z,
page Pagination information body Page false
location_ids A list of location UUIDs to filter packages by.
query array false ["123e4567-e89b-12d3-a456-426655440000","456e89b1-2d3a-4564-2665-544000000000"]
license_number Filter packages by license number query string false 1234567890
statuses Filter packages by their status query array false ["active","selling","sold"]
updated_datetime Filter packages by the datetime they were most recently modified query string false ,2022-07-10T00:00:00Z

Responses

Status Description Schema
200 A list of packages Packages

PaymentMethod

Get payment methods

GET /public/v1/payments/methods returns payment methods related to the user's company only

GET /public/v1/payment-methods
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5OTUsImlhdCI6MTc0NDk5MzM5NSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNGQ5MmNkZjEtMjZiMi00ZjNiLTlkNzItNzYyZjY0NTg2MGQ0IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzk0LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzM5MDEiLCJ0eXAiOiJhY2Nlc3MifQ.DX68H5ATYrPgEv40D03SJwBfL2sQjIGJdmA7vhNsAA4

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: bd29a7243b7518000000000000000001-3e99407abc2ecc0c-0
{
  "data": [
    {
      "id": "00000000-0000-0000-0000-0000000175a1",
      "name": "Payment Method 257"
    }
  ]
}

Get payment methods. Note: This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses.

Request

GET /public/v1/payment/methods

Responses

Status Description Schema
200 A list of payment methods PaymentMethods

Product

Get products

GET /public/products returns products related to the company

GET /public/v1/products
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4MjQsImlhdCI6MTc0NDk5MzIyNCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYzA1NGMzNmEtMzBlYi00ZDgyLWExYmUtOTU4YWFhZDllMmNhIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjIzLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDI3OTQiLCJ0eXAiOiJhY2Nlc3MifQ.ynOTVfM-7EzVatEqAI7LjFU6ad3oMW2yuz1I6Mh8x8w

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 01cbfb42d237aa500000000000000001-df193b39c3380fe8-0
{
  "data": [
    {
      "brand": {
        "id": "00000000-0000-0000-0000-0000007a0c7b",
        "name": "Company 12829",
        "updated_datetime": "2030-11-01T00:00:00.000000Z"
      },
      "category": {
        "id": "00000000-0000-0000-0000-0000006507a6",
        "name": "Some category 4684",
        "type": "OTHER"
      },
      "custom_data": [
        {
          "id": 64406,
          "name": "Custom Field 69",
          "value": "Custom Field Value 1"
        }
      ],
      "description": "test",
      "id": "8ca4aa5e-2dfc-4a5f-b414-1a734b294b8e",
      "images": [
        {
          "id": "00000000-0000-0000-0000-0000000095ba",
          "name": "Image Name 198",
          "rank": 0,
          "url": "https://google.com/original-18.jpg"
        },
        {
          "id": "00000000-0000-0000-0000-0000000095bb",
          "name": "Image Name 199",
          "rank": 1,
          "url": "https://google.com/original-19.jpg"
        }
      ],
      "is_active": true,
      "msrp": null,
      "name": "Product 13040",
      "sku": "sku 13041",
      "strain": {
        "id": "00000000-0000-0000-0000-000000024f4b",
        "name": "Strain 152"
      },
      "subcategory": {
        "id": "00000000-0000-0000-0000-00000065956d",
        "name": "Some subcategory 4497"
      },
      "unit_price": "1",
      "unit_type": {
        "id": "00000000-0000-0000-0000-00000b77faf4",
        "name": "Gram"
      },
      "units_per_case": null,
      "updated_datetime": "2023-11-01T00:00:00.000000Z",
      "vendor": {
        "id": "00000000-0000-0000-0000-0000007a0c7e",
        "name": "Company 12833",
        "updated_datetime": "2030-11-03T00:00:00.000000Z"
      }
    },
    {
      "brand": {
        "id": "00000000-0000-0000-0000-0000007a0c7c",
        "name": "Company 12831",
        "updated_datetime": "2030-11-02T00:00:00.000000Z"
      },
      "category": {
        "id": "00000000-0000-0000-0000-0000006507a9",
        "name": "Some category 4687",
        "type": "OTHER"
      },
      "custom_data": [
        {
          "id": 64406,
          "name": "Custom Field 69",
          "value": null
        }
      ],
      "description": null,
      "id": "9670bb89-9823-4dd2-be6f-39632aa1fb12",
      "images": [],
      "is_active": false,
      "msrp": "100",
      "name": "Product 13048",
      "sku": "sku 13049",
      "strain": null,
      "subcategory": {
        "id": "00000000-0000-0000-0000-000000659570",
        "name": "Some subcategory 4500"
      },
      "unit_price": "1",
      "unit_type": {
        "id": "00000000-0000-0000-0000-00000b77faf2",
        "name": "Pound"
      },
      "units_per_case": null,
      "updated_datetime": "2023-11-02T00:00:00.000000Z",
      "vendor": {
        "id": "00000000-0000-0000-0000-0000007a0c80",
        "name": "Company 12835",
        "updated_datetime": "2030-11-04T00:00:00.000000Z"
      }
    }
  ]
}

Get products sorted by their creation date and filtered by various attributes.

Note: The page size for this endpoint is 5000 products per page. This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses.

Request

GET /public/v1/products

Parameters

Parameter Description In Type Required Default Example
inserted_datetime Filter products by their creation datetime query string false 2022-07-10T00:00:00Z,
page Pagination information body Page false
updated_datetime Filter products by the datetime they were most recently modified query string false ,2022-07-10T00:00:00Z

Responses

Status Description Schema
200 A list of products Products

Upsert a product

POST /public/v1/orders Creates a product with all optional fields set

POST /public/v1/products
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4MjcsImlhdCI6MTc0NDk5MzIyNywiaXNzIjoiRGlzdHJ1IiwianRpIjoiNTZmODQyODgtNWUwMy00NjM3LTljNGQtMjg3NDYyNzEzODQ4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjI2LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDMyMDgiLCJ0eXAiOiJhY2Nlc3MifQ.-RVnyxj-S0Z_YBZmVcPz4n-QEyJIcpU5e3x95iq4rnw
{
  "brand_id": "00000000-0000-0000-0000-0000007a0d0d",
  "category_id": "00000000-0000-0000-0000-00000065089b",
  "description": "My Product Description",
  "group_id": "00000000-0000-0000-0000-00000052b06b",
  "id": "6a332788-15e2-4133-b462-b327f4999d4d",
  "inventory_tracking_method": "PACKAGE",
  "is_featured": true,
  "is_inactive": true,
  "menu_visibility": "INCLUDE_IN_ALL",
  "menus": ["00000000-0000-0000-0000-000000036747"],
  "msrp": "100.5",
  "name": "My Product",
  "owner_id": "00000000-0000-0000-0000-000001143ba6",
  "quantity_available_threshold_max": "10.5",
  "quantity_available_threshold_min": "5.5",
  "sku": "12345",
  "strain_id": "00000000-0000-0000-0000-000000024f4d",
  "subcategory_id": "00000000-0000-0000-0000-0000006596a8",
  "tags": ["00000000-0000-0000-0000-000000009e69"],
  "total_cannabinoid_unit": "PERCENT",
  "total_cbd": "5.2",
  "total_thc": "10.4",
  "unit_cost": "50.4",
  "unit_net_weight": "3.1",
  "unit_net_weight_and_serving_size_unit_type_id": "00000000-0000-0000-0000-00000b7809eb",
  "unit_price": "100",
  "unit_serving_size": "2.2",
  "unit_type_id": "00000000-0000-0000-0000-00000b7809f2",
  "units_per_case": "0.2",
  "upc": "036000291452",
  "vendor_id": "00000000-0000-0000-0000-0000007a0d0a",
  "wholesale_unit_price": "90.50"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 426172e886ee88000000000000000001-000701af5b980444-0
{
  "data": {
    "brand": {
      "id": "00000000-0000-0000-0000-0000007a0d0d",
      "name": "Company 13088",
      "updated_datetime": "2025-04-18T16:20:28.109997Z"
    },
    "category": {
      "id": "00000000-0000-0000-0000-00000065089b",
      "name": "Some category 4773",
      "type": "OTHER"
    },
    "custom_data": [
      {
        "id": 64408,
        "name": "Custom Field 71",
        "value": null
      }
    ],
    "description": "My Product Description",
    "id": "6a332788-15e2-4133-b462-b327f4999d4d",
    "images": [],
    "is_active": false,
    "msrp": "100.5",
    "name": "My Product",
    "sku": "12345",
    "strain": {
      "id": "00000000-0000-0000-0000-000000024f4d",
      "name": "Strain 154"
    },
    "subcategory": {
      "id": "00000000-0000-0000-0000-0000006596a8",
      "name": "Some subcategory 4584"
    },
    "unit_price": "100",
    "unit_type": {
      "id": "00000000-0000-0000-0000-00000b7809f2",
      "name": "Unit"
    },
    "units_per_case": "0.2",
    "updated_datetime": "2025-04-18T16:20:28.406968Z",
    "vendor": {
      "id": "00000000-0000-0000-0000-0000007a0d0a",
      "name": "Company 13083",
      "updated_datetime": "2025-04-18T16:20:28.059919Z"
    }
  }
}

POST /public/v1/orders Updates a product with all optional fields set

POST /public/v1/products
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4MjIsImlhdCI6MTc0NDk5MzIyMiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNjExM2NmMjItODcyYy00YmUwLTgxMTMtYjU2MjQ0MmZjNWM3IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjIxLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDI1MTQiLCJ0eXAiOiJhY2Nlc3MifQ.CWQH1_RB6Yi_-YJ7aO06YumeYmcmSX0WaLT83bCH6Gc
{
  "category_id": "00000000-0000-0000-0000-000000650767",
  "id": "e6828602-0b9f-44bb-bdb9-708a53aacce5",
  "inventory_tracking_method": "PACKAGE",
  "name": "My Product",
  "sku": "12345",
  "unit_price": "100",
  "unit_type_id": "00000000-0000-0000-0000-00000b77f0e0",
  "upc": "036000291452",
  "vendor_id": "00000000-0000-0000-0000-0000007a0c1d"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: f1c65cece8ca48000000000000000001-06246d5af0ffc918-0
{
  "data": {
    "brand": null,
    "category": {
      "id": "00000000-0000-0000-0000-000000650767",
      "name": "Some category 4621",
      "type": "OTHER"
    },
    "custom_data": [],
    "description": null,
    "id": "e6828602-0b9f-44bb-bdb9-708a53aacce5",
    "images": [],
    "is_active": true,
    "msrp": null,
    "name": "My Product",
    "sku": "12345",
    "strain": null,
    "subcategory": null,
    "unit_price": "100",
    "unit_type": {
      "id": "00000000-0000-0000-0000-00000b77f0e0",
      "name": "Gram"
    },
    "units_per_case": null,
    "updated_datetime": "2025-04-18T16:20:22.578495Z",
    "vendor": {
      "id": "00000000-0000-0000-0000-0000007a0c1d",
      "name": "Company 12653",
      "updated_datetime": "2025-04-18T16:20:22.421076Z"
    }
  }
}

POST /public/v1/orders Updates a product with all optional fields set

POST /public/v1/products
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4MjIsImlhdCI6MTc0NDk5MzIyMiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNjExM2NmMjItODcyYy00YmUwLTgxMTMtYjU2MjQ0MmZjNWM3IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjIxLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDI1MTQiLCJ0eXAiOiJhY2Nlc3MifQ.CWQH1_RB6Yi_-YJ7aO06YumeYmcmSX0WaLT83bCH6Gc
{
  "brand_id": "00000000-0000-0000-0000-0000007a0c3c",
  "category_id": "00000000-0000-0000-0000-00000065077a",
  "description": "My Product Description",
  "group_id": "00000000-0000-0000-0000-00000052afdc",
  "id": "e6828602-0b9f-44bb-bdb9-708a53aacce5",
  "inventory_tracking_method": "PACKAGE",
  "is_featured": true,
  "is_inactive": true,
  "menu_visibility": "INCLUDE_IN_ALL",
  "menus": ["00000000-0000-0000-0000-00000003673d"],
  "msrp": "100.5",
  "name": "Updated Name",
  "owner_id": "00000000-0000-0000-0000-000001143965",
  "quantity_available_threshold_max": "10.5",
  "quantity_available_threshold_min": "5.5",
  "sku": "45678",
  "strain_id": "00000000-0000-0000-0000-000000024f4a",
  "subcategory_id": "00000000-0000-0000-0000-000000659541",
  "tags": ["00000000-0000-0000-0000-000000009e68"],
  "total_cannabinoid_unit": "PERCENT",
  "total_cbd": "5.2",
  "total_thc": "10.4",
  "unit_cost": "50.4",
  "unit_net_weight": "3.1",
  "unit_net_weight_and_serving_size_unit_type_id": "00000000-0000-0000-0000-00000b77f0e2",
  "unit_price": "200",
  "unit_serving_size": "2.2",
  "unit_type_id": "00000000-0000-0000-0000-00000b77f0e9",
  "units_per_case": "0.2",
  "upc": "036000291453",
  "vendor_id": "00000000-0000-0000-0000-0000007a0c38",
  "wholesale_unit_price": "90.50"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: f1c65cece8ca48000000000000000001-d9c265d7021a3ce4-0
{
  "data": {
    "brand": {
      "id": "00000000-0000-0000-0000-0000007a0c3c",
      "name": "Company 12711",
      "updated_datetime": "2025-04-18T16:20:22.748188Z"
    },
    "category": {
      "id": "00000000-0000-0000-0000-00000065077a",
      "name": "Some category 4640",
      "type": "OTHER"
    },
    "custom_data": [],
    "description": "My Product Description",
    "id": "e6828602-0b9f-44bb-bdb9-708a53aacce5",
    "images": [],
    "is_active": false,
    "msrp": "100.5",
    "name": "Updated Name",
    "sku": "45678",
    "strain": {
      "id": "00000000-0000-0000-0000-000000024f4a",
      "name": "Strain 151"
    },
    "subcategory": {
      "id": "00000000-0000-0000-0000-000000659541",
      "name": "Some subcategory 4453"
    },
    "unit_price": "200",
    "unit_type": {
      "id": "00000000-0000-0000-0000-00000b77f0e9",
      "name": "Unit"
    },
    "units_per_case": "0.2",
    "updated_datetime": "2025-04-18T16:20:22.858487Z",
    "vendor": {
      "id": "00000000-0000-0000-0000-0000007a0c38",
      "name": "Company 12702",
      "updated_datetime": "2025-04-18T16:20:22.690808Z"
    }
  }
}

POST /public/v1/orders Menus act as expected

POST /public/v1/products
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4MjYsImlhdCI6MTc0NDk5MzIyNiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMmMxZTQ0MTMtM2I4MS00OTdkLWI4YTctNGNmYmEyODNhNzQ4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjI1LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDMwNDciLCJ0eXAiOiJhY2Nlc3MifQ.xniToBunaKXmJ48FpI4U_mWLQtvsIeKIuu9Rz0QoYsw
{
  "category_id": "00000000-0000-0000-0000-000000650843",
  "id": "d33eda1d-9077-4b94-89c2-7a287d5fea89",
  "inventory_tracking_method": "PACKAGE",
  "menu_visibility": "INCLUDE_IN_ALL",
  "menus": ["00000000-0000-0000-0000-000000036744"],
  "name": "My Product",
  "sku": "12345",
  "unit_price": "100",
  "unit_type_id": "00000000-0000-0000-0000-00000b780479",
  "upc": "036000291452",
  "vendor_id": "00000000-0000-0000-0000-0000007a0cd9"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 06a9d27d7ad754c00000000000000001-7713c142777684c3-0
{
  "data": {
    "brand": null,
    "category": {
      "id": "00000000-0000-0000-0000-000000650843",
      "name": "Some category 4737",
      "type": "OTHER"
    },
    "custom_data": [],
    "description": null,
    "id": "d33eda1d-9077-4b94-89c2-7a287d5fea89",
    "images": [],
    "is_active": true,
    "msrp": null,
    "name": "My Product",
    "sku": "12345",
    "strain": null,
    "subcategory": null,
    "unit_price": "100",
    "unit_type": {
      "id": "00000000-0000-0000-0000-00000b780479",
      "name": "Gram"
    },
    "units_per_case": null,
    "updated_datetime": "2025-04-18T16:20:26.370900Z",
    "vendor": {
      "id": "00000000-0000-0000-0000-0000007a0cd9",
      "name": "Company 12991",
      "updated_datetime": "2025-04-18T16:20:26.185870Z"
    }
  }
}

POST /public/v1/orders Menus act as expected

POST /public/v1/products
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4MjYsImlhdCI6MTc0NDk5MzIyNiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMmMxZTQ0MTMtM2I4MS00OTdkLWI4YTctNGNmYmEyODNhNzQ4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjI1LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDMwNDciLCJ0eXAiOiJhY2Nlc3MifQ.xniToBunaKXmJ48FpI4U_mWLQtvsIeKIuu9Rz0QoYsw
{
  "category_id": "00000000-0000-0000-0000-000000650843",
  "id": "d33eda1d-9077-4b94-89c2-7a287d5fea89",
  "inventory_tracking_method": "PACKAGE",
  "menu_visibility": "DO_NOT_INCLUDE",
  "menus": [
    "00000000-0000-0000-0000-000000036744",
    "00000000-0000-0000-0000-000000036745"
  ],
  "name": "My Product",
  "sku": "12345",
  "tags": [],
  "unit_price": "100",
  "unit_type_id": "00000000-0000-0000-0000-00000b780479",
  "upc": "036000291452",
  "vendor_id": "00000000-0000-0000-0000-0000007a0cd9"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 06a9d27d7ad754c00000000000000001-5563731d2e6e4b32-0
{
  "data": {
    "brand": null,
    "category": {
      "id": "00000000-0000-0000-0000-000000650843",
      "name": "Some category 4737",
      "type": "OTHER"
    },
    "custom_data": [],
    "description": null,
    "id": "d33eda1d-9077-4b94-89c2-7a287d5fea89",
    "images": [],
    "is_active": true,
    "msrp": null,
    "name": "My Product",
    "sku": "12345",
    "strain": null,
    "subcategory": null,
    "unit_price": "100",
    "unit_type": {
      "id": "00000000-0000-0000-0000-00000b780479",
      "name": "Gram"
    },
    "units_per_case": null,
    "updated_datetime": "2025-04-18T16:20:26.570777Z",
    "vendor": {
      "id": "00000000-0000-0000-0000-0000007a0cd9",
      "name": "Company 12991",
      "updated_datetime": "2025-04-18T16:20:26.185870Z"
    }
  }
}

POST /public/v1/orders Menus act as expected

POST /public/v1/products
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4MjYsImlhdCI6MTc0NDk5MzIyNiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMmMxZTQ0MTMtM2I4MS00OTdkLWI4YTctNGNmYmEyODNhNzQ4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjI1LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDMwNDciLCJ0eXAiOiJhY2Nlc3MifQ.xniToBunaKXmJ48FpI4U_mWLQtvsIeKIuu9Rz0QoYsw
{
  "category_id": "00000000-0000-0000-0000-000000650843",
  "id": "d33eda1d-9077-4b94-89c2-7a287d5fea89",
  "inventory_tracking_method": "PACKAGE",
  "menu_visibility": "INCLUDE_IN_SELECT",
  "menus": [
    "00000000-0000-0000-0000-000000036744",
    "00000000-0000-0000-0000-000000036745"
  ],
  "name": "My Product",
  "sku": "12345",
  "tags": [],
  "unit_price": "100",
  "unit_type_id": "00000000-0000-0000-0000-00000b780479",
  "upc": "036000291452",
  "vendor_id": "00000000-0000-0000-0000-0000007a0cd9"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 06a9d27d7ad754c00000000000000001-6dc5910f22cbda35-0
{
  "data": {
    "brand": null,
    "category": {
      "id": "00000000-0000-0000-0000-000000650843",
      "name": "Some category 4737",
      "type": "OTHER"
    },
    "custom_data": [],
    "description": null,
    "id": "d33eda1d-9077-4b94-89c2-7a287d5fea89",
    "images": [],
    "is_active": true,
    "msrp": null,
    "name": "My Product",
    "sku": "12345",
    "strain": null,
    "subcategory": null,
    "unit_price": "100",
    "unit_type": {
      "id": "00000000-0000-0000-0000-00000b780479",
      "name": "Gram"
    },
    "units_per_case": null,
    "updated_datetime": "2025-04-18T16:20:26.734198Z",
    "vendor": {
      "id": "00000000-0000-0000-0000-0000007a0cd9",
      "name": "Company 12991",
      "updated_datetime": "2025-04-18T16:20:26.185870Z"
    }
  }
}

POST /public/v1/orders Menus act as expected

POST /public/v1/products
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4MjYsImlhdCI6MTc0NDk5MzIyNiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMmMxZTQ0MTMtM2I4MS00OTdkLWI4YTctNGNmYmEyODNhNzQ4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjI1LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDMwNDciLCJ0eXAiOiJhY2Nlc3MifQ.xniToBunaKXmJ48FpI4U_mWLQtvsIeKIuu9Rz0QoYsw
{
  "category_id": "00000000-0000-0000-0000-000000650843",
  "id": "d33eda1d-9077-4b94-89c2-7a287d5fea89",
  "inventory_tracking_method": "PACKAGE",
  "menu_visibility": "INCLUDE_IN_SELECT",
  "menus": ["00000000-0000-0000-0000-000000036745"],
  "name": "My Product",
  "sku": "12345",
  "unit_price": "100",
  "unit_type_id": "00000000-0000-0000-0000-00000b780479",
  "upc": "036000291452",
  "vendor_id": "00000000-0000-0000-0000-0000007a0cd9"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 06a9d27d7ad754c00000000000000001-ffbc6c18efcd4c9f-0
{
  "data": {
    "brand": null,
    "category": {
      "id": "00000000-0000-0000-0000-000000650843",
      "name": "Some category 4737",
      "type": "OTHER"
    },
    "custom_data": [],
    "description": null,
    "id": "d33eda1d-9077-4b94-89c2-7a287d5fea89",
    "images": [],
    "is_active": true,
    "msrp": null,
    "name": "My Product",
    "sku": "12345",
    "strain": null,
    "subcategory": null,
    "unit_price": "100",
    "unit_type": {
      "id": "00000000-0000-0000-0000-00000b780479",
      "name": "Gram"
    },
    "units_per_case": null,
    "updated_datetime": "2025-04-18T16:20:26.889927Z",
    "vendor": {
      "id": "00000000-0000-0000-0000-0000007a0cd9",
      "name": "Company 12991",
      "updated_datetime": "2025-04-18T16:20:26.185870Z"
    }
  }
}

POST /public/v1/orders Menus act as expected

POST /public/v1/products
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4MjYsImlhdCI6MTc0NDk5MzIyNiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMmMxZTQ0MTMtM2I4MS00OTdkLWI4YTctNGNmYmEyODNhNzQ4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjI1LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDMwNDciLCJ0eXAiOiJhY2Nlc3MifQ.xniToBunaKXmJ48FpI4U_mWLQtvsIeKIuu9Rz0QoYsw
{
  "category_id": "00000000-0000-0000-0000-000000650843",
  "id": "d33eda1d-9077-4b94-89c2-7a287d5fea89",
  "inventory_tracking_method": "PACKAGE",
  "menu_visibility": "INCLUDE_IN_SELECT",
  "menus": [],
  "name": "My Product",
  "sku": "12345",
  "unit_price": "100",
  "unit_type_id": "00000000-0000-0000-0000-00000b780479",
  "upc": "036000291452",
  "vendor_id": "00000000-0000-0000-0000-0000007a0cd9"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 06a9d27d7ad754c00000000000000001-c5963f0f3d6dcf3d-0
{
  "data": {
    "brand": null,
    "category": {
      "id": "00000000-0000-0000-0000-000000650843",
      "name": "Some category 4737",
      "type": "OTHER"
    },
    "custom_data": [],
    "description": null,
    "id": "d33eda1d-9077-4b94-89c2-7a287d5fea89",
    "images": [],
    "is_active": true,
    "msrp": null,
    "name": "My Product",
    "sku": "12345",
    "strain": null,
    "subcategory": null,
    "unit_price": "100",
    "unit_type": {
      "id": "00000000-0000-0000-0000-00000b780479",
      "name": "Gram"
    },
    "units_per_case": null,
    "updated_datetime": "2025-04-18T16:20:27.743614Z",
    "vendor": {
      "id": "00000000-0000-0000-0000-0000007a0cd9",
      "name": "Company 12991",
      "updated_datetime": "2025-04-18T16:20:26.185870Z"
    }
  }
}

POST /public/v1/orders Error pointers are properly transformed to reflect the field name that our api users expect

POST /public/v1/products
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4MjEsImlhdCI6MTc0NDk5MzIyMSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiODg0ZTViYjUtZGVkZC00NTQ3LTgwYjktMjI0OTg5MDMxMDM2IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjIwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDIzOTQiLCJ0eXAiOiJhY2Nlc3MifQ.9-haSNIoeYq9Rj2PFFAQTXfeEVKp6tUFIv4lvBul6o4
{
  "id": "a7cb2057-5837-4202-9d8f-3a8429bb514e",
  "menu_visibility": "INCLUDE_IN_ALL",
  "quantity_available_threshold_max": "-4.5",
  "quantity_available_threshold_min": "-5.5",
  "unit_net_weight": "3.1",
  "unit_serving_size": "5.2"
}

Response

400
cache-control: max-age=0, private, must-revalidate
content-type: application/json; charset=utf-8
b3: 99c7318d7328c0000000000000000001-fbbd58ec6baf27d4-0
{
  "errors": [
    {
      "context": {
        "id": "a7cb2057-5837-4202-9d8f-3a8429bb514e"
      },
      "message": "A unit type needs to be selected when setting Unit Net Weight/Volume or Unit Serving Size",
      "pointer": ["unit_net_weight_and_serving_size_unit_type_id"],
      "section": "body"
    },
    {
      "context": {
        "id": "a7cb2057-5837-4202-9d8f-3a8429bb514e"
      },
      "message": "Unit Serving Size can't be greater than Unit Net Weight/Volume",
      "pointer": ["unit_serving_size"],
      "section": "body"
    },
    {
      "context": {
        "id": "a7cb2057-5837-4202-9d8f-3a8429bb514e"
      },
      "message": "Cannot be negative",
      "pointer": ["quantity_available_threshold_max"],
      "section": "body"
    },
    {
      "context": {
        "id": "a7cb2057-5837-4202-9d8f-3a8429bb514e"
      },
      "message": "Cannot be negative",
      "pointer": ["quantity_available_threshold_min"],
      "section": "body"
    }
  ]
}

POST /public/v1/orders Errors when threshold max is less than threshold min

POST /public/v1/products
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4MjYsImlhdCI6MTc0NDk5MzIyNiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYWFiZjFhNmYtM2E2ZS00YzJjLTgxMmItY2ViZWM2ZDk3ZmNiIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjI1LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDMwMTkiLCJ0eXAiOiJhY2Nlc3MifQ.K-1nsfFOtH1dJjzgcVyBFwqhMlpI7lOcahBHAE-KJa4
{
  "id": "62419d40-cba9-4939-b102-0aa0a1d954da",
  "quantity_available_threshold_max": "4.5",
  "quantity_available_threshold_min": "5.5"
}

Response

400
cache-control: max-age=0, private, must-revalidate
content-type: application/json; charset=utf-8
b3: 205d8a467faa14000000000000000001-5ae142433bc0a3c4-0
{
  "errors": [
    {
      "context": {
        "id": "62419d40-cba9-4939-b102-0aa0a1d954da"
      },
      "message": "Must be greater than threshold min",
      "pointer": ["quantity_available_threshold_max"],
      "section": "body"
    },
    {
      "context": {
        "id": "62419d40-cba9-4939-b102-0aa0a1d954da"
      },
      "message": "Must be less than threshold max",
      "pointer": ["quantity_available_threshold_min"],
      "section": "body"
    }
  ]
}

POST /public/v1/orders Cannot use associations from another company

POST /public/v1/products
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4MjksImlhdCI6MTc0NDk5MzIyOSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiZWQyYWI3ZWMtNTlmZi00ZmJlLTkxMmEtNDkzNWMyMTYwNzMwIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjI4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDMzNjQiLCJ0eXAiOiJhY2Nlc3MifQ.P4tGv3pXAdQoSt2vSpScys0l45Dun6briJvAVw3Cxyw
{
  "brand_id": "00000000-0000-0000-0000-0000007a0d5b",
  "category_id": "00000000-0000-0000-0000-000000650908",
  "cbd": "5.2",
  "description": "My Product Description",
  "group_id": "00000000-0000-0000-0000-00000052b0a6",
  "id": "4a183e5a-fe0f-4cfe-b3a0-36df15cd0c16",
  "inventory_tracking_method": "PACKAGE",
  "is_featured": true,
  "is_inactive": true,
  "menu_visibility": "INCLUDE_IN_ALL",
  "menus": [
    "00000000-0000-0000-0000-000000036748",
    "00000000-0000-0000-0000-000000036749",
    "00000000-0000-0000-0000-00000003674a"
  ],
  "msrp": "100.5",
  "name": "My Product",
  "owner_id": "00000000-0000-0000-0000-000001143c4b",
  "quantity_available_threshold_max": "10.5",
  "quantity_available_threshold_min": "5.5555",
  "sku": "12345",
  "strain_id": "00000000-0000-0000-0000-000000024f4e",
  "subcategory_id": "00000000-0000-0000-0000-00000065972b",
  "tags": [
    "00000000-0000-0000-0000-000000009e6a",
    "00000000-0000-0000-0000-000000009e6b",
    "00000000-0000-0000-0000-000000009e6c"
  ],
  "thc": "10.4",
  "unit_cost": "50.4",
  "unit_net_weight": "3.1",
  "unit_net_weight_and_serving_size_unit_type_id": "00000000-0000-0000-0000-00000b78104b",
  "unit_price": "100",
  "unit_serving_size": "2.2",
  "unit_type_id": "00000000-0000-0000-0000-00000b781052",
  "units_per_case": "0.2",
  "upc": "036000291452",
  "vendor_id": "00000000-0000-0000-0000-0000007a0d59",
  "wholesale_unit_price": "90.50"
}

Response

400
cache-control: max-age=0, private, must-revalidate
content-type: application/json; charset=utf-8
b3: 3e080257b340a6000000000000000001-e74dc4df69492068-0
{
  "errors": [
    {
      "context": {
        "id": "4a183e5a-fe0f-4cfe-b3a0-36df15cd0c16"
      },
      "message": "Brand does not exist",
      "pointer": ["brand_id"],
      "section": "body"
    },
    {
      "context": {
        "id": "4a183e5a-fe0f-4cfe-b3a0-36df15cd0c16"
      },
      "message": "Category does not exist",
      "pointer": ["category_id"],
      "section": "body"
    },
    {
      "context": {
        "id": "4a183e5a-fe0f-4cfe-b3a0-36df15cd0c16"
      },
      "message": "Vendor does not exist",
      "pointer": ["vendor_id"],
      "section": "body"
    },
    {
      "context": {
        "id": "4a183e5a-fe0f-4cfe-b3a0-36df15cd0c16"
      },
      "message": "Group does not exist",
      "pointer": ["group_id"],
      "section": "body"
    },
    {
      "context": {
        "id": "4a183e5a-fe0f-4cfe-b3a0-36df15cd0c16"
      },
      "message": "Serving unit type does not exist",
      "pointer": ["unit_net_weight_and_serving_size_unit_type_id"],
      "section": "body"
    },
    {
      "context": {
        "id": "4a183e5a-fe0f-4cfe-b3a0-36df15cd0c16"
      },
      "message": "Owner does not exist",
      "pointer": ["owner_id"],
      "section": "body"
    },
    {
      "context": {
        "id": "4a183e5a-fe0f-4cfe-b3a0-36df15cd0c16"
      },
      "message": "Strain does not exist",
      "pointer": ["strain_id"],
      "section": "body"
    },
    {
      "context": {
        "id": "4a183e5a-fe0f-4cfe-b3a0-36df15cd0c16"
      },
      "message": "Subcategory does not belong to the product category",
      "pointer": ["subcategory_id"],
      "section": "body"
    },
    {
      "context": {
        "id": "4a183e5a-fe0f-4cfe-b3a0-36df15cd0c16"
      },
      "message": "One or more of the provided tags do not exist",
      "pointer": ["tags"],
      "section": "body"
    },
    {
      "context": {
        "id": "4a183e5a-fe0f-4cfe-b3a0-36df15cd0c16"
      },
      "message": "Unit type does not exist",
      "pointer": ["unit_type_id"],
      "section": "body"
    },
    {
      "context": {},
      "message": "Menu does not exist",
      "pointer": ["menus", 0, "00000000-0000-0000-0000-000000036748"],
      "section": "body"
    },
    {
      "context": {},
      "message": "Menu does not exist",
      "pointer": ["menus", 1, "00000000-0000-0000-0000-000000036749"],
      "section": "body"
    }
  ]
}

Upsert a single product. To update an existing product, pass in an existing product ID in the id field. When updating a product, you must pass in all fields (no sparse update currently supported).Any existing tag you do not pass in to tags will be deleted. If the menu_visibility field isset to INCLUDE_IN_SELECT, any existing menu that you do not pass into menus will be deleted.

Request

POST /public/v1/products

Parameters

Parameter Description In Type Required Default Example
id Unique ID for this product. If it exists, an update will be performed; otherwise, it will be used as the ID of a new product record query string false
inventory_tracking_method Once the tracking method is set for a product, it cannot be changed. The tracking method can be one of the following: PACKAGE: The inventory will be defined by packages. PRODUCT: Not grouped in any manner. The inventory simply exists on your product that you can add or remove as you transact. BATCH: Grouped by batches. Batches share common traits such as expiration dates and test results. query string false PACKAGE
sku Stock Keeping Unit (SKU) for this product query string false SKU123
name Name of the product query string false King Size Pre-rolls
vendor_id The ID of the company_relationship association with the vendor (company) that supplies this product. query string false
category_id The ID of the product category of the product. query string false
unit_type_id The ID of the unit type the product. query string false
unit_price The sale price of the product per unit. query number false
description Description of the product query string false A pack of 5 pre-rolls
upc Universal Product Code (UPC) for this product query string false 123456789012
subcategory_id The ID of the product subcategory of the product. The provided subcategory must be a child of the provided category. query string false
group_id The ID of the product's group. query string false
brand_id The ID of the company_relationship association with the brand (company) that is associated with this product. query query false
quantity_available_threshold_min The minimum quantity of the product you'd like to maintain. When the product inventory count dips below this number, it will automatically be included in scheduled Low Inventory Reports. query number false
quantity_available_threshold_max The maximum quantity of the product you'd like to maintain. When the product inventory count exceeds this number, it will automatically be included in scheduled Inventory Reports. query number false
units_per_case The number of units in a case of the product. query number false
unit_cost The cost of the product per unit. query number false
msrp The Manufacturer's Suggested Retail Price (MSRP) of the product per unit. If you have POS integrations enabled in Distru, this may be synced to your POS query number false
wholesale_unit_price The wholesale price of the product per unit. query number false
is_featured Whether the product is featured. Featured products will be displayed at the top of menus. query boolean false
strain_id The ID of the strain associated with the product. query string false
owner_id The ID of the user that is deemed to be the owner of the product. query string false
is_inactive Whether the product is inactive from use. Inactive products can be set to active at any time. query boolean false
total_cannabinoid_unit The unit of the THC/CBD content of the product (MG or PERCENT). query string false
total_thc The THC content of the product in the unit specified by total_cannabinoid_unit. Must also include total_cannabinoid_unit. query string false
total_cbd The CBD content of the product in the unit specified by total_cannabinoid_unit. Must also include total_cannabinoid_unit. query string false
menu_visibility This key is responsible for which menus (if any) the product will be displayed in. DO_NOT_INCLUDE: The product will not be displayed in any menus. INCLUDE_IN_ALL: The product will be displayed in all menus. INCLUDE_IN_SELECT: The product will be displayed in menus that have been explicitly selected (passed into the menus list). query string false
unit_net_weight The net weight of the product per unit. query number false
unit_serving_size The serving size of the product per unit. query number false
unit_net_weight_and_serving_size_unit_type_id The ID of the unit type that the net quantity per unit and serving size are measured in. This field should be null unless the product's unit type is count-based. If this field is set, the act of changing the category from 'Unit' will throw an error. query string false
tags A list of tags associated with the product. query array false ["0ef8347c-b714-4cd9-ba0e-872488bc9244", "daa0294c-833c-42bd-a133-b4c9e7f64017"]
menus A list of menus you would like this product to be included in. This field will only be used if the menu_visibility key is set to INCLUDE_IN_SELECT. query array false ["0ef8347c-b714-4cd9-ba0e-872488bc9244", "daa0294c-833c-42bd-a133-b4c9e7f64017"]

Responses

Status Description Schema
200 A single product Product

Purchase

Get purchases

GET /public/v1/purchases returns purchases related to the company

GET /public/v1/purchases
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4NDQsImlhdCI6MTc0NDk5MzI0NCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiZWNhYjBlMTItMTU1NS00OTIxLTllNDAtOTY4NGZmZmM4OTAxIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjQzLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDU0NDAiLCJ0eXAiOiJhY2Nlc3MifQ.-l6M95fuO-yfvSq_IkBsVXb3Ml94kr4TI1RgKoBNTf0

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: e9b58d1f5c2bd8000000000000000001-8382655f094518cf-0
{
  "data": [
    {
      "charges": [],
      "company": {
        "id": "00000000-0000-0000-0000-0000007a10af",
        "name": "Company 14678",
        "updated_datetime": "2025-04-18T16:20:44.635843Z"
      },
      "custom_data": [
        {
          "id": 64415,
          "name": "Custom Field 78",
          "value": null
        }
      ],
      "due_datetime": "2025-04-18T16:20:44.706692Z",
      "id": "00000000-0000-0000-0000-00000004b49e",
      "inserted_datetime": "2025-04-18T16:20:44.708325Z",
      "items": [
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004af970",
            "name": "B15174"
          },
          "compliance_quantity": null,
          "id": "aa186672-9516-41d4-873a-ee7704d77b85",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfe276",
            "id": "00000000-0000-0000-0000-00000053f8b4",
            "license_id": null,
            "name": "Place 6958"
          },
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "847c91d7-a267-495b-9306-f9ba31185638",
            "name": "Product 15159",
            "sku": "sku 15160",
            "updated_datetime": "2025-04-18T16:20:44.728589Z"
          },
          "quantity": "15.000000000",
          "received_quantity": "0.000000000"
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004af971",
            "name": "B15175"
          },
          "compliance_quantity": null,
          "id": "d6442383-a1f4-4ebf-97fb-0fe501728c91",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfe276",
            "id": "00000000-0000-0000-0000-00000053f8b4",
            "license_id": null,
            "name": "Place 6958"
          },
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "d9433acb-8e94-4a31-8aed-4466cd6700a8",
            "name": "Product 15164",
            "sku": "sku 15165",
            "updated_datetime": "2025-04-18T16:20:44.758388Z"
          },
          "quantity": "10.000000000",
          "received_quantity": "0.000000000"
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004af972",
            "name": "B15178"
          },
          "compliance_quantity": null,
          "id": "1fd05871-11b2-468e-ae51-6d99ca15bcdd",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfe276",
            "id": "00000000-0000-0000-0000-00000053f8b4",
            "license_id": null,
            "name": "Place 6958"
          },
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "9f76e9de-e7ba-4121-ad4a-78a781a2df17",
            "name": "Product 15170",
            "sku": "sku 15171",
            "updated_datetime": "2025-04-18T16:20:44.777566Z"
          },
          "quantity": "5.000000000",
          "received_quantity": "0.000000000"
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004af973",
            "name": "B15179"
          },
          "compliance_quantity": null,
          "id": "a7d682c7-84c0-4bcb-a01b-b09e5b7464c6",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfe276",
            "id": "00000000-0000-0000-0000-00000053f8b4",
            "license_id": null,
            "name": "Place 6958"
          },
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "28ea2bd3-cce2-4f22-bd8b-5f68a1973c92",
            "name": "Product 15172",
            "sku": "sku 15173",
            "updated_datetime": "2025-04-18T16:20:44.798446Z"
          },
          "quantity": "2.000000000",
          "received_quantity": "0.000000000"
        }
      ],
      "order_datetime": "2025-04-18T16:20:44.706689Z",
      "purchase_number": "Purchase #409",
      "status": "PENDING",
      "total": "32.00",
      "updated_datetime": "2025-04-18T16:20:44.708325Z"
    },
    {
      "charges": [
        {
          "id": "653d0fb1-cace-4339-82a1-4d0c2d5e5dd8",
          "name": "C1",
          "percent": "10.0000",
          "price": "1.00",
          "type": "CHARGE",
          "unit_type": "PERCENT"
        }
      ],
      "company": {
        "id": "00000000-0000-0000-0000-0000007a10aa",
        "name": "Company 14669",
        "updated_datetime": "2030-11-01T00:00:00.000000Z"
      },
      "custom_data": [
        {
          "id": 64415,
          "name": "Custom Field 78",
          "value": "Custom Field Value 1"
        }
      ],
      "due_datetime": "2020-01-01T00:00:01.000000Z",
      "id": "00000000-0000-0000-0000-00000004b49d",
      "inserted_datetime": "2020-01-01T00:00:03.000000Z",
      "items": [
        {
          "batch": {
            "batch_number": "UID1",
            "id": "00000000-0000-0000-0000-0000004af963",
            "name": "B1"
          },
          "compliance_quantity": "1.0000",
          "id": "ca21368d-78f7-49f9-8b4a-a9fd6156bbcb",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfe276",
            "id": "00000000-0000-0000-0000-00000053f8a6",
            "license_id": "00000000-0000-0000-0000-00000035b8cd",
            "name": "Place 6944"
          },
          "package": {
            "batch_number": "B1",
            "compliance_label": "ABCDEF012345670000071356",
            "id": "00000000-0000-0000-0000-0000001b0bcc",
            "metrc_label": "ABCDEF012345670000071356",
            "status": "active"
          },
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "6a85986f-6e5e-4510-81fa-d2c3f767f306",
            "name": "P1",
            "sku": "SKU1",
            "updated_datetime": "2023-11-02T00:00:00.000000Z"
          },
          "quantity": "1.000000000",
          "received_quantity": "1.000000000"
        }
      ],
      "order_datetime": "2020-01-01T00:00:02.000000Z",
      "purchase_number": "SO-123",
      "status": "COMPLETED",
      "total": "10.00",
      "updated_datetime": "2020-01-01T00:00:04.000000Z"
    }
  ]
}

GET /public/v1/purchases allows filtering by several statuses

GET /public/v1/purchases?status[]=Completed&status[]=Pending
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4NDUsImlhdCI6MTc0NDk5MzI0NSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYzVkNGNlZjgtZGJhMi00YTFkLThiNDMtYTVkNDBiMjhlMGUzIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjQ0LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDU1ODMiLCJ0eXAiOiJhY2Nlc3MifQ.bFd6LA48xzzOqJeE6O01BrbcWde6ElKZoOYhVpHckh8

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 660a752575ee7c000000000000000001-dce268349481b853-0
{
  "data": [
    {
      "charges": [],
      "company": {
        "id": "00000000-0000-0000-0000-0000007a111d",
        "name": "Company 14862",
        "updated_datetime": "2025-04-18T16:20:46.376858Z"
      },
      "custom_data": [],
      "due_datetime": "2025-04-18T16:20:46.469634Z",
      "id": "00000000-0000-0000-0000-00000004b4a8",
      "inserted_datetime": "2025-04-18T16:20:46.471228Z",
      "items": [
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004af9b2",
            "name": "B15388"
          },
          "compliance_quantity": null,
          "id": "c7c16aff-9ac7-4413-ab40-6d9d45bc27e4",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfe2e1",
            "id": "00000000-0000-0000-0000-00000053f902",
            "license_id": null,
            "name": "Place 7035"
          },
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "aae6f9d3-0415-4324-ab00-61529e72d0d4",
            "name": "Product 15374",
            "sku": "sku 15375",
            "updated_datetime": "2025-04-18T16:20:46.496917Z"
          },
          "quantity": "15.000000000",
          "received_quantity": "0.000000000"
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004af9b3",
            "name": "B15389"
          },
          "compliance_quantity": null,
          "id": "40134332-208f-4045-ae60-a14524e9ed35",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfe2e1",
            "id": "00000000-0000-0000-0000-00000053f902",
            "license_id": null,
            "name": "Place 7035"
          },
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "12bfa9c2-6188-4597-8eb4-79f33d0f02ff",
            "name": "Product 15378",
            "sku": "sku 15379",
            "updated_datetime": "2025-04-18T16:20:46.535697Z"
          },
          "quantity": "10.000000000",
          "received_quantity": "0.000000000"
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004af9b4",
            "name": "B15390"
          },
          "compliance_quantity": null,
          "id": "69c106ae-b35f-4732-b253-30f0ef70c8f6",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfe2e1",
            "id": "00000000-0000-0000-0000-00000053f902",
            "license_id": null,
            "name": "Place 7035"
          },
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "089df209-c3e2-41de-9050-0905b70611bd",
            "name": "Product 15381",
            "sku": "sku 15382",
            "updated_datetime": "2025-04-18T16:20:46.590238Z"
          },
          "quantity": "5.000000000",
          "received_quantity": "0.000000000"
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004af9b5",
            "name": "B15391"
          },
          "compliance_quantity": null,
          "id": "2e57b467-4b9e-46eb-baf1-af95bb503e5b",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfe2e1",
            "id": "00000000-0000-0000-0000-00000053f902",
            "license_id": null,
            "name": "Place 7035"
          },
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "bad717db-cd02-4235-9f27-d0620af54cf4",
            "name": "Product 15386",
            "sku": "sku 15387",
            "updated_datetime": "2025-04-18T16:20:46.622414Z"
          },
          "quantity": "2.000000000",
          "received_quantity": "0.000000000"
        }
      ],
      "order_datetime": "2020-01-01T12:30:00.000000Z",
      "purchase_number": "Purchase #419",
      "status": "PENDING",
      "total": "32.00",
      "updated_datetime": "2025-04-18T16:20:46.471228Z"
    },
    {
      "charges": [],
      "company": {
        "id": "00000000-0000-0000-0000-0000007a110d",
        "name": "Company 14831",
        "updated_datetime": "2025-04-18T16:20:46.116525Z"
      },
      "custom_data": [],
      "due_datetime": "2025-04-18T16:20:46.178330Z",
      "id": "00000000-0000-0000-0000-00000004b4a6",
      "inserted_datetime": "2025-04-18T16:20:46.180687Z",
      "items": [
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004af9a8",
            "name": "B15358"
          },
          "compliance_quantity": null,
          "id": "7df3d03e-92c9-432e-9ecb-136e96b3936f",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfe2e1",
            "id": "00000000-0000-0000-0000-00000053f8f6",
            "license_id": null,
            "name": "Place 7023"
          },
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "60cf231f-e9c9-4b2f-acee-3d6139b0cf17",
            "name": "Product 15339",
            "sku": "sku 15340",
            "updated_datetime": "2025-04-18T16:20:46.207793Z"
          },
          "quantity": "15.000000000",
          "received_quantity": "15.000000000"
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004af9a9",
            "name": "B15359"
          },
          "compliance_quantity": null,
          "id": "c9ebd163-4a50-4c36-bd10-4fe7366a4a59",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfe2e1",
            "id": "00000000-0000-0000-0000-00000053f8f6",
            "license_id": null,
            "name": "Place 7023"
          },
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "20a97fd6-141d-420b-ac54-a6760359e5bf",
            "name": "Product 15346",
            "sku": "sku 15347",
            "updated_datetime": "2025-04-18T16:20:46.230513Z"
          },
          "quantity": "10.000000000",
          "received_quantity": "10.000000000"
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004af9aa",
            "name": "B15360"
          },
          "compliance_quantity": null,
          "id": "f946aabe-95e6-47af-8fd2-ce7a7571ef15",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfe2e1",
            "id": "00000000-0000-0000-0000-00000053f8f6",
            "license_id": null,
            "name": "Place 7023"
          },
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "703b033b-cc2f-48a9-b38c-8672229ba9ab",
            "name": "Product 15351",
            "sku": "sku 15352",
            "updated_datetime": "2025-04-18T16:20:46.272167Z"
          },
          "quantity": "5.000000000",
          "received_quantity": "5.000000000"
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004af9ab",
            "name": "B15361"
          },
          "compliance_quantity": null,
          "id": "704958f9-cc85-4ece-8110-dbb5c24a83dc",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfe2e1",
            "id": "00000000-0000-0000-0000-00000053f8f6",
            "license_id": null,
            "name": "Place 7023"
          },
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "aed56a02-2e3b-49cc-acc2-fdb75152de9f",
            "name": "Product 15354",
            "sku": "sku 15355",
            "updated_datetime": "2025-04-18T16:20:46.292773Z"
          },
          "quantity": "2.000000000",
          "received_quantity": "2.000000000"
        }
      ],
      "order_datetime": "2020-01-01T12:20:00.000000Z",
      "purchase_number": "Purchase #417",
      "status": "COMPLETED",
      "total": "32.00",
      "updated_datetime": "2025-04-18T16:20:46.180687Z"
    },
    {
      "charges": [],
      "company": {
        "id": "00000000-0000-0000-0000-0000007a10de",
        "name": "Company 14759",
        "updated_datetime": "2025-04-18T16:20:45.444946Z"
      },
      "custom_data": [],
      "due_datetime": "2025-04-18T16:20:45.508109Z",
      "id": "00000000-0000-0000-0000-00000004b4a3",
      "inserted_datetime": "2025-04-18T16:20:45.510042Z",
      "items": [
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004af98c",
            "name": "B15274"
          },
          "compliance_quantity": null,
          "id": "0e164f6b-3e98-46c1-b3cb-8bdab60cda54",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfe2e1",
            "id": "00000000-0000-0000-0000-00000053f8d6",
            "license_id": null,
            "name": "Place 6992"
          },
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "56bc987e-62d7-4085-b0dc-315ce22fa31c",
            "name": "Product 15246",
            "sku": "sku 15247",
            "updated_datetime": "2025-04-18T16:20:45.533605Z"
          },
          "quantity": "15.000000000",
          "received_quantity": "15.000000000"
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004af98d",
            "name": "B15275"
          },
          "compliance_quantity": null,
          "id": "7a782bd8-4114-4ab7-bcf1-c82a10e60a1c",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfe2e1",
            "id": "00000000-0000-0000-0000-00000053f8d6",
            "license_id": null,
            "name": "Place 6992"
          },
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "6c0bc5ab-fb53-400c-bc59-838c52a12802",
            "name": "Product 15250",
            "sku": "sku 15251",
            "updated_datetime": "2025-04-18T16:20:45.558381Z"
          },
          "quantity": "10.000000000",
          "received_quantity": "10.000000000"
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004af98e",
            "name": "B15276"
          },
          "compliance_quantity": null,
          "id": "28ad2e71-9111-414c-8ec5-f0a19c8cbf12",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfe2e1",
            "id": "00000000-0000-0000-0000-00000053f8d6",
            "license_id": null,
            "name": "Place 6992"
          },
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "b1b6a2f3-16d6-4afd-8949-4f67bbea3457",
            "name": "Product 15264",
            "sku": "sku 15265",
            "updated_datetime": "2025-04-18T16:20:45.790961Z"
          },
          "quantity": "5.000000000",
          "received_quantity": "5.000000000"
        },
        {
          "batch": {
            "batch_number": null,
            "id": "00000000-0000-0000-0000-0000004af990",
            "name": "B15278"
          },
          "compliance_quantity": null,
          "id": "c5f65092-62de-4869-9c25-bcaff3878782",
          "location": {
            "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
            "company_id": "00000000-0000-0000-0000-000000cfe2e1",
            "id": "00000000-0000-0000-0000-00000053f8d6",
            "license_id": null,
            "name": "Place 6992"
          },
          "package": null,
          "price": "10.000000000",
          "price_base": "10",
          "product": {
            "id": "9974514a-db50-4873-a2ba-0b762821d524",
            "name": "Product 15270",
            "sku": "sku 15271",
            "updated_datetime": "2025-04-18T16:20:45.814784Z"
          },
          "quantity": "2.000000000",
          "received_quantity": "2.000000000"
        }
      ],
      "order_datetime": "2020-01-01T12:00:00.000000Z",
      "purchase_number": "Purchase #414",
      "status": "COMPLETED",
      "total": "32.00",
      "updated_datetime": "2025-04-18T16:20:45.510042Z"
    }
  ]
}

Get purchases sorted by Order Date descendingly date and filtered by various attributes.

Note: The page size for this endpoint is 500 purchase orders per page.

Request

GET /public/v1/purchases

Parameters

Parameter Description In Type Required Default Example
due_datetime Filter purchases by the due datetime query string false ,2022-07-10T00:00:00Z
inserted_datetime Filter purchases by their creation datetime query string false 2022-07-10T00:00:00Z,
order_datetime Filter purchases by the order datetime query string false 2022-07-10T00:00:00Z,2022-07-11T00:00:00Z
page Pagination information body Page false
status Filter purchases by their status. Accepted values are "Completed", "Delivering", "Partially Received", "Pending", "Processing". query array false ["Pending","Processing"]
updated_datetime Filter purchases by the datetime they were most recently modified query string false ,2022-07-10T00:00:00Z

Responses

Status Description Schema
200 A list of purchases Purchases

Insert a payment for a purchase

POST /purchases/:id/payments can create a payment for an purchase with both quickbooks id and name

POST /public/v1/purchases/00000000-0000-0000-0000-00000004b491/payments
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4MzksImlhdCI6MTc0NDk5MzIzOSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiOTQwZGE4MWMtOTYyNy00MmJmLThhMTgtNTgyOThlMWY4MmMzIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjM4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDQ5NzQiLCJ0eXAiOiJhY2Nlc3MifQ.rQINhIB0CMAb7-ztV3k_-2bGWmq0Y9JcF26L2RpmaGE
{
  "amount": 100.01,
  "description": "Payment for purchase",
  "payment_datetime": "2020-01-01T00:00:00.000000Z",
  "payment_method_id": "00000000-0000-0000-0000-000000017531",
  "quickbooks_deposit_account_id": "QBD-123"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 52f0342e020ac4000000000000000001-ac3e0b4e03510b76-0
{
  "data": {
    "amount": "100.01",
    "description": "Payment for purchase",
    "id": "00000000-0000-0000-0000-000000006caf",
    "inserted_datetime": "2025-04-18T16:20:39.568372Z",
    "payment_date": "2020-01-01T00:00:00.000000Z",
    "payment_method": {
      "id": "00000000-0000-0000-0000-000000017531",
      "name": "Payment Method 0"
    },
    "payment_number": "PYT-0000001",
    "purchase_id": "00000000-0000-0000-0000-00000004b491",
    "quickbooks_deposit_account_id": "QBD-123"
  }
}

POST /purchases/:id/payments can create a payment for an purchase with both quickbooks id and name

POST /public/v1/purchases/00000000-0000-0000-0000-00000004b491/payments
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4MzksImlhdCI6MTc0NDk5MzIzOSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiOTQwZGE4MWMtOTYyNy00MmJmLThhMTgtNTgyOThlMWY4MmMzIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjM4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDQ5NzQiLCJ0eXAiOiJhY2Nlc3MifQ.rQINhIB0CMAb7-ztV3k_-2bGWmq0Y9JcF26L2RpmaGE
{
  "amount": 100.01,
  "description": "Payment for purchase",
  "payment_datetime": "2020-01-01T00:00:00.000000Z",
  "payment_method_id": "00000000-0000-0000-0000-000000017531",
  "quickbooks_deposit_account_name": "QBD-NAME"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 52f0342e020ac4000000000000000001-8340f7aadaab00f6-0
{
  "data": {
    "amount": "100.01",
    "description": "Payment for purchase",
    "id": "00000000-0000-0000-0000-000000006cb0",
    "inserted_datetime": "2025-04-18T16:20:39.728814Z",
    "payment_date": "2020-01-01T00:00:00.000000Z",
    "payment_method": {
      "id": "00000000-0000-0000-0000-000000017531",
      "name": "Payment Method 0"
    },
    "payment_number": "PYT-0000002",
    "purchase_id": "00000000-0000-0000-0000-00000004b491",
    "quickbooks_deposit_account_id": "QBD-123"
  }
}

Request

POST /public/v1/purchases/{id}/payments

Parameters

Parameter Description In Type Required Default Example
payment_method_id Payment method ID query string true
amount Amount of the payment. Will round to 2 decimal places query decimal true
payment_datetime Payment date query string true
description Description of the payment query string true
quickbooks_deposit_account_id Quickbooks deposit account ID. Cannot include both this and quickbooks_deposit_account_name. If user's company is integrated with Quickbooks, either this or quickbooks_deposit_account_name must be provided. Account type must be "Bank" or "Credit Card" query string false
quickbooks_deposit_account_name Quickbooks deposit account name. Cannot include both this and quickbooks_deposit_account_id. If user's company is integrated with Quickbooks, either this or quickbooks_deposit_account_id must be provided. Account type must be "Bank" or "Credit Card" query string false

Responses

Status Description Schema
200 A single payment PurchasePayment

Upsert a purchase order

POST /public/v1/purchases creates a purchase (with product-tracked item)

POST /public/v1/purchases
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4NTMsImlhdCI6MTc0NDk5MzI1MywiaXNzIjoiRGlzdHJ1IiwianRpIjoiY2M5ZGE5NTEtYjAyYS00Mjk1LWEyOTEtYjkyMDQ1ZjE3ZDY2IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjUyLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDY4MzgiLCJ0eXAiOiJhY2Nlc3MifQ.X554vs9XG27de5kNRiVJpb4TiBoLuBPZbe5oxKWxBpE
{
  "billing_location_id": "00000000-0000-0000-0000-00000053fa5d",
  "charges": [
    {
      "name": "C1",
      "percent": "10.0000",
      "type": "CHARGE",
      "unit_type": "PERCENT"
    },
    {
      "name": "C2",
      "price": "-5.0000",
      "type": "DISCOUNT",
      "unit_type": "PRICE"
    }
  ],
  "company_id": "00000000-0000-0000-0000-0000007a131f",
  "due_datetime": "2020-01-30T00:00:00.000000Z",
  "items": [
    {
      "location_id": "00000000-0000-0000-0000-00000053fa5b",
      "price": "10.000000000",
      "product_id": "107d4b29-cbce-45f3-95dd-3d33245629bb",
      "quantity": "1.000000000"
    }
  ],
  "location_id": "00000000-0000-0000-0000-00000053fa5b",
  "order_datetime": "2020-01-01T00:00:00.000000Z"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 030adab2007611e00000000000000001-1df66aac84ff957a-0
{
  "data": {
    "charges": [
      {
        "id": "a342e841-d48a-4e74-9b76-a4fada435f56",
        "name": "C1",
        "percent": "10.0000",
        "price": "1.00",
        "type": "CHARGE",
        "unit_type": "PERCENT"
      },
      {
        "id": "a71774a7-dac5-4866-85e2-8c1cef657c59",
        "name": "C2",
        "percent": null,
        "price": "-5.00",
        "type": "DISCOUNT",
        "unit_type": "PRICE"
      }
    ],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a131f",
      "name": "Company 15641",
      "updated_datetime": "2025-04-18T16:20:53.282617Z"
    },
    "custom_data": [
      {
        "id": 64420,
        "name": "Custom Field 83",
        "value": null
      }
    ],
    "due_datetime": "2020-01-30T00:00:00.000000Z",
    "id": "00000000-0000-0000-0000-00000004b4cd",
    "inserted_datetime": "2025-04-18T16:20:53.917784Z",
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004afada",
          "name": "B1"
        },
        "compliance_quantity": null,
        "id": "7da33489-d72d-48d8-a09e-3963d19d2aed",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000cfe65e",
          "id": "00000000-0000-0000-0000-00000053fa5b",
          "license_id": "00000000-0000-0000-0000-00000035b99f",
          "name": "Place 7367"
        },
        "package": null,
        "price": "10.000000000",
        "price_base": "10.000000000",
        "product": {
          "id": "107d4b29-cbce-45f3-95dd-3d33245629bb",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:20:53.358120Z"
        },
        "quantity": "1.000000000",
        "received_quantity": "0.000000000"
      }
    ],
    "order_datetime": "2020-01-01T00:00:00.000000Z",
    "purchase_number": "PO-0000001",
    "status": "PENDING",
    "total": "6.00",
    "updated_datetime": "2025-04-18T16:20:53.940049Z"
  }
}

POST /public/v1/purchases creates a purchase (with batch-tracked item)

POST /public/v1/purchases
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4MzUsImlhdCI6MTc0NDk5MzIzNSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMWY3NWQ3ZTItYmYxMC00NTE2LThlMWMtMmUyNzI1ZTY1NTkxIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjM0LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDQyNzkiLCJ0eXAiOiJhY2Nlc3MifQ.RdSMnDaFFM-ifX60FIw4LwaDb3Jv_8irTSAJEURS-_E
{
  "billing_location_id": "00000000-0000-0000-0000-00000053f753",
  "charges": [
    {
      "name": "C1",
      "percent": "10.0000",
      "type": "CHARGE",
      "unit_type": "PERCENT"
    },
    {
      "name": "C2",
      "price": "-5.0000",
      "type": "DISCOUNT",
      "unit_type": "PRICE"
    }
  ],
  "company_id": "00000000-0000-0000-0000-0000007a0ea3",
  "due_datetime": "2020-01-30T00:00:00.000000Z",
  "items": [
    {
      "batch_id": "00000000-0000-0000-0000-0000004af80f",
      "location_id": "00000000-0000-0000-0000-00000053f753",
      "price": "10.000000000",
      "product_id": "3ff75e61-edc0-4bc0-8630-0c755787052b",
      "quantity": "1.000000000"
    }
  ],
  "location_id": "00000000-0000-0000-0000-00000053f753",
  "order_datetime": "2020-01-01T00:00:00.000000Z"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: d6c4210004afa0000000000000000001-4a4b6ca9b7e5a32e-0
{
  "data": {
    "charges": [
      {
        "id": "0204f44f-54f0-4360-afa7-8bac893680aa",
        "name": "C1",
        "percent": "10.0000",
        "price": "1.00",
        "type": "CHARGE",
        "unit_type": "PERCENT"
      },
      {
        "id": "74946b45-ff77-4e7e-b0d0-9bf23f6f012d",
        "name": "C2",
        "percent": null,
        "price": "-5.00",
        "type": "DISCOUNT",
        "unit_type": "PRICE"
      }
    ],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a0ea3",
      "name": "Company 13775",
      "updated_datetime": "2025-04-18T16:20:35.293279Z"
    },
    "custom_data": [],
    "due_datetime": "2020-01-30T00:00:00.000000Z",
    "id": "00000000-0000-0000-0000-00000004b47a",
    "inserted_datetime": "2025-04-18T16:20:35.443390Z",
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004af80f",
          "name": "B1"
        },
        "compliance_quantity": null,
        "id": "bf582795-58eb-493c-8a91-3a3f374533e3",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000cfdf01",
          "id": "00000000-0000-0000-0000-00000053f753",
          "license_id": "00000000-0000-0000-0000-00000035b803",
          "name": "Place 6616"
        },
        "package": null,
        "price": "10.000000000",
        "price_base": "10.000000000",
        "product": {
          "id": "3ff75e61-edc0-4bc0-8630-0c755787052b",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:20:35.363320Z"
        },
        "quantity": "1.000000000",
        "received_quantity": "0.000000000"
      }
    ],
    "order_datetime": "2020-01-01T00:00:00.000000Z",
    "purchase_number": "PO-0000001",
    "status": "PENDING",
    "total": "6.00",
    "updated_datetime": "2025-04-18T16:20:35.459643Z"
  }
}

POST /public/v1/purchases creates a purchase (with package-tracked item)

POST /public/v1/purchases
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4NDMsImlhdCI6MTc0NDk5MzI0MywiaXNzIjoiRGlzdHJ1IiwianRpIjoiYzQ5MmFmNjMtYzVkZS00Yjg1LWI3MzctMGNjYzAyZGI0YjM4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjQyLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDUzMDMiLCJ0eXAiOiJhY2Nlc3MifQ.fy9-tRFND0t25-nOVsCPXLAPAbKjV9u0NwuM5Enlnw0
{
  "billing_location_id": "00000000-0000-0000-0000-00000053f877",
  "charges": [
    {
      "name": "C1",
      "percent": "10.0000",
      "type": "CHARGE",
      "unit_type": "PERCENT"
    },
    {
      "name": "C2",
      "price": "-5.0000",
      "type": "DISCOUNT",
      "unit_type": "PRICE"
    }
  ],
  "company_id": "00000000-0000-0000-0000-0000007a1062",
  "due_datetime": "2020-01-30T00:00:00.000000Z",
  "items": [
    {
      "location_id": "00000000-0000-0000-0000-00000053f877",
      "price": "10.000000000",
      "product_id": "0ce03413-e3e3-4f48-8bd0-46435cc25276",
      "quantity": "1.000000000"
    }
  ],
  "location_id": "00000000-0000-0000-0000-00000053f877",
  "order_datetime": "2020-01-01T00:00:00.000000Z"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 1c1c9e6630a38e000000000000000001-203afd0529e2592e-0
{
  "data": {
    "charges": [
      {
        "id": "3d86e860-200d-427f-9955-3275dc5e1f56",
        "name": "C1",
        "percent": "10.0000",
        "price": "1.00",
        "type": "CHARGE",
        "unit_type": "PERCENT"
      },
      {
        "id": "b83d7b4f-87c1-41aa-badc-3c49464df5eb",
        "name": "C2",
        "percent": null,
        "price": "-5.00",
        "type": "DISCOUNT",
        "unit_type": "PRICE"
      }
    ],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a1062",
      "name": "Company 14549",
      "updated_datetime": "2025-04-18T16:20:43.434886Z"
    },
    "custom_data": [],
    "due_datetime": "2020-01-30T00:00:00.000000Z",
    "id": "00000000-0000-0000-0000-00000004b49b",
    "inserted_datetime": "2025-04-18T16:20:43.602687Z",
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004af93f",
          "name": "B1"
        },
        "compliance_quantity": null,
        "id": "de2f692d-0eb3-4618-b9ed-e8922ae11182",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000cfe20d",
          "id": "00000000-0000-0000-0000-00000053f877",
          "license_id": "00000000-0000-0000-0000-00000035b8aa",
          "name": "Place 6898"
        },
        "package": null,
        "price": "10.000000000",
        "price_base": "10.000000000",
        "product": {
          "id": "0ce03413-e3e3-4f48-8bd0-46435cc25276",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:20:43.523225Z"
        },
        "quantity": "1.000000000",
        "received_quantity": "0.000000000"
      }
    ],
    "order_datetime": "2020-01-01T00:00:00.000000Z",
    "purchase_number": "PO-0000001",
    "status": "PENDING",
    "total": "6.00",
    "updated_datetime": "2025-04-18T16:20:43.633514Z"
  }
}

POST /public/v1/purchases updates a purchase

POST /public/v1/purchases
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4NDAsImlhdCI6MTc0NDk5MzI0MCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiY2JlNDg0ZjYtOTA3OC00YzM3LTkxYTctNDI1N2VmZWEzMWQ0IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjM5LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDUxMjIiLCJ0eXAiOiJhY2Nlc3MifQ.-dtxre0b1-ygGrR8_mqLS07oHYlYpzkVq5IUwmKioZM
{
  "billing_location_id": "00000000-0000-0000-0000-00000053f843",
  "charges": [
    {
      "name": "C1",
      "percent": "10.0000",
      "type": "CHARGE",
      "unit_type": "PERCENT"
    }
  ],
  "company_id": "00000000-0000-0000-0000-0000007a1017",
  "due_datetime": "2020-01-20T00:00:00.000000Z",
  "items": [
    {
      "location_id": "00000000-0000-0000-0000-00000053f843",
      "price": "10.000000000",
      "product_id": "8da1ec69-bf2a-412b-b1bc-b369d34ae501",
      "quantity": "1.000000000"
    }
  ],
  "location_id": "00000000-0000-0000-0000-00000053f843",
  "order_datetime": "2020-01-02T00:00:00.000000Z"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: ddf7c8955e72c8000000000000000001-b0f2bf147fa4b384-0
{
  "data": {
    "charges": [
      {
        "id": "2e9b3b38-5673-40d8-9372-b0e0ce8743d8",
        "name": "C1",
        "percent": "10.0000",
        "price": "1.00",
        "type": "CHARGE",
        "unit_type": "PERCENT"
      }
    ],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a1017",
      "name": "Company 14418",
      "updated_datetime": "2025-04-18T16:20:40.228336Z"
    },
    "custom_data": [],
    "due_datetime": "2020-01-20T00:00:00.000000Z",
    "id": "00000000-0000-0000-0000-00000004b495",
    "inserted_datetime": "2025-04-18T16:20:40.460630Z",
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004af913",
          "name": "B1"
        },
        "compliance_quantity": null,
        "id": "a09572b5-ee3d-46eb-a78d-7f4b22763d9c",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000cfe188",
          "id": "00000000-0000-0000-0000-00000053f843",
          "license_id": "00000000-0000-0000-0000-00000035b889",
          "name": "Place 6849"
        },
        "package": null,
        "price": "10.000000000",
        "price_base": "10.000000000",
        "product": {
          "id": "8da1ec69-bf2a-412b-b1bc-b369d34ae501",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:20:40.307115Z"
        },
        "quantity": "1.000000000",
        "received_quantity": "0.000000000"
      }
    ],
    "order_datetime": "2020-01-02T00:00:00.000000Z",
    "purchase_number": "PO-0000001",
    "status": "PENDING",
    "total": "11.00",
    "updated_datetime": "2025-04-18T16:20:40.533226Z"
  }
}

POST /public/v1/purchases updates a purchase

POST /public/v1/purchases
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4NDAsImlhdCI6MTc0NDk5MzI0MCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiY2JlNDg0ZjYtOTA3OC00YzM3LTkxYTctNDI1N2VmZWEzMWQ0IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjM5LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDUxMjIiLCJ0eXAiOiJhY2Nlc3MifQ.-dtxre0b1-ygGrR8_mqLS07oHYlYpzkVq5IUwmKioZM
{
  "billing_location_id": "00000000-0000-0000-0000-00000053f843",
  "charges": [
    {
      "id": "2e9b3b38-5673-40d8-9372-b0e0ce8743d8",
      "name": "C1",
      "percent": "10.0000",
      "type": "CHARGE",
      "unit_type": "PERCENT"
    },
    {
      "name": "C2",
      "percent": null,
      "price": "-5.00",
      "type": "DISCOUNT",
      "unit_type": "PRICE"
    }
  ],
  "company_id": "00000000-0000-0000-0000-0000007a1017",
  "due_datetime": "2020-01-30T00:00:00.000000Z",
  "id": "00000000-0000-0000-0000-00000004b495",
  "items": [
    {
      "id": "a09572b5-ee3d-46eb-a78d-7f4b22763d9c",
      "location_id": "00000000-0000-0000-0000-00000053f843",
      "price": "10.000000000",
      "product_id": "8da1ec69-bf2a-412b-b1bc-b369d34ae501",
      "quantity": "1.000000000"
    },
    {
      "batch_id": "00000000-0000-0000-0000-0000004af915",
      "location_id": "00000000-0000-0000-0000-00000053f843",
      "price": "5.000000000",
      "product_id": "7f30c903-2361-4465-8c90-48e0f71456c5",
      "quantity": "2.000000000"
    }
  ],
  "location_id": "00000000-0000-0000-0000-00000053f843",
  "order_datetime": "2020-01-01T00:00:00.000000Z"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: ddf7c8955e72c8000000000000000001-df8babc2638058b2-0
{
  "data": {
    "charges": [
      {
        "id": "2e9b3b38-5673-40d8-9372-b0e0ce8743d8",
        "name": "C1",
        "percent": "10.0000",
        "price": "2.00",
        "type": "CHARGE",
        "unit_type": "PERCENT"
      },
      {
        "id": "076bd69b-517b-427f-9716-e3f50c721a66",
        "name": "C2",
        "percent": null,
        "price": "-5.00",
        "type": "DISCOUNT",
        "unit_type": "PRICE"
      }
    ],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a1017",
      "name": "Company 14418",
      "updated_datetime": "2025-04-18T16:20:40.228336Z"
    },
    "custom_data": [],
    "due_datetime": "2020-01-30T00:00:00.000000Z",
    "id": "00000000-0000-0000-0000-00000004b495",
    "inserted_datetime": "2025-04-18T16:20:40.460630Z",
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004af913",
          "name": "B1"
        },
        "compliance_quantity": null,
        "id": "a09572b5-ee3d-46eb-a78d-7f4b22763d9c",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000cfe188",
          "id": "00000000-0000-0000-0000-00000053f843",
          "license_id": "00000000-0000-0000-0000-00000035b889",
          "name": "Place 6849"
        },
        "package": null,
        "price": "10.000000000",
        "price_base": "10.000000000",
        "product": {
          "id": "8da1ec69-bf2a-412b-b1bc-b369d34ae501",
          "name": "P1",
          "sku": "SKU1",
          "updated_datetime": "2025-04-18T16:20:40.307115Z"
        },
        "quantity": "1.000000000",
        "received_quantity": "0.000000000"
      },
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004af915",
          "name": "B2"
        },
        "compliance_quantity": null,
        "id": "4d243548-682d-4d44-b703-da11d5d79542",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000cfe188",
          "id": "00000000-0000-0000-0000-00000053f843",
          "license_id": "00000000-0000-0000-0000-00000035b889",
          "name": "Place 6849"
        },
        "package": null,
        "price": "5.000000000",
        "price_base": "5.000000000",
        "product": {
          "id": "7f30c903-2361-4465-8c90-48e0f71456c5",
          "name": "P2",
          "sku": "SKU2",
          "updated_datetime": "2025-04-18T16:20:40.379574Z"
        },
        "quantity": "2.000000000",
        "received_quantity": "0.000000000"
      }
    ],
    "order_datetime": "2020-01-01T00:00:00.000000Z",
    "purchase_number": "PO-0000001",
    "status": "PENDING",
    "total": "17.00",
    "updated_datetime": "2025-04-18T16:20:41.800706Z"
  }
}

POST /public/v1/purchases updating a purchase removes line items that aren't included in the payload

POST /public/v1/purchases
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4NTIsImlhdCI6MTc0NDk5MzI1MiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMWU3NTM1ZjUtODhkYy00Y2Y1LWIyNDAtY2NhZGNiYmJmYWZkIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjUxLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDY2MTkiLCJ0eXAiOiJhY2Nlc3MifQ.5uhqA-ocFmjrT5Nser1foArpUwTXrS-6wHN_reRr6VM
{
  "billing_location_id": "00000000-0000-0000-0000-00000053fa1f",
  "company_id": "00000000-0000-0000-0000-0000007a12cd",
  "due_datetime": "2020-01-20T00:00:00.000000Z",
  "items": [
    {
      "location_id": "00000000-0000-0000-0000-00000053fa1f",
      "price": "10",
      "product_id": "8abdab64-8930-4441-b7a7-32ccb12a8cae",
      "quantity": "1"
    }
  ],
  "location_id": "00000000-0000-0000-0000-00000053fa1f",
  "order_datetime": "2020-01-02T00:00:00.000000Z"
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: f3ee83d2dc4248000000000000000001-d6f11fff3ac41942-0
{
  "data": {
    "charges": [],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a12cd",
      "name": "Company 15513",
      "updated_datetime": "2025-04-18T16:20:52.029742Z"
    },
    "custom_data": [],
    "due_datetime": "2020-01-20T00:00:00.000000Z",
    "id": "00000000-0000-0000-0000-00000004b4c7",
    "inserted_datetime": "2025-04-18T16:20:52.132281Z",
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004afaa9",
          "name": "B16139"
        },
        "compliance_quantity": null,
        "id": "507728df-b371-4491-b546-66e40f20bd72",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000cfe5d4",
          "id": "00000000-0000-0000-0000-00000053fa1f",
          "license_id": "00000000-0000-0000-0000-00000035b978",
          "name": "Place 7316"
        },
        "package": null,
        "price": "10.000000000",
        "price_base": "10.000000000",
        "product": {
          "id": "8abdab64-8930-4441-b7a7-32ccb12a8cae",
          "name": "Product 16134",
          "sku": "sku 16135",
          "updated_datetime": "2025-04-18T16:20:52.090147Z"
        },
        "quantity": "1.000000000",
        "received_quantity": "0.000000000"
      }
    ],
    "order_datetime": "2020-01-02T00:00:00.000000Z",
    "purchase_number": "PO-0000001",
    "status": "PENDING",
    "total": "10.00",
    "updated_datetime": "2025-04-18T16:20:52.132281Z"
  }
}

POST /public/v1/purchases updating a purchase removes line items that aren't included in the payload

POST /public/v1/purchases
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4NTIsImlhdCI6MTc0NDk5MzI1MiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMWU3NTM1ZjUtODhkYy00Y2Y1LWIyNDAtY2NhZGNiYmJmYWZkIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjUxLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDY2MTkiLCJ0eXAiOiJhY2Nlc3MifQ.5uhqA-ocFmjrT5Nser1foArpUwTXrS-6wHN_reRr6VM
{
  "company_id": "00000000-0000-0000-0000-0000007a12cd",
  "id": "00000000-0000-0000-0000-00000004b4c7",
  "items": [
    {
      "location_id": "00000000-0000-0000-0000-00000053fa1f",
      "price": "2",
      "product_id": "8abdab64-8930-4441-b7a7-32ccb12a8cae",
      "quantity": "1"
    }
  ]
}

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: f3ee83d2dc4248000000000000000001-b6eceded457cd7ab-0
{
  "data": {
    "charges": [],
    "company": {
      "id": "00000000-0000-0000-0000-0000007a12cd",
      "name": "Company 15513",
      "updated_datetime": "2025-04-18T16:20:52.029742Z"
    },
    "custom_data": [],
    "due_datetime": "2020-01-20T00:00:00.000000Z",
    "id": "00000000-0000-0000-0000-00000004b4c7",
    "inserted_datetime": "2025-04-18T16:20:52.132281Z",
    "items": [
      {
        "batch": {
          "batch_number": null,
          "id": "00000000-0000-0000-0000-0000004afaa9",
          "name": "B16139"
        },
        "compliance_quantity": null,
        "id": "278637f0-eb7c-4fe3-a4c3-ad887653e6ac",
        "location": {
          "address": "123 Fake Street, Beverly Hills, CA 88888, USA",
          "company_id": "00000000-0000-0000-0000-000000cfe5d4",
          "id": "00000000-0000-0000-0000-00000053fa1f",
          "license_id": "00000000-0000-0000-0000-00000035b978",
          "name": "Place 7316"
        },
        "package": null,
        "price": "2.000000000",
        "price_base": "2.000000000",
        "product": {
          "id": "8abdab64-8930-4441-b7a7-32ccb12a8cae",
          "name": "Product 16134",
          "sku": "sku 16135",
          "updated_datetime": "2025-04-18T16:20:52.090147Z"
        },
        "quantity": "1.000000000",
        "received_quantity": "0.000000000"
      }
    ],
    "order_datetime": "2020-01-02T00:00:00.000000Z",
    "purchase_number": "PO-0000001",
    "status": "PENDING",
    "total": "2.00",
    "updated_datetime": "2025-04-18T16:20:52.280966Z"
  }
}

POST /public/v1/purchases does not update a purchase that has moved beyond Pending status

POST /public/v1/purchases
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4NTIsImlhdCI6MTc0NDk5MzI1MiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiZjk4OTYxM2YtMmE5YS00NjE1LTg4NDctMTQ2NTk0NmE3NWZhIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjUxLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDY3NTciLCJ0eXAiOiJhY2Nlc3MifQ.30N-Ewm2d0Ga3dGwfzCCpfHrytqN9J8w49XkpEIubic
{
  "billing_location_id": "00000000-0000-0000-0000-00000053fa48",
  "charges": [],
  "company_id": "00000000-0000-0000-0000-0000007a1301",
  "due_datetime": "2020-01-30T00:00:00.000000Z",
  "id": "00000000-0000-0000-0000-00000004b4c9",
  "items": [
    {
      "batch_id": "00000000-0000-0000-0000-0000004afac9",
      "id": "737db0d1-d524-4e0c-ba7e-d1b343bad8ec",
      "location_id": "00000000-0000-0000-0000-00000053fa48",
      "price": "10.000000000",
      "product_id": "ef8d909d-d0fa-438b-afb2-75e68daa308d",
      "quantity": "1.000000000"
    }
  ],
  "location_id": "00000000-0000-0000-0000-00000053fa48",
  "order_datetime": "2020-01-01T00:00:00.000000Z"
}

Response

400
cache-control: max-age=0, private, must-revalidate
content-type: application/json; charset=utf-8
b3: 354cd11ae0589e000000000000000001-2831df967a377658-0
{
  "errors": [
    {
      "context": {},
      "message": "Cannot change this PO through the Distru API because it's beyond Pending status",
      "pointer": ["status"],
      "section": "body"
    }
  ]
}

POST /public/v1/purchases does not create a purchase with a company relationship that belongs to another company

POST /public/v1/purchases
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4NTEsImlhdCI6MTc0NDk5MzI1MSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiN2VlMmU1NTItODJiZi00MjQxLWFkMDgtMDdmZWVmZmY5YzE4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjUwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDY1NDMiLCJ0eXAiOiJhY2Nlc3MifQ.fwjvGZ5uy9GiliM-tQQmVKQLoi26Pa7sDXdsNT7HgDA
{
  "billing_location_id": "00000000-0000-0000-0000-00000053fa06",
  "charges": [],
  "company_id": "00000000-0000-0000-0000-0000007a12a7",
  "due_datetime": "2020-01-30T00:00:00.000000Z",
  "items": [
    {
      "location_id": "00000000-0000-0000-0000-00000053fa06",
      "price": "10.000000000",
      "product_id": "1acfc69d-1848-42fc-be1a-b99122bfbb48",
      "quantity": "1.000000000"
    }
  ],
  "location_id": "00000000-0000-0000-0000-00000053fa06",
  "order_datetime": "2020-01-01T00:00:00.000000Z"
}

Response

400
cache-control: max-age=0, private, must-revalidate
content-type: application/json; charset=utf-8
b3: 7ad7f940aff848000000000000000001-7b95907239893b7c-0
{
  "errors": [
    {
      "context": {},
      "message": "The provided supplier does not exist",
      "pointer": ["company_id"],
      "section": "body"
    }
  ]
}

POST /public/v1/purchases does not create a purchase with a product that belongs to another company

POST /public/v1/purchases
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4NDIsImlhdCI6MTc0NDk5MzI0MiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNzljMTVmY2YtZTY3Yi00ZTQyLThjNTgtNmUwZDdhM2I4YTZmIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjQxLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDUyNDMiLCJ0eXAiOiJhY2Nlc3MifQ.4LmyCgy4OLqEXHU-P-YAgtHq1QnAVyc0reTmlWd9gyA
{
  "billing_location_id": "00000000-0000-0000-0000-00000053f85f",
  "charges": [],
  "company_id": "00000000-0000-0000-0000-0000007a104a",
  "due_datetime": "2020-01-30T00:00:00.000000Z",
  "items": [
    {
      "location_id": "00000000-0000-0000-0000-00000053f85f",
      "price": "10.000000000",
      "product_id": "9fa6ba51-def5-4f84-b01b-8d51d71bf749",
      "quantity": "1.000000000"
    }
  ],
  "location_id": "00000000-0000-0000-0000-00000053f85f",
  "order_datetime": "2020-01-01T00:00:00.000000Z"
}

Response

400
cache-control: max-age=0, private, must-revalidate
content-type: application/json; charset=utf-8
b3: c31bc452d69070000000000000000001-0d2502b620cbae52-0
{
  "errors": [
    {
      "context": {
        "id": "8caeebc0-6083-410d-909d-8726d43a8588"
      },
      "message": "This record does not belong to your company.",
      "pointer": ["items", 0, "product_id"],
      "section": "body"
    }
  ]
}

POST /public/v1/purchases does not create a purchase with a batch that belongs to another company

POST /public/v1/purchases
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4NTEsImlhdCI6MTc0NDk5MzI1MSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNDQ0MmE4NGQtMmM0YS00YzYzLTk5ZTctZTNjZDQyZGJmODU1IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjUwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDY1ODciLCJ0eXAiOiJhY2Nlc3MifQ.GvYcGVCY3UHVjNZPRX-tpQn3cvhX2qe0-g53UFPoTgM
{
  "billing_location_id": "00000000-0000-0000-0000-00000053fa12",
  "charges": [],
  "company_id": "00000000-0000-0000-0000-0000007a12ba",
  "due_datetime": "2020-01-30T00:00:00.000000Z",
  "items": [
    {
      "batch_id": "00000000-0000-0000-0000-0000004afa9e",
      "location_id": "00000000-0000-0000-0000-00000053fa12",
      "price": "10.000000000",
      "quantity": "1.000000000"
    }
  ],
  "location_id": "00000000-0000-0000-0000-00000053fa12",
  "order_datetime": "2020-01-01T00:00:00.000000Z"
}

Response

400
cache-control: max-age=0, private, must-revalidate
content-type: application/json; charset=utf-8
b3: 234c734a868f76000000000000000001-de22bf31aa9e50be-0
{
  "errors": [
    {
      "context": {
        "id": "20b48f13-21c3-423f-9adf-b4639ee733c8"
      },
      "message": "This record does not belong to your company.",
      "pointer": ["items", 0, "product_id"],
      "section": "body"
    }
  ]
}

POST /public/v1/purchases does not create a purchase with a location that belongs to another company

POST /public/v1/purchases
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4NDAsImlhdCI6MTc0NDk5MzI0MCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNmUyZjdkNTAtOWJhMy00MDFhLTg4MjMtYjE1YmExYjc4NmViIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjM5LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDUwNzQiLCJ0eXAiOiJhY2Nlc3MifQ.O0abW3ibkKyjGvkv7mfQNgajTZdnZaoeYQ18c1b_1a0
{
  "billing_location_id": "00000000-0000-0000-0000-00000053f834",
  "charges": [],
  "company_id": "00000000-0000-0000-0000-0000007a1004",
  "due_datetime": "2020-01-30T00:00:00.000000Z",
  "items": [
    {
      "location_id": "00000000-0000-0000-0000-00000053f835",
      "price": "10.000000000",
      "product_id": "7ad9d00e-7cc5-46e9-8047-7529c3d2188d",
      "quantity": "1.000000000"
    }
  ],
  "location_id": "00000000-0000-0000-0000-00000053f835",
  "order_datetime": "2020-01-01T00:00:00.000000Z"
}

Response

400
cache-control: max-age=0, private, must-revalidate
content-type: application/json; charset=utf-8
b3: 6ed477d7d4c150000000000000000001-c792ccec53e80000-0
{
  "errors": [
    {
      "context": {
        "id": "8be839e3-5b38-4e9e-9d19-e6942e13eda8"
      },
      "message": "This record does not belong to your company.",
      "pointer": ["items", 0, "location_id"],
      "section": "body"
    }
  ]
}

POST /public/v1/purchases does not create a purchase with a location different from the order items

POST /public/v1/purchases
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4NTIsImlhdCI6MTc0NDk5MzI1MiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiZWQyZTc2ODktOWU4NC00ZjZjLWI3YmYtYTUxZmZlYzM1ZGUwIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjUxLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDY3MTMiLCJ0eXAiOiJhY2Nlc3MifQ.3uXg8fi04qeJ6I1-YaPwPwuTfg90tloxDTOdXGI8zDQ
{
  "billing_location_id": "00000000-0000-0000-0000-00000053fa35",
  "charges": [],
  "company_id": "00000000-0000-0000-0000-0000007a12f1",
  "due_datetime": "2020-01-30T00:00:00.000000Z",
  "items": [
    {
      "location_id": "00000000-0000-0000-0000-00000053fa35",
      "price": "10.000000000",
      "product_id": "289c9e2e-d6e7-4df4-af0e-6e31f571b2d7",
      "quantity": "1.000000000"
    }
  ],
  "location_id": "00000000-0000-0000-0000-00000053fa36",
  "order_datetime": "2020-01-01T00:00:00.000000Z"
}

Response

400
cache-control: max-age=0, private, must-revalidate
content-type: application/json; charset=utf-8
b3: b94b894f99d388000000000000000001-a37c6fd8d83cd8eb-0
{
  "errors": [
    {
      "context": {
        "id": "fc1475e8-203a-480b-92ab-a99118ef8eea"
      },
      "message": "Purchase item delivery location must be the same as purchase delivery location.",
      "pointer": ["items", 0, "location_id"],
      "section": "body"
    }
  ]
}

POST /public/v1/purchases does not create a purchase with a billing location that belongs to another company

POST /public/v1/purchases
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI4NDQsImlhdCI6MTc0NDk5MzI0NCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiOTZkM2NjZWMtMTdiZS00ODA3LWJhYjQtNzk1NTA1MWZiODhlIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMjQzLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMDUzOTYiLCJ0eXAiOiJhY2Nlc3MifQ.cA28kTbTZD1idnFp7vezlChZuQuhZ4DsS4L_r2tfQgw
{
  "billing_location_id": "00000000-0000-0000-0000-00000053f893",
  "charges": [],
  "company_id": "00000000-0000-0000-0000-0000007a108a",
  "due_datetime": "2020-01-30T00:00:00.000000Z",
  "items": [
    {
      "location_id": "00000000-0000-0000-0000-00000053f891",
      "price": "10.000000000",
      "product_id": "8f575a8a-bf5c-442e-975c-1ef9313cadba",
      "quantity": "1.000000000"
    }
  ],
  "location_id": "00000000-0000-0000-0000-00000053f891",
  "order_datetime": "2020-01-01T00:00:00.000000Z"
}

Response

400
cache-control: max-age=0, private, must-revalidate
content-type: application/json; charset=utf-8
b3: e36d4e04bfdbd8000000000000000001-2a53fa0d46ceed05-0
{
  "errors": [
    {
      "context": {},
      "message": "The provided billing address does not exist",
      "pointer": ["billing_location_id"],
      "section": "body"
    }
  ]
}

Upsert a single purchase order. To update an existing purchase order, pass in an existing purchase order ID in the id field. When updating a purchase order, you must pass in all fields (no sparse update currently supported). Any existing order item or charge you do not pass in to items and charges respectively will be deleted

Request

POST /public/v1/purchases

Parameters

Parameter Description In Type Required Default Example
id Unique ID for this purchase order. If it exists, an update will be performed; otherwise, it will be used as the ID of a new purchase order record query string false
description A description of the purchase order query string false
location_id The location into which the inventory in this purchase will be received query string false
billing_location_id The billing address for this purchase order query string false
company_id The company that is the supplier for this purchase order query string false
order_datetime The datetime on which the purchase order was placed query string false
due_datetime The datetime by which the purchase order should be paid query string false
charges The additional lines of Charge, Discount, or Tax added to this purchase order body PurchaseChargesRequest false
items The items present on this purchase order body PurchaseItemsRequest false
billing_location_id The billing location's ID query string false

Responses

Status Description Schema
200 A single purchase orders Purchase

StockAdjustment

Get adjustments

GET /public/v1/adjustments returns proper data for stock adjustments of product/batch/package tracked

GET /public/v1/adjustments
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5MTMsImlhdCI6MTc0NDk5MzMxMywiaXNzIjoiRGlzdHJ1IiwianRpIjoiZWMyMzVkMjktODIwMS00YjU0LWI5MzYtMzZlZDgyOGY0NzA2IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzEyLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMTcyODEiLCJ0eXAiOiJhY2Nlc3MifQ.RJ85pqUCfVVmVBUMDQZo5EMTdiINloXLItGdp4fb48c

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 9a6bdff7355f58000000000000000001-e0002fc7b57f8718-0
{
  "data": [
    {
      "batch_id": null,
      "completion_datetime": "2025-04-18T16:21:53.806123Z",
      "compliance_quantity": null,
      "description": null,
      "id": "00000000-0000-0000-0000-00000001f206",
      "license_id": null,
      "location_id": null,
      "owner_id": "00000000-0000-0000-0000-0000011472a1",
      "package_id": null,
      "product_id": "45fe0b69-9855-4882-a24e-c977a9bea6b3",
      "quantity": "10",
      "reason": "revaluation",
      "total_cost": "10000"
    },
    {
      "batch_id": null,
      "completion_datetime": "2025-04-18T16:21:53.951577Z",
      "compliance_quantity": "1",
      "description": "A default note describing this transaction",
      "id": "00000000-0000-0000-0000-00000001f207",
      "license_id": "00000000-0000-0000-0000-00000035c1ff",
      "location_id": "00000000-0000-0000-0000-00000054066f",
      "owner_id": null,
      "package_id": "00000000-0000-0000-0000-0000001b113b",
      "product_id": "8b8e6f2e-c655-4257-a6da-b6158f69fb88",
      "quantity": "1",
      "reason": "Voluntary Surrender",
      "total_cost": "900"
    },
    {
      "batch_id": "00000000-0000-0000-0000-0000004b0739",
      "completion_datetime": "2025-04-18T16:21:54.064523Z",
      "compliance_quantity": null,
      "description": null,
      "id": "00000000-0000-0000-0000-00000001f208",
      "license_id": null,
      "location_id": "00000000-0000-0000-0000-00000054066d",
      "owner_id": null,
      "package_id": null,
      "product_id": "b4615642-e107-4c35-9cd8-c6ca1c573ea3",
      "quantity": "1",
      "reason": "revaluation",
      "total_cost": "-800"
    }
  ]
}

Get stock adjustments sorted by their creation date and filtered by various attributes

Note: The page size for this endpoint is 5000 stock adjustments per page. This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses.

Request

GET /public/v1/adjustments

Parameters

Parameter Description In Type Required Default Example
inserted_datetime Filter stock adjustments by their creation datetime query string false 2022-07-10T00:00:00Z,
page Pagination information body Page false

Responses

Status Description Schema
200 A list of stock adjustments StockAdjustments

Strain

Get strains

GET /public/v1/strains returns strains related to the company

GET /public/v1/strains
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5ODQsImlhdCI6MTc0NDk5MzM4NCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiM2MxMjI2MTAtMGVjMi00ZTdiLThiMmMtN2E2ZjY0YTIzZDVmIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzgzLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMzEwNTYiLCJ0eXAiOiJhY2Nlc3MifQ.bJB9eT7JJjkdJsBQD9lSS015zVVv4AXj4RhXQ1H6gCA

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 5928a29208ab04000000000000000001-c201c8edeb01bd2e-0
{
  "data": [
    {
      "id": "00000000-0000-0000-0000-0000000250d8",
      "name": "Strain 544"
    },
    {
      "id": "00000000-0000-0000-0000-0000000250d9",
      "name": "Strain 545"
    }
  ]
}

Get strains filtered by various attributes

Note: The page size for this endpoint is 50k strains per page.

Request

GET /public/v1/strains

Parameters

Parameter Description In Type Required Default Example
inserted_datetime Filter strains by their creation datetime query string false 2022-07-10T00:00:00Z,
page Pagination information body Page false
updated_datetime Filter strains by the datetime they were most recently modified query string false ,2022-07-10T00:00:00Z

Responses

Status Description Schema
200 A list of strains Strains

User

Get users

GET /public/v1/users returns users related to the company

GET /public/v1/users
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NzY0NDI5NTMsImlhdCI6MTc0NDk5MzM1MywiaXNzIjoiRGlzdHJ1IiwianRpIjoiNmNkMTJlNDgtMDA3OS00M2FkLTljYmUtYThlNzUwZGIzNjZlIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzQ0OTkzMzUyLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTgxMjQzNTEiLCJ0eXAiOiJhY2Nlc3MifQ.tybW56Uj7W3Wo5UESf17o3ieuUYnB4Bypxtp3gLp3Uw

Response

200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 055747ef9d83f3800000000000000001-80f0e95889c0467f-0
{
  "data": [
    {
      "banned": false,
      "email": "owner-39923@example.com",
      "full_name": "FirstName78480 LastName78481",
      "id": "00000000-0000-0000-0000-000001148e3f",
      "role": {
        "id": "00000000-0000-0000-0000-00000112e1b2",
        "name": "Admin 39323"
      }
    },
    {
      "banned": false,
      "email": "owner-39929@example.com",
      "full_name": "FirstName78492 LastName78493",
      "id": "00000000-0000-0000-0000-000001148e44",
      "role": {
        "id": "00000000-0000-0000-0000-00000112e1b8",
        "name": "Admin 39329"
      }
    }
  ]
}

Get users sorted by their creation date and filtered by various attributes

Note: The page size for this endpoint is 1000 users per page. This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses.

Request

GET /public/v1/users

Parameters

Parameter Description In Type Required Default Example
inserted_datetime Filter users by their creation datetime query string false 2022-07-10T00:00:00Z,
page Pagination information body Page false
updated_datetime Filter users by the datetime they were most recently modified query string false ,2022-07-10T00:00:00Z

Responses

Status Description Schema
200 A list of users Users

Changelog

2024-10-2

2024-11-6

2024-12-24

2024-12-26

2025-01-08

2025-01-15

2025-01-17

2025-01-31

2025-02-26

2025-03-05

2025-03-11

2025-03-18

2025-04-09

2025-05-06

2025-05-13

2025-05-14