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.
- Integrate your supply chain with the rest of your business Build your own custom connectors that support your most important workflows.
- Extend your reports Take data from Distru and pipe it into other systems for a unified view of your business.
- Maximize your efficiency Automate tasks based on changes in your distribution, manufacturing, and sales.
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:
- Log in to Distru with your admin account.
- Navigate to the Settings page from the left menu.
- Click on Distru API under the Integrations section.
- 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 |
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 |
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 |
Products
A collection of Products
Property | Description | Type | Required |
---|
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
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 |
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 |
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 |
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 |
---|
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 |
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 |
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 |
---|---|---|---|
expiration_date | The date that this batch expires | string | false |
id | Unique ID for this batch | string | false |
name | Human readable name for this batch | 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 |
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 |
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 |
expiration_date | The date that this package expires | string | false |
id | Unique ID for this package in Distru | string | false |
license | A license as shown in Distru | License | 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 |
---|
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 |
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 |
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 |
id | Unique ID 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 |
relationship_type | A relationship type as shown in Distru | RelationshipType | false |
updated_datetime | The datetime this company was last updated at | string | 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 |
---|
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1MzQsImlhdCI6MTczNjg5MDkzNCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNTZiMjNkYjUtYTlhNi00MjQ5LTk5YzUtMDUwYjg2NjNkMDMxIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTMzLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjIwMzkiLCJ0eXAiOiJhY2Nlc3MifQ.fQ4mUlK9UuWApqa59p-j5hnBHqreC6M5xoG34n0gX-k
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 1f1aaa5756de01000000000000000001-4dd2df1d6ab68991-0
{
"data": [
{
"batch_number": null,
"expiration_date": "2024-01-01T00:00:00.000000Z",
"id": "00000000-0000-0000-0000-000000339269",
"name": "B31303",
"primary_test_result": null
},
{
"batch_number": null,
"expiration_date": null,
"id": "00000000-0000-0000-0000-00000033926c",
"name": "B31312",
"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"
}
}
]
}
Get batches sorted by their creation date and filtered by various attributes
Note: The page size for this endpoint is 50,000 batches per page.
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 |
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1NzcsImlhdCI6MTczNjg5MDk3NywiaXNzIjoiRGlzdHJ1IiwianRpIjoiYTY4NmZmNzUtODljYy00ZjM4LWE4ZDktZjdkYzczMWRmZWIwIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTc2LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjgzMTUiLCJ0eXAiOiJhY2Nlc3MifQ.Q94SberelqPvWeoaFg_8HOb_PK1V4IKx15--JN1g_-s
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 1baff7d90f2402000000000000000001-6600820e5df037b1-0
{
"data": [
{
"category": "Retailer",
"id": "00000000-0000-0000-0000-00000053e9fe",
"licenses": [],
"locations": [
{
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008e11a7",
"id": "00000000-0000-0000-0000-000000388436",
"license_id": null,
"name": "Place 13791"
}
],
"name": "Company 33398",
"relationship_type": {
"id": "00000000-0000-0000-0000-00000002954f",
"name": "Supplier"
},
"updated_datetime": "2023-11-03T00:00:00.000000Z"
},
{
"category": "Other",
"id": "00000000-0000-0000-0000-00000053ea01",
"licenses": [
{
"id": "00000000-0000-0000-0000-000000248e21",
"license_number": "CDPH-00009802"
}
],
"locations": [],
"name": "Company 33403",
"relationship_type": null,
"updated_datetime": "2023-12-02T00:00:00.000000Z"
}
]
}
Get companies sorted by their creation date and filtered by various attributes
Note: The page size for this endpoint is 50,000 companies per page.
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDAzNDksImlhdCI6MTczNjg5MDc0OSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMmQzZmU5YzktZTU1My00NWY1LTliNTItZmY4MWExYzFmY2NlIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwNzQ4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyMjY0OTciLCJ0eXAiOiJhY2Nlc3MifQ.HXqMzc3HxlrS3osYdMwJufKwRGQ-7388ziy1SgeOOiI
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: dd1798616110b0000000000000000001-5a81fc6a3c96a13c-0
{
"data": [
{
"company": {
"id": "00000000-0000-0000-0000-00000053a20b"
},
"email": null,
"full_name": "FirstName4516 LastName4517",
"id": "00000000-0000-0000-0000-00000000c28a",
"owner": {
"id": "00000000-0000-0000-0000-000000ba8fc5"
}
},
{
"company": {
"id": "00000000-0000-0000-0000-00000053a20e"
},
"email": null,
"full_name": "FirstName4532 LastName4533",
"id": "00000000-0000-0000-0000-00000000c28b",
"owner": {
"id": "00000000-0000-0000-0000-000000ba8fcd"
}
}
]
}
Get contacts sorted by their creation date and filtered by various attributes
Note: The page size for this endpoint is 1000 contacts per page.
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[]=c0f20581-28c2-4f9b-9f71-11c50f04c83b
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1ODUsImlhdCI6MTczNjg5MDk4NSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMTdjMjhhYjctZDBjYi00YjY5LTlmYjctNTE5ZjAwOTZmZWYzIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTg0LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNzAwMjgiLCJ0eXAiOiJhY2Nlc3MifQ.zWqHRYlx6uOC7K1mM30gjxG3gTouRhC87FFeYE8r_L4
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 1aa2ab1ff57a2e000000000000000001-3b7b823ac44bf5c0-0
{
"data": [
{
"active": "10.000000000",
"available": "10.000000000",
"product_id": "c0f20581-28c2-4f9b-9f71-11c50f04c83b",
"updated_datetime": "2025-01-14T21:43:05.976203Z"
}
]
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1ODYsImlhdCI6MTczNjg5MDk4NiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiODBkNTA0MDktYjNjYS00YWVlLTk5YTUtYTBmYjA0ZjNmMGNiIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTg1LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNzAwNTAiLCJ0eXAiOiJhY2Nlc3MifQ.G-4KtY4C3Cf_TeOLCVW7XslRdyM1y0xRZbXLUS8wLCY
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 67e6cb4182747c000000000000000001-e499903d39b37189-0
{
"data": [
{
"active": "50.000000000",
"available": "50.000000000",
"product_id": "17b7a4e0-571b-4b2b-8fae-94e1132d75ab",
"updated_datetime": "2023-11-05T00:00:00.000000Z"
},
{
"active": "100.000000000",
"available": "90.000000000",
"product_id": "5cfcc03b-e2ef-49da-9f07-77931a561367",
"updated_datetime": "2023-12-03T00:00:00.000000Z"
},
{
"active": "95.000000000",
"available": "80.000000000",
"product_id": "c5ac0ab0-62f7-49e8-b925-e01e9967e6ee",
"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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1ODYsImlhdCI6MTczNjg5MDk4NiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNTRjN2ZiYTAtN2NjOS00NWMwLWJmOGEtN2JjMzNjNWQ5YTkzIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTg1LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNzAyMTUiLCJ0eXAiOiJhY2Nlc3MifQ.xSx-GzqwbKLEYkKAPM1TXIDiete5NC6cmn6HVni1Pu4
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 84d331effe86d0000000000000000001-21ff1e5262254828-0
{
"data": [
{
"active": "100.000000000",
"available": "85.000000000",
"location_id": "00000000-0000-0000-0000-0000003886ad",
"product_id": "7db28148-ca93-44db-9fb9-27c24f2726b6",
"updated_datetime": "2030-10-03T00:00:00.000000Z"
},
{
"active": "90.000000000",
"available": "82.000000000",
"location_id": "00000000-0000-0000-0000-0000003886ae",
"product_id": "7db28148-ca93-44db-9fb9-27c24f2726b6",
"updated_datetime": "2030-10-04T00:00:00.000000Z"
},
{
"active": "150.000000000",
"available": "129.000000000",
"location_id": "00000000-0000-0000-0000-0000003886af",
"product_id": "7db28148-ca93-44db-9fb9-27c24f2726b6",
"updated_datetime": "2030-10-05T00:00:00.000000Z"
},
{
"active": "0.000000000",
"available": "-1.000000000",
"location_id": null,
"product_id": "7db28148-ca93-44db-9fb9-27c24f2726b6",
"updated_datetime": "2030-10-08T00:00:00.000000Z"
},
{
"active": "100.000000000",
"available": "100.000000000",
"location_id": "00000000-0000-0000-0000-0000003886ae",
"product_id": "abf24fee-8bc9-490d-a5f2-fa9087848f51",
"updated_datetime": "2030-09-01T00:00:00.000000Z"
},
{
"active": "30.000000000",
"available": "26.000000000",
"location_id": null,
"product_id": "abf24fee-8bc9-490d-a5f2-fa9087848f51",
"updated_datetime": "2030-10-07T00:00:00.000000Z"
},
{
"active": "100.000000000",
"available": "90.000000000",
"location_id": "00000000-0000-0000-0000-0000003886ad",
"product_id": "fecc9080-8631-405a-89b1-f304ceefb58a",
"updated_datetime": "2030-10-01T00:00:00.000000Z"
},
{
"active": "0.000000000",
"available": "-1.000000000",
"location_id": "00000000-0000-0000-0000-0000003886ae",
"product_id": "fecc9080-8631-405a-89b1-f304ceefb58a",
"updated_datetime": "2030-10-02T00: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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1ODUsImlhdCI6MTczNjg5MDk4NSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMGE5Mzk3MjYtNjAwOC00NDFhLThlNmUtOWVlNjk0MWEwMjMxIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTg0LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjk5MTMiLCJ0eXAiOiJhY2Nlc3MifQ.QcZV5Ifa_HD8gi4zJrlQZ7eV0Hex0WNO89dU_4XShus
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: b1df772079cbb0000000000000000001-d17e44f92dac02bd-0
{
"data": [
{
"active": "19.000000000",
"available": "19.000000000",
"batch_number": null,
"product_id": "0b115c3c-e6f1-4540-8c55-f2dc7b7ee217",
"updated_datetime": "2030-10-02T00:00:00.000000Z"
},
{
"active": "13.000000000",
"available": "13.000000000",
"batch_number": "TEST-1",
"product_id": "0b115c3c-e6f1-4540-8c55-f2dc7b7ee217",
"updated_datetime": "2030-10-04T00:00:00.000000Z"
},
{
"active": "8.000000000",
"available": "8.000000000",
"batch_number": "TEST-1",
"product_id": "1afb9320-88af-4e4c-ad48-be40b13d836a",
"updated_datetime": "2030-09-01T00:00:00.000000Z"
},
{
"active": "26.000000000",
"available": "26.000000000",
"batch_number": null,
"product_id": "66cd802f-2957-4305-b280-2bb2fe065e22",
"updated_datetime": "2030-12-01T00:00:00.000000Z"
},
{
"active": "27.000000000",
"available": "27.000000000",
"batch_number": "1",
"product_id": "66cd802f-2957-4305-b280-2bb2fe065e22",
"updated_datetime": "2030-12-02T00:00:00.000000Z"
},
{
"active": "43.000000000",
"available": "43.000000000",
"batch_number": null,
"product_id": "8a99a681-faf9-4e7d-8f77-add986d24ec6",
"updated_datetime": "2030-11-02T00:00:00.000000Z"
},
{
"active": "47.000000000",
"available": "47.000000000",
"batch_number": "1",
"product_id": "8a99a681-faf9-4e7d-8f77-add986d24ec6",
"updated_datetime": "2030-11-04T00:00:00.000000Z"
},
{
"active": "25.000000000",
"available": "25.000000000",
"batch_number": "2",
"product_id": "8a99a681-faf9-4e7d-8f77-add986d24ec6",
"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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1ODQsImlhdCI6MTczNjg5MDk4NCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiY2VkZDQ5ZTQtZDAzNi00Mjg2LTg3ZWEtMDI3NTg3ZTliNGMxIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTgzLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjk3NjYiLCJ0eXAiOiJhY2Nlc3MifQ.EH1yMLx0Dv392bz-MY_t7PtDQg3k_uX5Yine65DTeBk
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 2b0f0fc4ae9688000000000000000001-46585f85ffecc723-0
{
"data": [
{
"active": "41.000000000",
"available": "41.000000000",
"batch_number": null,
"location_id": "00000000-0000-0000-0000-0000003885eb",
"product_id": "7db28208-018e-4946-9540-85771e5e3c79",
"updated_datetime": "2031-01-02T00:00:00.000000Z"
},
{
"active": "49.000000000",
"available": "49.000000000",
"batch_number": "TEST-1",
"location_id": "00000000-0000-0000-0000-0000003885eb",
"product_id": "7db28208-018e-4946-9540-85771e5e3c79",
"updated_datetime": "2031-02-02T00:00:00.000000Z"
},
{
"active": "45.000000000",
"available": "45.000000000",
"batch_number": null,
"location_id": "00000000-0000-0000-0000-0000003885ec",
"product_id": "7db28208-018e-4946-9540-85771e5e3c79",
"updated_datetime": "2031-01-04T00:00:00.000000Z"
},
{
"active": "53.000000000",
"available": "53.000000000",
"batch_number": "TEST-1",
"location_id": "00000000-0000-0000-0000-0000003885ec",
"product_id": "7db28208-018e-4946-9540-85771e5e3c79",
"updated_datetime": "2031-02-04T00:00:00.000000Z"
},
{
"active": "21.000000000",
"available": "21.000000000",
"batch_number": null,
"location_id": "00000000-0000-0000-0000-0000003885eb",
"product_id": "dd4bcc29-590f-4d99-a93d-9d3b5c1fcd24",
"updated_datetime": "2030-11-02T00:00:00.000000Z"
},
{
"active": "29.000000000",
"available": "29.000000000",
"batch_number": "TEST-1",
"location_id": "00000000-0000-0000-0000-0000003885eb",
"product_id": "dd4bcc29-590f-4d99-a93d-9d3b5c1fcd24",
"updated_datetime": "2030-12-02T00:00:00.000000Z"
},
{
"active": "25.000000000",
"available": "25.000000000",
"batch_number": null,
"location_id": "00000000-0000-0000-0000-0000003885ec",
"product_id": "dd4bcc29-590f-4d99-a93d-9d3b5c1fcd24",
"updated_datetime": "2030-11-04T00:00:00.000000Z"
},
{
"active": "33.000000000",
"available": "33.000000000",
"batch_number": "TEST-1",
"location_id": "00000000-0000-0000-0000-0000003885ec",
"product_id": "dd4bcc29-590f-4d99-a93d-9d3b5c1fcd24",
"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 50,000 groups per page.
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDAzNzMsImlhdCI6MTczNjg5MDc3MywiaXNzIjoiRGlzdHJ1IiwianRpIjoiYzIzMzZkOTQtNjMxNy00ODdjLWEyOTYtYzVjM2NiMmU1NGEzIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwNzcyLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyMzEzOTAiLCJ0eXAiOiJhY2Nlc3MifQ.Ny2R03HfY7SNnC7y5Y5KI5CzSvwj5kTGC4hKr-OHccs
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 2c4d37b3f20a16000000000000000001-8c8dbeeabcfad408-0
{
"data": [
{
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053a980",
"name": "Company 5457",
"updated_datetime": "2025-01-14T21:39:34.060654Z"
},
"creator": {
"banned": false,
"email": "owner-7531@example.com",
"full_name": "FirstName14499 LastName14500",
"id": "00000000-0000-0000-0000-000000baa35b",
"role": {
"id": "00000000-0000-0000-0000-000000b96847",
"name": "Admin 7218"
}
},
"due_datetime": "2025-01-14T21:39:34.479230Z",
"id": "00000000-0000-0000-0000-000000048b24",
"inserted_datetime": "2025-01-14T21:39:34.481956Z",
"invoice_datetime": "2025-01-14T21:39:34.479228Z",
"invoice_number": "Invoice #148",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033742b",
"name": "B5857"
},
"id": "00000000-0000-0000-0000-00000005a43b",
"order_item_id": "a54281f6-7d13-4d97-9cba-9101b81dba9d",
"package": null,
"price": "10.000000000",
"product": {
"id": "253defbb-4094-4148-8c08-009cca2be4b6",
"name": "Product 5854",
"sku": "sku 5855",
"updated_datetime": "2025-01-14T21:39:34.135827Z"
},
"quantity": "10.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033742e",
"name": "B5871"
},
"id": "00000000-0000-0000-0000-00000005a43c",
"order_item_id": "f09055d5-0e3c-402f-9e6a-b88df44450da",
"package": null,
"price": "10.000000000",
"product": {
"id": "2f31d993-1ce2-4d78-b6c4-47fe41814654",
"name": "Product 5869",
"sku": "sku 5870",
"updated_datetime": "2025-01-14T21:39:34.217449Z"
},
"quantity": "10.000000000"
}
],
"order": {
"id": "dd238a0c-42ce-4b45-bc42-6a1dfbece74b",
"order_number": "SO-435",
"status": "Pending",
"total": "320.00"
},
"owner": {
"banned": false,
"email": "owner-7531@example.com",
"full_name": "FirstName14499 LastName14500",
"id": "00000000-0000-0000-0000-000000baa35b",
"role": {
"id": "00000000-0000-0000-0000-000000b96847",
"name": "Admin 7218"
}
},
"paid_amount": "0.0",
"status": "NOT_PAID",
"total": "32.00",
"updated_datetime": "2025-01-14T21:39:34.481956Z"
},
{
"charges": [
{
"id": "21fbb7e9-5c78-4005-b516-a6b7427fcfae",
"name": "C1",
"percent": "10.0000",
"price": "1.00",
"type": "CHARGE",
"unit_type": "PERCENT"
}
],
"company": {
"id": "00000000-0000-0000-0000-00000053a957",
"name": "Company 5375",
"updated_datetime": "2025-01-14T21:39:33.391377Z"
},
"creator": {
"banned": false,
"email": "user1@a.com",
"full_name": "John Foo",
"id": "00000000-0000-0000-0000-000000baa2d9",
"role": {
"id": "00000000-0000-0000-0000-000000b967c5",
"name": "Admin 7088"
}
},
"due_datetime": "2020-01-01T00:00:01.000000Z",
"id": "00000000-0000-0000-0000-000000048b23",
"inserted_datetime": "2025-01-14T21:39:33.518231Z",
"invoice_datetime": "2020-01-01T00:00:02.000000Z",
"invoice_number": "INV-123",
"items": [
{
"batch": {
"batch_number": "UID1",
"id": "00000000-0000-0000-0000-00000033740b",
"name": "B1"
},
"id": "00000000-0000-0000-0000-00000005a43a",
"order_item_id": "f11a3174-4262-474a-80eb-9ba728609326",
"package": {
"batch_number": "B1",
"compliance_label": "ABCDEF012345670000002093",
"id": "00000000-0000-0000-0000-0000001279c8",
"metrc_label": "ABCDEF012345670000002093",
"status": "active"
},
"price": "10.000000000",
"product": {
"id": "4068afc8-c29b-4244-bddf-9811af13f3c0",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:39:33.268160Z"
},
"quantity": "1.000000000"
}
],
"order": {
"id": "02c3a20a-ec58-432d-9f20-c80616166610",
"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-000000baa2dc",
"role": {
"id": "00000000-0000-0000-0000-000000b967c8",
"name": "Admin 7091"
}
},
"paid_amount": "5.00",
"status": "PARTIALLY_PAID",
"total": "8.00",
"updated_datetime": "2025-01-14T21:39:33.665201Z"
}
]
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDAzNzgsImlhdCI6MTczNjg5MDc3OCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYzUyOGNlY2UtZThhNy00ZDc3LTlhMTgtZmNkOWQ5MWZkZGEyIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwNzc3LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyMzIzMTEiLCJ0eXAiOiJhY2Nlc3MifQ.7h9kFC_8l5xhpazFsTltbw-PaApGFanNCPTcma_wXOQ
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: dd69661f966290000000000000000001-4a3266e349b3c98c-0
{
"data": [
{
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053ab3e",
"name": "Company 6174",
"updated_datetime": "2025-01-14T21:39:39.256310Z"
},
"creator": {
"banned": false,
"email": "owner-8575@example.com",
"full_name": "FirstName16575 LastName16576",
"id": "00000000-0000-0000-0000-000000baa76f",
"role": {
"id": "00000000-0000-0000-0000-000000b96c5a",
"name": "Admin 8261"
}
},
"due_datetime": "2025-01-14T21:39:39.500794Z",
"id": "00000000-0000-0000-0000-000000048b45",
"inserted_datetime": "2025-01-14T21:39:39.502417Z",
"invoice_datetime": "2020-01-01T12:30:00.000000Z",
"invoice_number": "Invoice #176",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000337530",
"name": "B6681"
},
"id": "00000000-0000-0000-0000-00000005a45c",
"order_item_id": "d30d8925-b2a0-462b-95ac-a73fd9c36942",
"package": null,
"price": "10.000000000",
"product": {
"id": "e6125fc0-c1cf-4cbf-98dc-d25e1d7d1670",
"name": "Product 6679",
"sku": "sku 6680",
"updated_datetime": "2025-01-14T21:39:39.288430Z"
},
"quantity": "10.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000337533",
"name": "B6692"
},
"id": "00000000-0000-0000-0000-00000005a45d",
"order_item_id": "9e1b3d9b-d87d-4a34-8ceb-91b9a81441c8",
"package": null,
"price": "10.000000000",
"product": {
"id": "edfef2af-5b09-4e1f-a141-eae3bb6fc755",
"name": "Product 6690",
"sku": "sku 6691",
"updated_datetime": "2025-01-14T21:39:39.322719Z"
},
"quantity": "10.000000000"
}
],
"order": {
"id": "a997163b-5ffb-4427-b4ad-951bb841d5b0",
"order_number": "SO-519",
"status": "Pending",
"total": "320.00"
},
"owner": {
"banned": false,
"email": "owner-8575@example.com",
"full_name": "FirstName16575 LastName16576",
"id": "00000000-0000-0000-0000-000000baa76f",
"role": {
"id": "00000000-0000-0000-0000-000000b96c5a",
"name": "Admin 8261"
}
},
"paid_amount": "0.0",
"status": "NOT_PAID",
"total": "32.00",
"updated_datetime": "2025-01-14T21:39:39.502417Z"
},
{
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053ab18",
"name": "Company 6111",
"updated_datetime": "2025-01-14T21:39:38.875803Z"
},
"creator": {
"banned": false,
"email": "owner-8497@example.com",
"full_name": "FirstName16419 LastName16422",
"id": "00000000-0000-0000-0000-000000baa722",
"role": {
"id": "00000000-0000-0000-0000-000000b96c0d",
"name": "Admin 8183"
}
},
"due_datetime": "2025-01-14T21:39:39.168280Z",
"id": "00000000-0000-0000-0000-000000048b44",
"inserted_datetime": "2025-01-14T21:39:39.169828Z",
"invoice_datetime": "2020-01-01T12:20:00.000000Z",
"invoice_number": "Invoice #175",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000337519",
"name": "B6610"
},
"id": "00000000-0000-0000-0000-00000005a45a",
"order_item_id": "5e73ea57-7241-46b2-84e9-fde3d309da71",
"package": null,
"price": "10.000000000",
"product": {
"id": "ab3141e7-6587-40d2-b286-a698802d824e",
"name": "Product 6608",
"sku": "sku 6609",
"updated_datetime": "2025-01-14T21:39:38.912614Z"
},
"quantity": "10.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033751e",
"name": "B6621"
},
"id": "00000000-0000-0000-0000-00000005a45b",
"order_item_id": "3aa5b7c5-4fe3-4856-8032-6ef6641cbc93",
"package": null,
"price": "10.000000000",
"product": {
"id": "1a0a618d-5c8f-44e1-98ee-a4e12bdb4613",
"name": "Product 6619",
"sku": "sku 6620",
"updated_datetime": "2025-01-14T21:39:38.977527Z"
},
"quantity": "10.000000000"
}
],
"order": {
"id": "80aecc7e-cf9c-4de4-91a5-f40cf35208a4",
"order_number": "SO-508",
"status": "Pending",
"total": "320.00"
},
"owner": {
"banned": false,
"email": "owner-8497@example.com",
"full_name": "FirstName16419 LastName16422",
"id": "00000000-0000-0000-0000-000000baa722",
"role": {
"id": "00000000-0000-0000-0000-000000b96c0d",
"name": "Admin 8183"
}
},
"paid_amount": "0.0",
"status": "FULLY_PAID",
"total": "32.00",
"updated_datetime": "2025-01-14T21:39:39.169828Z"
},
{
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053aac9",
"name": "Company 6006",
"updated_datetime": "2025-01-14T21:39:38.209642Z"
},
"creator": {
"banned": false,
"email": "owner-8329@example.com",
"full_name": "FirstName16087 LastName16088",
"id": "00000000-0000-0000-0000-000000baa679",
"role": {
"id": "00000000-0000-0000-0000-000000b96b64",
"name": "Admin 8015"
}
},
"due_datetime": "2025-01-14T21:39:38.452042Z",
"id": "00000000-0000-0000-0000-000000048b40",
"inserted_datetime": "2025-01-14T21:39:38.453328Z",
"invoice_datetime": "2020-01-01T12:00:00.000000Z",
"invoice_number": "Invoice #173",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-0000003374ec",
"name": "B6463"
},
"id": "00000000-0000-0000-0000-00000005a454",
"order_item_id": "897f6552-45c6-4674-b6a2-85c08afb6384",
"package": null,
"price": "10.000000000",
"product": {
"id": "4406d551-485d-4940-844f-1cf6b871e775",
"name": "Product 6460",
"sku": "sku 6461",
"updated_datetime": "2025-01-14T21:39:38.250000Z"
},
"quantity": "10.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-0000003374ef",
"name": "B6476"
},
"id": "00000000-0000-0000-0000-00000005a455",
"order_item_id": "0d638eba-ddd5-4cf4-8bd1-82e9907dcf78",
"package": null,
"price": "10.000000000",
"product": {
"id": "28fc2e76-ba9e-4e10-b41f-ba754976cbbf",
"name": "Product 6472",
"sku": "sku 6473",
"updated_datetime": "2025-01-14T21:39:38.293437Z"
},
"quantity": "10.000000000"
}
],
"order": {
"id": "469aa0c3-3799-4c3f-94ae-723b5e1465fe",
"order_number": "SO-500",
"status": "Pending",
"total": "320.00"
},
"owner": {
"banned": false,
"email": "owner-8329@example.com",
"full_name": "FirstName16087 LastName16088",
"id": "00000000-0000-0000-0000-000000baa679",
"role": {
"id": "00000000-0000-0000-0000-000000b96b64",
"name": "Admin 8015"
}
},
"paid_amount": "0.0",
"status": "FULLY_PAID",
"total": "32.00",
"updated_datetime": "2025-01-14T21:39:38.453328Z"
}
]
}
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.
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-000000048afc/payments
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDAzNjgsImlhdCI6MTczNjg5MDc2OCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMjE5MjM0Y2EtNTY1Ny00MGQxLWI2NzQtNTgyZTkxNzA3NjA2IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwNzY3LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyMzA0NTAiLCJ0eXAiOiJhY2Nlc3MifQ.aoR0LoySL873IpyuabiuMoui0NxSfIUU6DC5gHXawpo
{
"amount": 100.01,
"description": "Payment for invoice",
"payment_datetime": "2020-01-01T00:00:00.000000Z",
"payment_method_id": "00000000-0000-0000-0000-00000000fbf2",
"quickbooks_deposit_account_id": "QBD-123"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: f89a5282bfaf98000000000000000001-1a90d4f6b124870c-0
{
"data": {
"amount": "100.01",
"description": "Payment for invoice",
"id": "00000000-0000-0000-0000-00000000f04e",
"inserted_datetime": "2025-01-14T21:39:28.317973Z",
"invoice_id": "00000000-0000-0000-0000-000000048afc",
"payment_date": "2020-01-01T00:00:00.000000Z",
"payment_method": {
"id": "00000000-0000-0000-0000-00000000fbf2",
"name": "Payment Method 0"
},
"payment_number": "PYT-0000002",
"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-000000048afc/payments
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDAzNjgsImlhdCI6MTczNjg5MDc2OCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMjE5MjM0Y2EtNTY1Ny00MGQxLWI2NzQtNTgyZTkxNzA3NjA2IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwNzY3LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyMzA0NTAiLCJ0eXAiOiJhY2Nlc3MifQ.aoR0LoySL873IpyuabiuMoui0NxSfIUU6DC5gHXawpo
{
"amount": 100.01,
"description": "Payment for invoice",
"payment_datetime": "2020-01-01T00:00:00.000000Z",
"payment_method_id": "00000000-0000-0000-0000-00000000fbf2",
"quickbooks_deposit_account_name": "QBD-NAME"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: f89a5282bfaf98000000000000000001-78728933d4211e21-0
{
"data": {
"amount": "100.01",
"description": "Payment for invoice",
"id": "00000000-0000-0000-0000-00000000f04f",
"inserted_datetime": "2025-01-14T21:39:28.487248Z",
"invoice_id": "00000000-0000-0000-0000-000000048afc",
"payment_date": "2020-01-01T00:00:00.000000Z",
"payment_method": {
"id": "00000000-0000-0000-0000-00000000fbf2",
"name": "Payment Method 0"
},
"payment_number": "PYT-0000003",
"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-000000048b38
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDAzNzYsImlhdCI6MTczNjg5MDc3NiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiZjZhNWExZTEtMmI0OC00NDA2LWI2ODItNjQ2ODVlOGVkNTcyIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwNzc1LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyMzIwMDYiLCJ0eXAiOiJhY2Nlc3MifQ._ud8NvsI2LSyxi4BacSK4qIuM-iYlo0ZlZWRX6g9TuU
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 7d8fe8ff494638000000000000000001-704090a2fad92724-0
{
"data": {
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053aa43",
"name": "Company 5792",
"updated_datetime": "2025-01-14T21:39:36.500407Z"
},
"creator": {
"banned": false,
"email": "owner-8027@example.com",
"full_name": "FirstName15485 LastName15486",
"id": "00000000-0000-0000-0000-000000baa54b",
"role": {
"id": "00000000-0000-0000-0000-000000b96a38",
"name": "Admin 7715"
}
},
"due_datetime": "2025-01-14T21:39:36.768059Z",
"id": "00000000-0000-0000-0000-000000048b38",
"inserted_datetime": "2025-01-14T21:39:36.770572Z",
"invoice_datetime": "2025-01-14T21:39:36.768055Z",
"invoice_number": "Invoice #166",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033749c",
"name": "B6199"
},
"id": "00000000-0000-0000-0000-00000005a44c",
"order_item_id": "ecae4113-0458-43b5-ade5-e781f3a55905",
"package": null,
"price": "10.000000000",
"product": {
"id": "acf8a63e-3001-4125-be71-d680cd65abcb",
"name": "Product 6197",
"sku": "sku 6198",
"updated_datetime": "2025-01-14T21:39:36.537324Z"
},
"quantity": "10.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033749e",
"name": "B6207"
},
"id": "00000000-0000-0000-0000-00000005a44d",
"order_item_id": "d5aa4563-462a-4768-bc4d-b48c9588739b",
"package": null,
"price": "10.000000000",
"product": {
"id": "b59d6ee1-b8e6-46e7-a33b-b503a2c97a8f",
"name": "Product 6201",
"sku": "sku 6202",
"updated_datetime": "2025-01-14T21:39:36.583100Z"
},
"quantity": "10.000000000"
}
],
"order": {
"id": "2f601098-aea7-4d45-8388-ae214e63e797",
"order_number": "SO-479",
"status": "Pending",
"total": "320.00"
},
"owner": {
"banned": false,
"email": "owner-8027@example.com",
"full_name": "FirstName15485 LastName15486",
"id": "00000000-0000-0000-0000-000000baa54b",
"role": {
"id": "00000000-0000-0000-0000-000000b96a38",
"name": "Admin 7715"
}
},
"paid_amount": "0.0",
"status": "NOT_PAID",
"total": "32.00",
"updated_datetime": "2025-01-14T21:39:36.770572Z"
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDAzNTgsImlhdCI6MTczNjg5MDc1OCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiM2VmZmUyNzAtYmVlMy00YjRiLWJmMzctN2JiYzJiMjExMmQ0IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwNzU3LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyMjg2MDAiLCJ0eXAiOiJhY2Nlc3MifQ.VJjOg_9HrVdN2WM_VsXjy87MFww0k3TmUJgYtsK-sac
{
"billing_location_id": "00000000-0000-0000-0000-00000038543e",
"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": "4c4fc1a5-d0ed-4c38-9b87-c439a2235d7a",
"quantity": "1.000000000"
},
{
"order_item_id": "d7137697-bf9b-437e-87b1-fbe36b10eecb",
"quantity": "10.000000000"
}
],
"order_id": "e5fa46d5-9065-4901-bdae-da0e97e5ee93"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: d5a289c8d3cf50000000000000000001-e933e054c7528ebc-0
{
"data": {
"charges": [
{
"id": "eeb2268e-20d2-46a4-bffe-7636a42a94d9",
"name": "C1",
"percent": "10.0000",
"price": "5.30",
"type": "CHARGE",
"unit_type": "PERCENT"
},
{
"id": "97593848-1fe8-4575-a80e-e1d250573684",
"name": "C2",
"percent": null,
"price": "-5.00",
"type": "DISCOUNT",
"unit_type": "PRICE"
}
],
"company": {
"id": "00000000-0000-0000-0000-00000053a49e",
"name": "Company 3387",
"updated_datetime": "2025-01-14T21:39:18.750966Z"
},
"creator": {
"banned": false,
"email": "user1@a.com",
"full_name": "John Foo",
"id": "00000000-0000-0000-0000-000000ba97f8",
"role": {
"id": "00000000-0000-0000-0000-000000b95cf5",
"name": "Admin 4322"
}
},
"due_datetime": "2020-01-30T00:00:01.000000Z",
"id": "00000000-0000-0000-0000-000000048ac2",
"inserted_datetime": "2025-01-14T21:39:19.910442Z",
"invoice_datetime": "2020-01-01T00:00:00.000000Z",
"invoice_number": "INV-0000002",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000337157",
"name": "B1"
},
"id": "00000000-0000-0000-0000-00000005a3e6",
"order_item_id": "4c4fc1a5-d0ed-4c38-9b87-c439a2235d7a",
"package": null,
"price": "3.000000000",
"product": {
"id": "0e35cead-9e1a-4efa-abcd-08cfc444624b",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:39:18.817769Z"
},
"quantity": "1.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000337159",
"name": "B2"
},
"id": "00000000-0000-0000-0000-00000005a3e7",
"order_item_id": "d7137697-bf9b-437e-87b1-fbe36b10eecb",
"package": null,
"price": "5.000000000",
"product": {
"id": "6805376b-7f2d-419d-be17-ee94f67fe2df",
"name": "P2",
"sku": "SKU2",
"updated_datetime": "2025-01-14T21:39:18.845998Z"
},
"quantity": "10.000000000"
}
],
"order": {
"id": "e5fa46d5-9065-4901-bdae-da0e97e5ee93",
"order_number": "SO-234",
"status": "Processing",
"total": "0.00"
},
"owner": null,
"paid_amount": "0.0",
"status": "NOT_PAID",
"total": "53.30",
"updated_datetime": "2025-01-14T21:39:19.929944Z"
}
}
POST /invoices updates an invoice
POST /public/v1/invoices
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDAzODUsImlhdCI6MTczNjg5MDc4NSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNjEyZjM2NDMtM2NlZS00NGE4LTlkNTktYmZkNzJjYzQ1YTViIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwNzg0LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyMzM3OTUiLCJ0eXAiOiJhY2Nlc3MifQ.9zKGWn5gKzUSMm18opf2B1VR_QXr7NW4GelbtdEbQZk
{
"billing_location_id": "00000000-0000-0000-0000-000000385aa1",
"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": "8de75f5e-f1ed-40c9-b60f-93c2a25c99b5",
"quantity": "1.000000000"
},
{
"order_item_id": "12c5848d-9ec7-4999-8fce-e72411e6362a",
"quantity": "10.000000000"
}
],
"order_id": "e5e77ef8-ccd9-4937-b7d4-dc3bac31c222"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 04a6a50d656eef400000000000000001-b8ba327b0edd89fc-0
{
"data": {
"charges": [
{
"id": "0f0f9fa4-907e-4035-83bf-65afd6328d18",
"name": "C1",
"percent": "10.0000",
"price": "5.30",
"type": "CHARGE",
"unit_type": "PERCENT"
},
{
"id": "ee711022-280c-49d7-a3cb-d31caf85e1dd",
"name": "C2",
"percent": null,
"price": "-5.00",
"type": "DISCOUNT",
"unit_type": "PRICE"
}
],
"company": {
"id": "00000000-0000-0000-0000-00000053ad34",
"name": "Company 7000",
"updated_datetime": "2025-01-14T21:39:45.129539Z"
},
"creator": {
"banned": false,
"email": "user1@a.com",
"full_name": "John Foo",
"id": "00000000-0000-0000-0000-000000baac43",
"role": {
"id": "00000000-0000-0000-0000-000000b9713d",
"name": "Admin 9512"
}
},
"due_datetime": "2020-01-30T00:00:01.000000Z",
"id": "00000000-0000-0000-0000-000000048b58",
"inserted_datetime": "2025-01-14T21:39:45.486826Z",
"invoice_datetime": "2020-01-01T00:00:00.000000Z",
"invoice_number": "INV-0000002",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033766f",
"name": "B1"
},
"id": "00000000-0000-0000-0000-00000005a479",
"order_item_id": "8de75f5e-f1ed-40c9-b60f-93c2a25c99b5",
"package": null,
"price": "3.000000000",
"product": {
"id": "2d803ebe-d7ee-4f08-99d0-f1ca6e730231",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:39:45.264358Z"
},
"quantity": "1.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000337672",
"name": "B2"
},
"id": "00000000-0000-0000-0000-00000005a47a",
"order_item_id": "12c5848d-9ec7-4999-8fce-e72411e6362a",
"package": null,
"price": "5.000000000",
"product": {
"id": "7bc357a8-fb61-4f00-9505-edf6e0de6650",
"name": "P2",
"sku": "SKU2",
"updated_datetime": "2025-01-14T21:39:45.320765Z"
},
"quantity": "10.000000000"
}
],
"order": {
"id": "e5e77ef8-ccd9-4937-b7d4-dc3bac31c222",
"order_number": "SO-568",
"status": "Processing",
"total": "0.00"
},
"owner": null,
"paid_amount": "0.0",
"status": "NOT_PAID",
"total": "53.30",
"updated_datetime": "2025-01-14T21:39:45.557132Z"
}
}
POST /invoices updates an invoice
POST /public/v1/invoices
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDAzODUsImlhdCI6MTczNjg5MDc4NSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNjEyZjM2NDMtM2NlZS00NGE4LTlkNTktYmZkNzJjYzQ1YTViIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwNzg0LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyMzM3OTUiLCJ0eXAiOiJhY2Nlc3MifQ.9zKGWn5gKzUSMm18opf2B1VR_QXr7NW4GelbtdEbQZk
{
"billing_location_id": "00000000-0000-0000-0000-000000385aa5",
"charges": [
{
"id": "0f0f9fa4-907e-4035-83bf-65afd6328d18",
"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-000000048b58",
"invoice_datetime": "2020-01-02T00:00:00.000000Z",
"items": [
{
"id": "00000000-0000-0000-0000-00000005a479",
"order_item_id": "8de75f5e-f1ed-40c9-b60f-93c2a25c99b5",
"quantity": "1.000000000"
},
{
"order_item_id": "12c5848d-9ec7-4999-8fce-e72411e6362a",
"quantity": "8.000000000"
}
],
"order_id": "e5e77ef8-ccd9-4937-b7d4-dc3bac31c222"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 04a6a50d656eef400000000000000001-4d4f5601c1c88db0-0
{
"data": {
"charges": [
{
"id": "0f0f9fa4-907e-4035-83bf-65afd6328d18",
"name": "C1",
"percent": "10.0000",
"price": "4.30",
"type": "CHARGE",
"unit_type": "PERCENT"
},
{
"id": "ff6925ba-09e1-4843-baae-4208246b8e5c",
"name": "C3",
"percent": null,
"price": "-5.00",
"type": "DISCOUNT",
"unit_type": "PRICE"
}
],
"company": {
"id": "00000000-0000-0000-0000-00000053ad34",
"name": "Company 7000",
"updated_datetime": "2025-01-14T21:39:45.129539Z"
},
"creator": {
"banned": false,
"email": "user1@a.com",
"full_name": "John Foo",
"id": "00000000-0000-0000-0000-000000baac43",
"role": {
"id": "00000000-0000-0000-0000-000000b9713d",
"name": "Admin 9512"
}
},
"due_datetime": "2020-01-28T00:00:01.000000Z",
"id": "00000000-0000-0000-0000-000000048b58",
"inserted_datetime": "2025-01-14T21:39:45.486826Z",
"invoice_datetime": "2020-01-02T00:00:00.000000Z",
"invoice_number": "INV-0000002",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033766f",
"name": "B1"
},
"id": "00000000-0000-0000-0000-00000005a479",
"order_item_id": "8de75f5e-f1ed-40c9-b60f-93c2a25c99b5",
"package": null,
"price": "3.000000000",
"product": {
"id": "2d803ebe-d7ee-4f08-99d0-f1ca6e730231",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:39:45.264358Z"
},
"quantity": "1.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000337672",
"name": "B2"
},
"id": "00000000-0000-0000-0000-00000005a47b",
"order_item_id": "12c5848d-9ec7-4999-8fce-e72411e6362a",
"package": null,
"price": "5.000000000",
"product": {
"id": "7bc357a8-fb61-4f00-9505-edf6e0de6650",
"name": "P2",
"sku": "SKU2",
"updated_datetime": "2025-01-14T21:39:45.320765Z"
},
"quantity": "8.000000000"
}
],
"order": {
"id": "e5e77ef8-ccd9-4937-b7d4-dc3bac31c222",
"order_number": "SO-568",
"status": "Processing",
"total": "0.00"
},
"owner": null,
"paid_amount": "0.0",
"status": "NOT_PAID",
"total": "42.30",
"updated_datetime": "2025-01-14T21:39:45.945979Z"
}
}
POST /invoices reports various errors correctly on update
POST /public/v1/invoices
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDAzODAsImlhdCI6MTczNjg5MDc4MCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiM2I3ZmUwZDctZTVhYy00MTI3LTk2M2EtN2Q2NWI0ZDc3ZGFmIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwNzc5LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyMzI3ODIiLCJ0eXAiOiJhY2Nlc3MifQ.boSyhCr5QZddp0T7RuGEABF8alB6SBnmGiH66iJMAE0
{
"billing_location_id": "00000000-0000-0000-0000-000000385989",
"charges": [
{
"name": "C1",
"percent": "-1000.0000",
"type": "CHARGE",
"unit_type": "PERCENT"
}
],
"due_datetime": "2020-01-30T00:00:01.000000Z",
"id": "00000000-0000-0000-0000-000000048b47",
"invoice_datetime": "2020-01-01T00:00:00.000000Z",
"items": [
{
"order_item_id": "00000000-0000-0000-0000-000000000000",
"quantity": "15.000"
},
{
"order_item_id": "95ae3127-c12c-4dd5-8dd8-216a610a6463",
"quantity": "19.000"
}
],
"order_id": "45c2161e-2e18-4e67-b877-3d8185fc9799"
}
Response
400
cache-control: max-age=0, private, must-revalidate
content-type: application/json; charset=utf-8
b3: 2772abe0ed2084000000000000000001-01a7af65ec7b0a43-0
{
"errors": [
{
"context": {
"id": "f4553318-d473-4770-9146-4df21fd2bb88"
},
"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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NjcsImlhdCI6MTczNjg5MDg2NywiaXNzIjoiRGlzdHJ1IiwianRpIjoiMDJjZDQyZDctODc0ZS00YTkyLWIxMjktN2ZmMGRiZDExODdlIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODY2LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNDkxNjkiLCJ0eXAiOiJhY2Nlc3MifQ.rUXSnxV7IDZePX4mSU6uhxpaFfaYcF7KpUKP24xIIjs
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 56c9656ccb82a4000000000000000001-3edd6a2bb2605309-0
{
"data": [
{
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dd8a3",
"id": "00000000-0000-0000-0000-000000386d42",
"license": null,
"license_id": null,
"name": "Place 7967"
},
{
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dd8a3",
"id": "00000000-0000-0000-0000-000000386d43",
"license": {
"id": "00000000-0000-0000-0000-000000247f0d",
"license_number": "CDPH-00005592"
},
"license_id": "00000000-0000-0000-0000-000000247f0d",
"name": "Place 7968"
}
]
}
Get locations sorted by their creation date and filtered by various attributes
Note: The page size for this endpoint is 1000 locations per page.
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1MTEsImlhdCI6MTczNjg5MDkxMSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMDg2MjhjMjAtM2M2MC00Yzk3LWJhMWYtZDA3MGVkNTZlZTI4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTEwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTc5NjMiLCJ0eXAiOiJhY2Nlc3MifQ.MDWY01gTiM1vJ6JEtpljLArPSMUsLnIq0Onv2lk7ddo
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: a9c0ad92fe8720000000000000000001-3e227bad5f2282c5-0
{
"data": [
{
"billing_location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008df26e",
"id": "00000000-0000-0000-0000-0000003877ac",
"license_id": null,
"name": "Place 10591"
},
"charges": [
{
"id": "fd970f4d-0572-42a6-9d8a-ac9e28d82e5c",
"name": "C1",
"percent": "10.0000",
"price": "1.00",
"type": "CHARGE",
"unit_type": "PERCENT"
}
],
"company": {
"id": "00000000-0000-0000-0000-00000053d830",
"name": "Company 25488",
"updated_datetime": "2030-11-01T00:00:00.000000Z"
},
"creator": {
"banned": false,
"email": "user1@a.com",
"full_name": "John Foo",
"id": "00000000-0000-0000-0000-000000bb0aa6",
"role": {
"id": "00000000-0000-0000-0000-000000b9cf14",
"name": "Admin 33517"
}
},
"delivery_datetime": "2020-01-01T00:00:00.000000Z",
"due_datetime": "2020-01-01T00:00:01.000000Z",
"external_notes": null,
"id": "e8a1693d-f027-4689-b22b-0bc13d23d73a",
"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-000000338daa",
"name": "B1"
},
"compliance_quantity": "10.0000",
"id": "eaf0db3a-8bb0-4947-8edb-0b2a20a75ca0",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008df26e",
"id": "00000000-0000-0000-0000-0000003877ac",
"license_id": null,
"name": "Place 10591"
},
"package": {
"batch_number": "B1",
"compliance_label": "ABCDEF012345670000010861",
"id": "00000000-0000-0000-0000-0000001283d9",
"metrc_label": "ABCDEF012345670000010861",
"status": "active"
},
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "18f4837d-b4b9-488a-b9a0-5e8f4c738331",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2023-11-02T00:00:00.000000Z"
},
"quantity": "1.000000000"
}
],
"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-000000bb0aa8",
"role": {
"id": "00000000-0000-0000-0000-000000b9cf17",
"name": "Admin 33520"
}
},
"shipping_location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008df26e",
"id": "00000000-0000-0000-0000-0000003877ac",
"license_id": null,
"name": "Place 10591"
},
"status": "COMPLETED",
"total": "11.00",
"updated_datetime": "2020-01-01T00:00:04.000000Z"
}
]
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1MTksImlhdCI6MTczNjg5MDkxOSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNTFhYzIzOGYtYjQ2OC00MTdiLWIxOWQtMmM3MmM1YmEwOWYwIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTE4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTkzNDAiLCJ0eXAiOiJhY2Nlc3MifQ.hjFclDQ7X88IIvdEsQPQpDTgXNaKcg47Td7yu1szenc
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 7d3566de2800c0000000000000000001-5c11172fa3e4ec6c-0
{
"data": [
{
"billing_location": null,
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053db8c",
"name": "Company 26892",
"updated_datetime": "2025-01-14T21:42:01.019327Z"
},
"creator": {
"banned": false,
"email": "owner-35874@example.com",
"full_name": "FirstName70336 LastName70337",
"id": "00000000-0000-0000-0000-000000bb10e3",
"role": {
"id": "00000000-0000-0000-0000-000000b9d561",
"name": "Admin 35115"
}
},
"delivery_datetime": null,
"due_datetime": "2025-01-14T21:42:01.107802Z",
"external_notes": null,
"id": "a62dc2e5-02ad-456a-8907-3a972b11970b",
"inserted_datetime": "2025-01-14T21:42:01.108971Z",
"internal_notes": null,
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338f96",
"name": "B29219"
},
"compliance_quantity": null,
"id": "26d5f71b-b6a0-47a1-bbee-0fbad67bec36",
"location": null,
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "e7b33752-fb4a-4100-8de8-75f25abe95c4",
"name": "Product 29214",
"sku": "sku 29215",
"updated_datetime": "2025-01-14T21:42:01.138837Z"
},
"quantity": "15.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338f9a",
"name": "B29231"
},
"compliance_quantity": null,
"id": "79573cd7-3c0d-40fe-8d22-f7edbaf4a9b1",
"location": null,
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "14800141-2218-4f9a-a52d-1f5342e16b3a",
"name": "Product 29228",
"sku": "sku 29229",
"updated_datetime": "2025-01-14T21:42:01.193232Z"
},
"quantity": "10.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338f9b",
"name": "B29234"
},
"compliance_quantity": null,
"id": "c9116bc9-525b-4991-92a6-31becc0597b4",
"location": null,
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "f933b714-74bf-4c99-b5a3-440a759f3f0f",
"name": "Product 29232",
"sku": "sku 29233",
"updated_datetime": "2025-01-14T21:42:01.254630Z"
},
"quantity": "5.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338f9c",
"name": "B29239"
},
"compliance_quantity": null,
"id": "49181a47-f416-47f2-b110-c9ae02e7af46",
"location": null,
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "31953a20-b17a-43b4-8714-2ce882ec7d5d",
"name": "Product 29237",
"sku": "sku 29238",
"updated_datetime": "2025-01-14T21:42:01.307642Z"
},
"quantity": "2.000000000"
}
],
"order_datetime": "2020-01-01T12:30:00.000000Z",
"order_number": "SO-2124",
"owner": {
"banned": false,
"email": "owner-35874@example.com",
"full_name": "FirstName70336 LastName70337",
"id": "00000000-0000-0000-0000-000000bb10e3",
"role": {
"id": "00000000-0000-0000-0000-000000b9d561",
"name": "Admin 35115"
}
},
"shipping_location": null,
"status": "CANCELED",
"total": "320.00",
"updated_datetime": "2025-01-14T21:42:01.384066Z"
},
{
"billing_location": null,
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053db64",
"name": "Company 26839",
"updated_datetime": "2025-01-14T21:42:00.584356Z"
},
"creator": {
"banned": false,
"email": "owner-35789@example.com",
"full_name": "FirstName70186 LastName70187",
"id": "00000000-0000-0000-0000-000000bb1096",
"role": {
"id": "00000000-0000-0000-0000-000000b9d514",
"name": "Admin 35039"
}
},
"delivery_datetime": null,
"due_datetime": "2025-01-14T21:42:00.705450Z",
"external_notes": null,
"id": "cb976503-5f53-4f90-b624-75f379a8ba41",
"inserted_datetime": "2025-01-14T21:42:00.707899Z",
"internal_notes": null,
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338f7a",
"name": "B29145"
},
"compliance_quantity": null,
"id": "67864f86-e2dc-499d-8a45-94e63d95cec4",
"location": null,
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "f02a6297-f043-4773-adb5-a8582831e938",
"name": "Product 29141",
"sku": "sku 29142",
"updated_datetime": "2025-01-14T21:42:00.746476Z"
},
"quantity": "15.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338f80",
"name": "B29159"
},
"compliance_quantity": null,
"id": "b4582b44-228f-4bed-b229-c449808d51a1",
"location": null,
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "c46970bf-30a6-4f7c-b59b-b21b1f337a50",
"name": "Product 29157",
"sku": "sku 29158",
"updated_datetime": "2025-01-14T21:42:00.786943Z"
},
"quantity": "10.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338f82",
"name": "B29163"
},
"compliance_quantity": null,
"id": "c94e934b-43cf-41c3-a6e4-0a50a456480e",
"location": null,
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "fcc0db40-9882-4417-9428-f5e39704ab0c",
"name": "Product 29160",
"sku": "sku 29161",
"updated_datetime": "2025-01-14T21:42:00.837909Z"
},
"quantity": "5.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338f86",
"name": "B29175"
},
"compliance_quantity": null,
"id": "a6d419f6-a5da-446e-9c4a-0e700550b4ee",
"location": null,
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "d2f2c8b0-42e2-481f-aaee-298f0878d9c5",
"name": "Product 29172",
"sku": "sku 29173",
"updated_datetime": "2025-01-14T21:42:00.890707Z"
},
"quantity": "2.000000000"
}
],
"order_datetime": "2020-01-01T12:20:00.000000Z",
"order_number": "SO-2116",
"owner": {
"banned": false,
"email": "owner-35789@example.com",
"full_name": "FirstName70186 LastName70187",
"id": "00000000-0000-0000-0000-000000bb1096",
"role": {
"id": "00000000-0000-0000-0000-000000b9d514",
"name": "Admin 35039"
}
},
"shipping_location": null,
"status": "COMPLETED",
"total": "320.00",
"updated_datetime": "2025-01-14T21:42:00.990692Z"
},
{
"billing_location": null,
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053db17",
"name": "Company 26718",
"updated_datetime": "2025-01-14T21:41:59.820684Z"
},
"creator": {
"banned": false,
"email": "owner-35649@example.com",
"full_name": "FirstName69928 LastName69929",
"id": "00000000-0000-0000-0000-000000bb100f",
"role": {
"id": "00000000-0000-0000-0000-000000b9d48c",
"name": "Admin 34904"
}
},
"delivery_datetime": null,
"due_datetime": "2025-01-14T21:41:59.899414Z",
"external_notes": null,
"id": "aa569983-7104-4516-bd85-f7575498409b",
"inserted_datetime": "2025-01-14T21:41:59.900601Z",
"internal_notes": null,
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338f52",
"name": "B29020"
},
"compliance_quantity": null,
"id": "1e0ddde7-2d74-4891-8186-876a71b8b777",
"location": null,
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "1bb61728-2751-449a-bbd4-327c229bd70a",
"name": "Product 29017",
"sku": "sku 29018",
"updated_datetime": "2025-01-14T21:41:59.934200Z"
},
"quantity": "15.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338f54",
"name": "B29025"
},
"compliance_quantity": null,
"id": "a4378757-639a-4780-99b7-127ee6c0fc5c",
"location": null,
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "496854d2-d34a-4aff-ba68-827c5cc9c1b6",
"name": "Product 29023",
"sku": "sku 29024",
"updated_datetime": "2025-01-14T21:41:59.980347Z"
},
"quantity": "10.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338f55",
"name": "B29030"
},
"compliance_quantity": null,
"id": "fde7febf-fb53-40ed-b099-541543252d5f",
"location": null,
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "6e3e4194-d239-4e77-967c-f41c22f3f20b",
"name": "Product 29028",
"sku": "sku 29029",
"updated_datetime": "2025-01-14T21:42:00.033096Z"
},
"quantity": "5.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338f56",
"name": "B29035"
},
"compliance_quantity": null,
"id": "33b15ae1-87bc-407a-9a8a-8b86d4572dd1",
"location": null,
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "08f588a2-9bb2-46fb-9d77-a52d0f41e563",
"name": "Product 29033",
"sku": "sku 29034",
"updated_datetime": "2025-01-14T21:42:00.107622Z"
},
"quantity": "2.000000000"
}
],
"order_datetime": "2020-01-01T12:00:00.000000Z",
"order_number": "SO-2107",
"owner": {
"banned": false,
"email": "owner-35649@example.com",
"full_name": "FirstName69928 LastName69929",
"id": "00000000-0000-0000-0000-000000bb100f",
"role": {
"id": "00000000-0000-0000-0000-000000b9d48c",
"name": "Admin 34904"
}
},
"shipping_location": null,
"status": "COMPLETED",
"total": "320.00",
"updated_datetime": "2025-01-14T21:42:00.215223Z"
}
]
}
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/cf91de6a-4859-4ad7-9c1b-960898a4541e
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1MDIsImlhdCI6MTczNjg5MDkwMiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMzIzYWNiYWItODM1Ny00YjgwLWE1OWQtMDQyZTZlZmFmOGM3IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTAxLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTYxMTQiLCJ0eXAiOiJhY2Nlc3MifQ.b298-F8d00kkECG0775eRtXGa41iYuG7AXyVK3onue0
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 5b5a66722940e0000000000000000001-b822b0230611d6a9-0
{
"data": {
"billing_location": null,
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053d46a",
"name": "Company 24043",
"updated_datetime": "2025-01-14T21:41:42.359098Z"
},
"creator": {
"banned": false,
"email": "owner-32317@example.com",
"full_name": "FirstName63472 LastName63473",
"id": "00000000-0000-0000-0000-000000bb0379",
"role": {
"id": "00000000-0000-0000-0000-000000b9c7f9",
"name": "Admin 31701"
}
},
"delivery_datetime": null,
"due_datetime": "2025-01-14T21:41:42.413802Z",
"external_notes": null,
"id": "cf91de6a-4859-4ad7-9c1b-960898a4541e",
"inserted_datetime": "2025-01-14T21:41:42.415179Z",
"internal_notes": null,
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338b93",
"name": "B25847"
},
"compliance_quantity": null,
"id": "fa121fa2-0e7b-4a49-8c75-c4b29b9f72b4",
"location": null,
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "52001619-d80f-4283-824d-7583819bb30a",
"name": "Product 25843",
"sku": "sku 25844",
"updated_datetime": "2025-01-14T21:41:42.461574Z"
},
"quantity": "15.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338b97",
"name": "B25859"
},
"compliance_quantity": null,
"id": "e5fc8d3f-0171-40c1-acf6-cd78967203d9",
"location": null,
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "4867704e-f8c7-41c3-ac2b-8e9a359f403f",
"name": "Product 25857",
"sku": "sku 25858",
"updated_datetime": "2025-01-14T21:41:42.505947Z"
},
"quantity": "10.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338b9a",
"name": "B25870"
},
"compliance_quantity": null,
"id": "cb74eb5b-53f6-4837-ac43-372d0f88de47",
"location": null,
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "08ce19ec-cdf2-4cff-bb2c-8c8f8594a78c",
"name": "Product 25868",
"sku": "sku 25869",
"updated_datetime": "2025-01-14T21:41:42.541961Z"
},
"quantity": "5.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338b9c",
"name": "B25884"
},
"compliance_quantity": null,
"id": "4cdb55c2-7fda-4465-b024-2f3370e37f62",
"location": null,
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "0fd89bea-b2de-47c4-a8b3-7d34f8c0a3a1",
"name": "Product 25882",
"sku": "sku 25883",
"updated_datetime": "2025-01-14T21:41:42.583149Z"
},
"quantity": "2.000000000"
}
],
"order_datetime": "2025-01-14T21:41:42.413799Z",
"order_number": "SO-1879",
"owner": {
"banned": false,
"email": "owner-32317@example.com",
"full_name": "FirstName63472 LastName63473",
"id": "00000000-0000-0000-0000-000000bb0379",
"role": {
"id": "00000000-0000-0000-0000-000000b9c7f9",
"name": "Admin 31701"
}
},
"shipping_location": null,
"status": "COMPLETED",
"total": "320.00",
"updated_datetime": "2025-01-14T21:41:42.648728Z"
}
}
Get a single order given the ID
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1MTAsImlhdCI6MTczNjg5MDkxMCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMTFjOTNmMzAtYzQzMy00NjQxLWIyYzItM2Q2ZTMxZDMzZTZlIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTA5LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTc4MzYiLCJ0eXAiOiJhY2Nlc3MifQ.k9Mv0fUI3H1UJMkbTvKisuYqQZktljBbec5Zd-BOtjM
{
"billing_location_id": "00000000-0000-0000-0000-000000387789",
"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-00000053d7f0",
"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-000000387789",
"price_base": "10.000000000",
"product_id": "5334dfde-3ca6-4602-ad3f-fc3da5782124",
"quantity": "1.000000000"
}
],
"order_datetime": "2020-01-01T00:00:02.000000Z",
"owner_id": "00000000-0000-0000-0000-000000bb0a2c",
"shipping_location_id": "00000000-0000-0000-0000-000000387789",
"status": "PROCESSING"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: a2291cd9c435d8000000000000000001-3da69ed1e6bf3247-0
{
"data": {
"billing_location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008df219",
"id": "00000000-0000-0000-0000-000000387789",
"license_id": "00000000-0000-0000-0000-0000002485f9",
"name": "Place 10556"
},
"charges": [
{
"id": "e44c5352-1c73-4dfb-b8da-47a93d265dc6",
"name": "C1",
"percent": "10.0000",
"price": "1.00",
"type": "CHARGE",
"unit_type": "PERCENT"
},
{
"id": "a0565df7-e31a-460f-b5fb-bcff87fb0f69",
"name": "C2",
"percent": null,
"price": "-5.00",
"type": "DISCOUNT",
"unit_type": "PRICE"
}
],
"company": {
"id": "00000000-0000-0000-0000-00000053d7f0",
"name": "Company 25382",
"updated_datetime": "2025-01-14T21:41:50.835462Z"
},
"creator": {
"banned": false,
"email": "user1@a.com",
"full_name": "John Foo",
"id": "00000000-0000-0000-0000-000000bb0a2c",
"role": {
"id": "00000000-0000-0000-0000-000000b9ce9a",
"name": "Admin 33396"
}
},
"delivery_datetime": "2020-01-01T00:00:00.000000Z",
"due_datetime": "2020-01-01T00:00:01.000000Z",
"external_notes": "Thank you for ordering!",
"id": "a474976e-c7a3-4903-891a-1bd2b8497afa",
"inserted_datetime": "2025-01-14T21:41:51.028152Z",
"internal_notes": "Internal notes for this order",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338d88",
"name": "B1"
},
"compliance_quantity": null,
"id": "f55545b3-2e4d-498c-a985-a57b66761044",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008df219",
"id": "00000000-0000-0000-0000-000000387789",
"license_id": "00000000-0000-0000-0000-0000002485f9",
"name": "Place 10556"
},
"package": null,
"price": "10.000000000",
"price_base": "10.000000000",
"product": {
"id": "5334dfde-3ca6-4602-ad3f-fc3da5782124",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:41:50.933986Z"
},
"quantity": "1.000000000"
}
],
"order_datetime": "2020-01-01T00:00:02.000000Z",
"order_number": "SO-0000002",
"owner": {
"banned": false,
"email": "user1@a.com",
"full_name": "John Foo",
"id": "00000000-0000-0000-0000-000000bb0a2c",
"role": {
"id": "00000000-0000-0000-0000-000000b9ce9a",
"name": "Admin 33396"
}
},
"shipping_location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008df219",
"id": "00000000-0000-0000-0000-000000387789",
"license_id": "00000000-0000-0000-0000-0000002485f9",
"name": "Place 10556"
},
"status": "PROCESSING",
"total": "6.00",
"updated_datetime": "2025-01-14T21:41:51.101511Z"
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0OTgsImlhdCI6MTczNjg5MDg5OCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiOTVkNmNmMzQtZDdiYi00MGNmLWEwMzMtZTQ3MjIzZTAxMzliIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODk3LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTU0NjkiLCJ0eXAiOiJhY2Nlc3MifQ.rAGHlcm3cBBcZrTqgF_7rk8QdfivAmXwYM32yfI56YM
{
"billing_location_id": "00000000-0000-0000-0000-000000387485",
"charges": [],
"company_id": "00000000-0000-0000-0000-00000053d309",
"delivery_datetime": "2020-01-01T00:00:00.000000Z",
"due_datetime": "2020-01-01T00:00:01.000000Z",
"items": [
{
"location_id": "00000000-0000-0000-0000-000000387485",
"price_base": "10.000000000",
"product_id": "eb69f585-5cd2-408a-8840-a46ddc0f9cd9",
"quantity": "1.000000000"
}
],
"order_datetime": "2020-01-01T00:00:02.000000Z",
"shipping_location_id": "00000000-0000-0000-0000-000000387485",
"status": "PROCESSING"
}
Response
400
cache-control: max-age=0, private, must-revalidate
content-type: application/json; charset=utf-8
b3: dd956ec31e2e80000000000000000001-9cb6c275900eaf11-0
{
"errors": [
{
"context": {
"id": "85013578-c8a9-417c-bf23-0ebb89d642e5"
},
"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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0OTgsImlhdCI6MTczNjg5MDg5OCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiOTVkNmNmMzQtZDdiYi00MGNmLWEwMzMtZTQ3MjIzZTAxMzliIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODk3LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTU0NjkiLCJ0eXAiOiJhY2Nlc3MifQ.rAGHlcm3cBBcZrTqgF_7rk8QdfivAmXwYM32yfI56YM
{
"billing_location_id": "00000000-0000-0000-0000-000000387485",
"blaze_payment_type": "CASH",
"charges": [],
"company_id": "00000000-0000-0000-0000-00000053d309",
"delivery_datetime": "2020-01-01T00:00:00.000000Z",
"due_datetime": "2020-01-01T00:00:01.000000Z",
"items": [
{
"location_id": "00000000-0000-0000-0000-000000387485",
"price_base": "10.000000000",
"product_id": "eb69f585-5cd2-408a-8840-a46ddc0f9cd9",
"quantity": "1.000000000"
}
],
"order_datetime": "2020-01-01T00:00:02.000000Z",
"shipping_location_id": "00000000-0000-0000-0000-000000387485",
"status": "PROCESSING"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: dd956ec31e2e80000000000000000001-5de473edc6c18d93-0
{
"data": {
"billing_location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008deaa0",
"id": "00000000-0000-0000-0000-000000387485",
"license_id": "00000000-0000-0000-0000-000000248479",
"name": "Place 9784"
},
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053d309",
"name": "Company 23473",
"updated_datetime": "2025-01-14T21:41:38.867713Z"
},
"creator": {
"banned": false,
"email": "owner-31667@example.com",
"full_name": "FirstName62178 LastName62179",
"id": "00000000-0000-0000-0000-000000bb00ed",
"role": {
"id": "00000000-0000-0000-0000-000000b9c56c",
"name": "Admin 31048"
}
},
"delivery_datetime": "2020-01-01T00:00:00.000000Z",
"due_datetime": "2020-01-01T00:00:01.000000Z",
"external_notes": null,
"id": "21cf795d-03ea-4cac-85b8-34acdeb5f76d",
"inserted_datetime": "2025-01-14T21:41:39.116784Z",
"internal_notes": null,
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338abf",
"name": "B1"
},
"compliance_quantity": null,
"id": "5706eb10-3fc3-494f-a33d-830005fe3ff0",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008deaa0",
"id": "00000000-0000-0000-0000-000000387485",
"license_id": "00000000-0000-0000-0000-000000248479",
"name": "Place 9784"
},
"package": null,
"price": "10.000000000",
"price_base": "10.000000000",
"product": {
"id": "eb69f585-5cd2-408a-8840-a46ddc0f9cd9",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:41:38.985169Z"
},
"quantity": "1.000000000"
}
],
"order_datetime": "2020-01-01T00:00:02.000000Z",
"order_number": "SO-0000002",
"owner": null,
"shipping_location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008deaa0",
"id": "00000000-0000-0000-0000-000000387485",
"license_id": "00000000-0000-0000-0000-000000248479",
"name": "Place 9784"
},
"status": "PROCESSING",
"total": "10.00",
"updated_datetime": "2025-01-14T21:41:39.116784Z"
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1MjYsImlhdCI6MTczNjg5MDkyNiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiZDc5ZGMzN2YtZTM5Ni00NjJmLTk1MDktNzYzMDJmNzY1Yzk0IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTI1LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjAyNzMiLCJ0eXAiOiJhY2Nlc3MifQ.57Ry7m-m8MWG8SXdMxXPUso87Twe7cHZXAbhrZ-2eeI
{
"billing_location_id": "00000000-0000-0000-0000-000000387aab",
"charges": [],
"company_id": "00000000-0000-0000-0000-00000053dcbd",
"delivery_datetime": "2020-01-01T00:00:00.000000Z",
"due_datetime": "2020-01-01T00:00:01.000000Z",
"items": [
{
"location_id": "00000000-0000-0000-0000-000000387aab",
"position": 1,
"price_base": "100.000000000",
"product_id": "9dad5d29-7c8a-43f3-9239-2357eb3c8976",
"quantity": "80.000000000"
},
{
"location_id": "00000000-0000-0000-0000-000000387aab",
"position": 2,
"price_base": "200.000000000",
"product_id": "9dad5d29-7c8a-43f3-9239-2357eb3c8976",
"quantity": "10.000000000"
},
{
"location_id": "00000000-0000-0000-0000-000000387aab",
"position": 3,
"price_base": "300.000000000",
"product_id": "d634665c-82d3-4f1b-a4ae-9c94a77b33e5",
"quantity": "20.000000000"
}
],
"order_datetime": "2020-01-01T00:00:02.000000Z",
"shipping_location_id": "00000000-0000-0000-0000-000000387aab",
"status": "PROCESSING"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 9a1b039cd1a8d8000000000000000001-e0542c1006cb57c0-0
{
"data": {
"billing_location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dfa2c",
"id": "00000000-0000-0000-0000-000000387aab",
"license_id": "00000000-0000-0000-0000-0000002487a4",
"name": "Place 11352"
},
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053dcbd",
"name": "Company 27428",
"updated_datetime": "2025-01-14T21:42:06.186559Z"
},
"creator": {
"banned": false,
"email": "owner-36635@example.com",
"full_name": "FirstName71748 LastName71749",
"id": "00000000-0000-0000-0000-000000bb13b1",
"role": {
"id": "00000000-0000-0000-0000-000000b9d836",
"name": "Admin 35832"
}
},
"delivery_datetime": "2020-01-01T00:00:00.000000Z",
"due_datetime": "2020-01-01T00:00:01.000000Z",
"external_notes": null,
"id": "6ac30bec-e910-4bc5-b68e-66314cac4711",
"inserted_datetime": "2025-01-14T21:42:06.523120Z",
"internal_notes": null,
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033905c",
"name": "B1"
},
"compliance_quantity": null,
"id": "9108e328-7ffb-4b1f-a155-74d470fa0b55",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dfa2c",
"id": "00000000-0000-0000-0000-000000387aab",
"license_id": "00000000-0000-0000-0000-0000002487a4",
"name": "Place 11352"
},
"package": null,
"price": "80.000000000",
"price_base": "100.000000000",
"product": {
"id": "9dad5d29-7c8a-43f3-9239-2357eb3c8976",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:42:06.273685Z"
},
"quantity": "80.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033905c",
"name": "B1"
},
"compliance_quantity": null,
"id": "c0199085-587b-499f-8301-86251a7ee31d",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dfa2c",
"id": "00000000-0000-0000-0000-000000387aab",
"license_id": "00000000-0000-0000-0000-0000002487a4",
"name": "Place 11352"
},
"package": null,
"price": "180.000000000",
"price_base": "200.000000000",
"product": {
"id": "9dad5d29-7c8a-43f3-9239-2357eb3c8976",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:42:06.273685Z"
},
"quantity": "10.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033905d",
"name": "B2"
},
"compliance_quantity": null,
"id": "28bd6fc8-4865-4149-ad3a-040b9d6c6a0d",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dfa2c",
"id": "00000000-0000-0000-0000-000000387aab",
"license_id": "00000000-0000-0000-0000-0000002487a4",
"name": "Place 11352"
},
"package": null,
"price": "270.000000000",
"price_base": "300.000000000",
"product": {
"id": "d634665c-82d3-4f1b-a4ae-9c94a77b33e5",
"name": "P2",
"sku": "SKU2",
"updated_datetime": "2025-01-14T21:42:06.341182Z"
},
"quantity": "20.000000000"
}
],
"order_datetime": "2020-01-01T00:00:02.000000Z",
"order_number": "SO-0000002",
"owner": null,
"shipping_location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dfa2c",
"id": "00000000-0000-0000-0000-000000387aab",
"license_id": "00000000-0000-0000-0000-0000002487a4",
"name": "Place 11352"
},
"status": "PROCESSING",
"total": "13600.00",
"updated_datetime": "2025-01-14T21:42:06.599014Z"
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1MDIsImlhdCI6MTczNjg5MDkwMiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYjBkNmJmMzYtYmVkOS00ZjcxLWEwYTAtMDVhNjlhOGQxMzNlIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTAxLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTYyMjYiLCJ0eXAiOiJhY2Nlc3MifQ.jHxQe7bKw3kE17zMhUeHvw6nVShzmAUaG2YPuEvNk_M
{
"due_datetime": "2020-01-01T00:00:01.000000Z",
"items": [
{
"batch_id": "00000000-0000-0000-0000-000000338bab",
"location_id": "00000000-0000-0000-0000-000000387582",
"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: 27e662df18745a000000000000000001-b425e2e9111071ee-0
{
"data": {
"billing_location": null,
"charges": [],
"company": null,
"creator": {
"banned": false,
"email": "user1@a.com",
"full_name": "John Foo",
"id": "00000000-0000-0000-0000-000000bb03e2",
"role": {
"id": "00000000-0000-0000-0000-000000b9c862",
"name": "Admin 31806"
}
},
"delivery_datetime": null,
"due_datetime": "2020-01-01T00:00:01.000000Z",
"external_notes": null,
"id": "6f843803-b1b0-40e6-b3c3-529911080f74",
"inserted_datetime": "2025-01-14T21:41:42.884443Z",
"internal_notes": null,
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338bab",
"name": "B1"
},
"compliance_quantity": null,
"id": "36574c1c-ce50-47fc-86ff-3474e503d947",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ded39",
"id": "00000000-0000-0000-0000-000000387582",
"license_id": "00000000-0000-0000-0000-0000002484f8",
"name": "Place 10037"
},
"package": null,
"price": "10.000000000",
"price_base": "10.000000000",
"product": {
"id": "7607f9c0-a0b6-4528-abca-b537e75d198a",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:41:42.807441Z"
},
"quantity": "1.000000000"
}
],
"order_datetime": "2020-01-01T00:00:02.000000Z",
"order_number": "SO-0000002",
"owner": null,
"shipping_location": null,
"status": "PROCESSING",
"total": "10.00",
"updated_datetime": "2025-01-14T21:41:42.884443Z"
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1MTcsImlhdCI6MTczNjg5MDkxNywiaXNzIjoiRGlzdHJ1IiwianRpIjoiNTkwYzkyOWMtZDJmMi00Y2U1LWEzZDYtM2YzNmFhMjc0NWRhIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTE2LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTkwMjAiLCJ0eXAiOiJhY2Nlc3MifQ.lnA3lDFniw2TzggJ616oLc6aw2nwtj6_6qzuDTVy0_0
{
"due_datetime": "2020-01-01T00:00:01.000000Z",
"items": [
{
"location_id": "00000000-0000-0000-0000-000000387926",
"price_base": "10.000000000",
"product_id": "18df45ec-4e26-4ae1-89e1-bb20c2fea982",
"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: 563ba998d9d4b8000000000000000001-f942866113613c3f-0
{
"data": {
"billing_location": null,
"charges": [],
"company": null,
"creator": {
"banned": false,
"email": "user1@a.com",
"full_name": "John Foo",
"id": "00000000-0000-0000-0000-000000bb0ecc",
"role": {
"id": "00000000-0000-0000-0000-000000b9d345",
"name": "Admin 34581"
}
},
"delivery_datetime": null,
"due_datetime": "2020-01-01T00:00:01.000000Z",
"external_notes": null,
"id": "fbc84ac1-e774-4ea9-9316-c945366851b4",
"inserted_datetime": "2025-01-14T21:41:57.952246Z",
"internal_notes": null,
"items": [
{
"batch": null,
"compliance_quantity": null,
"id": "a975c74b-3ea4-414e-9dec-eb9a6af47571",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008df5ef",
"id": "00000000-0000-0000-0000-000000387926",
"license_id": "00000000-0000-0000-0000-0000002486d0",
"name": "Place 10966"
},
"package": null,
"price": "10.000000000",
"price_base": "10.000000000",
"product": {
"id": "18df45ec-4e26-4ae1-89e1-bb20c2fea982",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:41:57.905003Z"
},
"quantity": "1.000000000"
}
],
"order_datetime": "2020-01-01T00:00:02.000000Z",
"order_number": "SO-0000002",
"owner": null,
"shipping_location": null,
"status": "PROCESSING",
"total": "10.00",
"updated_datetime": "2025-01-14T21:41:57.952246Z"
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1MTksImlhdCI6MTczNjg5MDkxOSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYTM2NDU1YjctN2YwNy00MmJjLTlhMzctMWQzZDFlMWVlZjVlIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTE4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTkyMzIiLCJ0eXAiOiJhY2Nlc3MifQ.XNg-ohB8vd2Fjqn49QIlfbzvbqPSaaDqt8DBtYXd0Qw
{
"due_datetime": "2020-01-01T00:00:01.000000Z",
"items": [
{
"compliance_quantity": "1.0000",
"location_id": "00000000-0000-0000-0000-000000387977",
"package_id": "00000000-0000-0000-0000-000000128442",
"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: 97bab9545c0e78000000000000000001-3ab7748780177415-0
{
"data": {
"billing_location": null,
"charges": [],
"company": null,
"creator": {
"banned": false,
"email": "owner-35520@example.com",
"full_name": "FirstName69678 LastName69679",
"id": "00000000-0000-0000-0000-000000bb0fa0",
"role": {
"id": "00000000-0000-0000-0000-000000b9d41a",
"name": "Admin 34792"
}
},
"delivery_datetime": null,
"due_datetime": "2020-01-01T00:00:01.000000Z",
"external_notes": null,
"id": "05b01dab-eca6-4cf5-815c-4fbaa6145769",
"inserted_datetime": "2025-01-14T21:41:59.412502Z",
"internal_notes": null,
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338f2d",
"name": "B1"
},
"compliance_quantity": "1.0000",
"id": "a9c86ba1-26e4-4f17-8bb0-fb1dac361283",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008df6e6",
"id": "00000000-0000-0000-0000-000000387977",
"license_id": "00000000-0000-0000-0000-0000002486eb",
"name": "Place 11047"
},
"package": {
"batch_number": "B1",
"compliance_label": "ABCDEF012345670000011151",
"id": "00000000-0000-0000-0000-000000128442",
"metrc_label": "ABCDEF012345670000011151",
"status": "selling"
},
"price": "10.000000000",
"price_base": "10.000000000",
"product": {
"id": "6f80f701-2e46-4887-ab47-7c48acdd3c03",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:41:59.178015Z"
},
"quantity": "1.000000000"
}
],
"order_datetime": "2020-01-01T00:00:02.000000Z",
"order_number": "SO-0000002",
"owner": null,
"shipping_location": null,
"status": "PROCESSING",
"total": "10.00",
"updated_datetime": "2025-01-14T21:41:59.412502Z"
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1MjEsImlhdCI6MTczNjg5MDkyMSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiZjEzNTc5OTMtMDNmOS00NTFjLWIwZjAtYTMxMmM5NzQ5ZTY3IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTIwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTk2NTYiLCJ0eXAiOiJhY2Nlc3MifQ.6zJ6DpFvRRjXEg5ImhCKy6gATevwLhjAVkCZb27CW1k
{
"due_datetime": "2020-01-01T00:00:01.000000Z",
"items": [
{
"location_id": "00000000-0000-0000-0000-000000387a10",
"price_base": "10.000000000",
"product_id": "da094f13-3cc3-4eb0-82e3-8fb03c17ca21",
"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: a76c5b9b54ba28000000000000000001-000334df9574f877-0
{
"data": {
"billing_location": null,
"charges": [],
"company": null,
"creator": {
"banned": false,
"email": "user1@a.com",
"full_name": "John Foo",
"id": "00000000-0000-0000-0000-000000bb1148",
"role": {
"id": "00000000-0000-0000-0000-000000b9d5c7",
"name": "Admin 35217"
}
},
"delivery_datetime": null,
"due_datetime": "2020-01-01T00:00:01.000000Z",
"external_notes": null,
"id": "9728f515-e0ba-48cd-a97d-19782d38389b",
"inserted_datetime": "2025-01-14T21:42:01.733380Z",
"internal_notes": null,
"items": [
{
"batch": null,
"compliance_quantity": null,
"id": "6fe3a45c-d3ab-4eed-9e6e-677cfda3c393",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008df854",
"id": "00000000-0000-0000-0000-000000387a10",
"license_id": "00000000-0000-0000-0000-000000248736",
"name": "Place 11200"
},
"package": null,
"price": "10.000000000",
"price_base": "10.000000000",
"product": {
"id": "da094f13-3cc3-4eb0-82e3-8fb03c17ca21",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:42:01.652356Z"
},
"quantity": "1.000000000"
}
],
"order_datetime": "2020-01-01T00:00:02.000000Z",
"order_number": "SO-0000002",
"owner": null,
"shipping_location": null,
"status": "PROCESSING",
"total": "10.00",
"updated_datetime": "2025-01-14T21:42:01.733380Z"
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1MDMsImlhdCI6MTczNjg5MDkwMywiaXNzIjoiRGlzdHJ1IiwianRpIjoiMmJiNzliNDgtYTVhNi00ZmU0LTkzMGItYTYxOTI4Y2Y2YjJiIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTAyLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTY0MTUiLCJ0eXAiOiJhY2Nlc3MifQ.oWqSZhjfKqfmdc9puywl4xpIWVnXw0RDj3u6Y5wJTrs
{
"billing_location_id": "00000000-0000-0000-0000-0000003875c5",
"charges": [],
"company_id": "00000000-0000-0000-0000-00000053d51a",
"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": "5b26665c-13f0-42e0-aa3c-fcfd55b36096",
"location_id": "00000000-0000-0000-0000-0000003875c5",
"package_id": "00000000-0000-0000-0000-000000128355",
"price_base": "10.000000000",
"quantity": "1.000000000"
}
],
"location_id": "00000000-0000-0000-0000-0000003875c5",
"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-000000bb049f",
"shipping_location_id": "00000000-0000-0000-0000-0000003875c5",
"status": "PROCESSING"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: eafa777d344cd0000000000000000001-a864a113096a208e-0
{
"data": {
"billing_location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dede6",
"id": "00000000-0000-0000-0000-0000003875c5",
"license_id": "00000000-0000-0000-0000-000000248517",
"name": "Place 10104"
},
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053d51a",
"name": "Company 24318",
"updated_datetime": "2025-01-14T21:41:43.479653Z"
},
"creator": {
"banned": false,
"email": "user1@a.com",
"full_name": "John Foo",
"id": "00000000-0000-0000-0000-000000bb049f",
"role": {
"id": "00000000-0000-0000-0000-000000b9c923",
"name": "Admin 31999"
}
},
"delivery_datetime": "2020-01-01T00:00:00.000000Z",
"due_datetime": "2020-01-01T00:00:01.000000Z",
"external_notes": null,
"id": "8694fa86-1ed9-4190-b4f7-ff4e31e38330",
"inserted_datetime": "2025-01-14T21:41:43.985368Z",
"internal_notes": null,
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338bdb",
"name": "B2"
},
"compliance_quantity": "1.0000",
"id": "5b26665c-13f0-42e0-aa3c-fcfd55b36096",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dede6",
"id": "00000000-0000-0000-0000-0000003875c5",
"license_id": "00000000-0000-0000-0000-000000248517",
"name": "Place 10104"
},
"package": {
"batch_number": "B1",
"compliance_label": "ABCDEF012345670000010284",
"id": "00000000-0000-0000-0000-000000128355",
"metrc_label": "ABCDEF012345670000010284",
"status": "selling"
},
"price": "10.000000000",
"price_base": "10.000000000",
"product": {
"id": "52efb188-d15c-4262-9974-145f8f6072ed",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:41:43.528352Z"
},
"quantity": "1.000000000"
}
],
"order_datetime": "2020-01-01T00:00:02.000000Z",
"order_number": "SO-0000002",
"owner": {
"banned": false,
"email": "user1@a.com",
"full_name": "John Foo",
"id": "00000000-0000-0000-0000-000000bb049f",
"role": {
"id": "00000000-0000-0000-0000-000000b9c923",
"name": "Admin 31999"
}
},
"shipping_location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dede6",
"id": "00000000-0000-0000-0000-0000003875c5",
"license_id": "00000000-0000-0000-0000-000000248517",
"name": "Place 10104"
},
"status": "PROCESSING",
"total": "10.00",
"updated_datetime": "2025-01-14T21:41:44.218567Z"
}
}
POST /public/v1/orders updates an order
POST /public/v1/orders
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1MjcsImlhdCI6MTczNjg5MDkyNywiaXNzIjoiRGlzdHJ1IiwianRpIjoiODA2MGRkZWQtOGI0Yy00ZDM3LWI3NWUtM2QzNDI1YWUwNzdhIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTI2LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjA1MTIiLCJ0eXAiOiJhY2Nlc3MifQ.thyswcDbhF-Q0TekHWNLkxc40r3b3TqldrTDSVDH2qk
{
"billing_location_id": "00000000-0000-0000-0000-000000387b02",
"charges": [
{
"id": "82dab730-e7cf-474e-b604-bf8580b025f4",
"name": "C1",
"percent": "10.0000",
"type": "CHARGE",
"unit_type": "PERCENT"
},
{
"id": "8c782373-7b14-48e7-9ce4-777732f5064a",
"name": "C2",
"price": "-5.00",
"type": "DISCOUNT",
"unit_type": "PRICE"
}
],
"company_id": "00000000-0000-0000-0000-00000053dd2a",
"delivery_datetime": "2020-01-01T00:00:00.000000Z",
"due_datetime": "2020-01-01T00:00:01.000000Z",
"external_notes": "gonna make you sweat",
"id": "fc2787e2-35fc-4470-af70-6119f3256528",
"items": [
{
"id": "c0966d20-20a1-4414-b23a-32af6f8df426",
"location_id": "00000000-0000-0000-0000-000000387b02",
"price_base": "10.000000000",
"product_id": "cb5ff6ea-d64c-4b2b-9c3e-4de9de1fc878",
"quantity": "2.000000000"
},
{
"id": "0f8a60aa-d770-4ac0-9a03-1314c48527f4",
"location_id": "00000000-0000-0000-0000-000000387b02",
"price_base": "100.000000000",
"product_id": "cb5ff6ea-d64c-4b2b-9c3e-4de9de1fc878",
"quantity": "3.000000000"
},
{
"compliance_quantity": "1.0000",
"id": "d42c8ab6-d9b6-468a-bf3d-f0eaea96e3cd",
"location_id": "00000000-0000-0000-0000-000000387b02",
"package_id": "00000000-0000-0000-0000-0000001284ab",
"price_base": "10.000000000",
"quantity": "1.000000000"
}
],
"location_id": "00000000-0000-0000-0000-000000387b02",
"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-000000bb14de",
"shipping_location_id": "00000000-0000-0000-0000-000000387b02",
"status": "PROCESSING"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 3a7b3448c8deb4000000000000000001-2514b262b3228b23-0
{
"data": {
"billing_location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dfaed",
"id": "00000000-0000-0000-0000-000000387b02",
"license_id": "00000000-0000-0000-0000-0000002487d0",
"name": "Place 11439"
},
"charges": [
{
"id": "82dab730-e7cf-474e-b604-bf8580b025f4",
"name": "C1",
"percent": "10.0000",
"price": "33.00",
"type": "CHARGE",
"unit_type": "PERCENT"
},
{
"id": "8c782373-7b14-48e7-9ce4-777732f5064a",
"name": "C2",
"percent": null,
"price": "-5.00",
"type": "DISCOUNT",
"unit_type": "PRICE"
}
],
"company": {
"id": "00000000-0000-0000-0000-00000053dd2a",
"name": "Company 27622",
"updated_datetime": "2025-01-14T21:42:07.454995Z"
},
"creator": {
"banned": false,
"email": "user1@a.com",
"full_name": "John Foo",
"id": "00000000-0000-0000-0000-000000bb149e",
"role": {
"id": "00000000-0000-0000-0000-000000b9d924",
"name": "Admin 36066"
}
},
"delivery_datetime": "2020-01-01T00:00:00.000000Z",
"due_datetime": "2020-01-01T00:00:01.000000Z",
"external_notes": "gonna make you sweat",
"id": "fc2787e2-35fc-4470-af70-6119f3256528",
"inserted_datetime": "2025-01-14T21:42:07.566177Z",
"internal_notes": null,
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-0000003390af",
"name": "B1"
},
"compliance_quantity": null,
"id": "c0966d20-20a1-4414-b23a-32af6f8df426",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dfaed",
"id": "00000000-0000-0000-0000-000000387b02",
"license_id": "00000000-0000-0000-0000-0000002487d0",
"name": "Place 11439"
},
"package": null,
"price": "10.000000000",
"price_base": "10.000000000",
"product": {
"id": "cb5ff6ea-d64c-4b2b-9c3e-4de9de1fc878",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:42:07.516914Z"
},
"quantity": "2.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-0000003390af",
"name": "B1"
},
"compliance_quantity": null,
"id": "0f8a60aa-d770-4ac0-9a03-1314c48527f4",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dfaed",
"id": "00000000-0000-0000-0000-000000387b02",
"license_id": "00000000-0000-0000-0000-0000002487d0",
"name": "Place 11439"
},
"package": null,
"price": "100.000000000",
"price_base": "100.000000000",
"product": {
"id": "cb5ff6ea-d64c-4b2b-9c3e-4de9de1fc878",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:42:07.516914Z"
},
"quantity": "3.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-0000003390bc",
"name": "B2"
},
"compliance_quantity": "1.0000",
"id": "d42c8ab6-d9b6-468a-bf3d-f0eaea96e3cd",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dfaed",
"id": "00000000-0000-0000-0000-000000387b02",
"license_id": "00000000-0000-0000-0000-0000002487d0",
"name": "Place 11439"
},
"package": {
"batch_number": "B2",
"compliance_label": "ABCDEF012345670000011458",
"id": "00000000-0000-0000-0000-0000001284ab",
"metrc_label": "ABCDEF012345670000011458",
"status": "selling"
},
"price": "10.000000000",
"price_base": "10.000000000",
"product": {
"id": "bdd0b8d6-7e22-411f-b432-a4a41efa7795",
"name": "P2",
"sku": "SKU2",
"updated_datetime": "2025-01-14T21:42:07.622971Z"
},
"quantity": "1.000000000"
}
],
"order_datetime": "2020-01-01T00:00:02.000000Z",
"order_number": "SO-2193",
"owner": {
"banned": false,
"email": "owner-36933@example.com",
"full_name": "FirstName72342 LastName72343",
"id": "00000000-0000-0000-0000-000000bb14de",
"role": {
"id": "00000000-0000-0000-0000-000000b9d964",
"name": "Admin 36129"
}
},
"shipping_location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dfaed",
"id": "00000000-0000-0000-0000-000000387b02",
"license_id": "00000000-0000-0000-0000-0000002487d0",
"name": "Place 11439"
},
"status": "PROCESSING",
"total": "358.00",
"updated_datetime": "2025-01-14T21:42:08.039090Z"
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1MTgsImlhdCI6MTczNjg5MDkxOCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYzg5YTk0OTUtZmExMi00ZjFlLWE5NmQtOThlNDU3YWE3ZGUxIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTE3LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTkwNzUiLCJ0eXAiOiJhY2Nlc3MifQ.BDXl4G8ocLh5IpB8Fhl1A5Sk7Km9PpFYpGn4h2N-iBQ
{
"billing_location_id": "00000000-0000-0000-0000-00000038793c",
"charges": [],
"company_id": "00000000-0000-0000-0000-00000053da81",
"delivery_datetime": "2020-01-01T00:00:00.000000Z",
"due_datetime": "2020-01-01T00:00:01.000000Z",
"items": [
{
"location_id": "00000000-0000-0000-0000-00000038793c",
"position": 1,
"price_base": "100.000000000",
"product_id": "294c8ade-7d4a-41ad-879b-d26cdc91f02c",
"quantity": "10.000000000"
},
{
"location_id": "00000000-0000-0000-0000-00000038793c",
"position": 2,
"price_base": "200.000000000",
"product_id": "adff73f2-9df6-4f36-9117-ef6e7b64712e",
"quantity": "10.000000000"
},
{
"location_id": "00000000-0000-0000-0000-00000038793c",
"position": 3,
"price_base": "300.000000000",
"product_id": "34472d34-34ad-4b90-ab5b-3838af7ff0e8",
"quantity": "10.000000000"
}
],
"order_datetime": "2020-01-01T00:00:02.000000Z",
"shipping_location_id": "00000000-0000-0000-0000-00000038793c",
"status": "PROCESSING"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 60ceffa4f499bc000000000000000001-187b03ab63914817-0
{
"data": {
"billing_location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008df630",
"id": "00000000-0000-0000-0000-00000038793c",
"license_id": "00000000-0000-0000-0000-0000002486da",
"name": "Place 10989"
},
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053da81",
"name": "Company 26420",
"updated_datetime": "2025-01-14T21:41:58.177346Z"
},
"creator": {
"banned": false,
"email": "owner-35324@example.com",
"full_name": "FirstName69306 LastName69307",
"id": "00000000-0000-0000-0000-000000bb0f03",
"role": {
"id": "00000000-0000-0000-0000-000000b9d37c",
"name": "Admin 34636"
}
},
"delivery_datetime": "2020-01-01T00:00:00.000000Z",
"due_datetime": "2020-01-01T00:00:01.000000Z",
"external_notes": null,
"id": "312193e0-994e-43a8-8153-26c36c963b5c",
"inserted_datetime": "2025-01-14T21:41:58.593150Z",
"internal_notes": null,
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338ef5",
"name": "B1"
},
"compliance_quantity": null,
"id": "dbe56cfa-7869-4799-95e7-1faa251ed202",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008df630",
"id": "00000000-0000-0000-0000-00000038793c",
"license_id": "00000000-0000-0000-0000-0000002486da",
"name": "Place 10989"
},
"package": null,
"price": "90.000000000",
"price_base": "100.000000000",
"product": {
"id": "294c8ade-7d4a-41ad-879b-d26cdc91f02c",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:41:58.291844Z"
},
"quantity": "10.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338efd",
"name": "B2"
},
"compliance_quantity": null,
"id": "841fbc74-ed23-4f2a-ae09-9a5ac9c8695c",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008df630",
"id": "00000000-0000-0000-0000-00000038793c",
"license_id": "00000000-0000-0000-0000-0000002486da",
"name": "Place 10989"
},
"package": null,
"price": "200.000000000",
"price_base": "200.000000000",
"product": {
"id": "adff73f2-9df6-4f36-9117-ef6e7b64712e",
"name": "P2",
"sku": "SKU2",
"updated_datetime": "2025-01-14T21:41:58.356721Z"
},
"quantity": "10.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338f04",
"name": "B3"
},
"compliance_quantity": null,
"id": "9e4f4160-22b8-4b65-9306-94ee93fd0411",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008df630",
"id": "00000000-0000-0000-0000-00000038793c",
"license_id": "00000000-0000-0000-0000-0000002486da",
"name": "Place 10989"
},
"package": null,
"price": "290.000000000",
"price_base": "300.000000000",
"product": {
"id": "34472d34-34ad-4b90-ab5b-3838af7ff0e8",
"name": "P3",
"sku": "SKU3",
"updated_datetime": "2025-01-14T21:41:58.427407Z"
},
"quantity": "10.000000000"
}
],
"order_datetime": "2020-01-01T00:00:02.000000Z",
"order_number": "SO-0000002",
"owner": null,
"shipping_location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008df630",
"id": "00000000-0000-0000-0000-00000038793c",
"license_id": "00000000-0000-0000-0000-0000002486da",
"name": "Place 10989"
},
"status": "PROCESSING",
"total": "5800.00",
"updated_datetime": "2025-01-14T21:41:58.674428Z"
}
}
POST /public/v1/orders deleting order items & charges
POST /public/v1/orders
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1MjUsImlhdCI6MTczNjg5MDkyNSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiOGZmZGJmNjQtZjQyMS00OGJlLTg5ZWEtZjM3NWI3YTIwNjNlIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTI0LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjAxNjYiLCJ0eXAiOiJhY2Nlc3MifQ.Xu30T0UHb3iQpZJ8kdxmYjSnJ5SiYj6bJa1RUoIqlAA
{
"billing_location_id": "00000000-0000-0000-0000-000000387a86",
"charges": [],
"company_id": "00000000-0000-0000-0000-00000053dc98",
"delivery_datetime": "2020-01-01T00:00:00.000000Z",
"due_datetime": "2020-01-01T00:00:01.000000Z",
"id": "a8e8dd9a-86fb-472a-8ef1-71f64bb68de4",
"items": [
{
"id": "6725f437-d38d-4a2a-ac23-de2e0fd70b0b",
"location_id": "00000000-0000-0000-0000-000000387a86",
"price_base": "10.000000000",
"product_id": "57caa3b1-cbfc-451f-b3fd-be58238e5d9a",
"quantity": "1.000000000"
}
],
"order_datetime": "2020-01-01T00:00:02.000000Z",
"shipping_location_id": "00000000-0000-0000-0000-000000387a86",
"status": "PROCESSING"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: f1c4724cf60d00000000000000000001-c5d0ac4bf7446129-0
{
"data": {
"billing_location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008df9dc",
"id": "00000000-0000-0000-0000-000000387a86",
"license_id": "00000000-0000-0000-0000-000000248787",
"name": "Place 11318"
},
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053dc98",
"name": "Company 27350",
"updated_datetime": "2025-01-14T21:42:05.479226Z"
},
"creator": {
"banned": false,
"email": "user1@a.com",
"full_name": "John Foo",
"id": "00000000-0000-0000-0000-000000bb1346",
"role": {
"id": "00000000-0000-0000-0000-000000b9d7c9",
"name": "Admin 35725"
}
},
"delivery_datetime": "2020-01-01T00:00:00.000000Z",
"due_datetime": "2020-01-01T00:00:01.000000Z",
"external_notes": null,
"id": "a8e8dd9a-86fb-472a-8ef1-71f64bb68de4",
"inserted_datetime": "2025-01-14T21:42:05.661175Z",
"internal_notes": null,
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000339045",
"name": "B1"
},
"compliance_quantity": null,
"id": "6725f437-d38d-4a2a-ac23-de2e0fd70b0b",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008df9dc",
"id": "00000000-0000-0000-0000-000000387a86",
"license_id": "00000000-0000-0000-0000-000000248787",
"name": "Place 11318"
},
"package": null,
"price": "10.000000000",
"price_base": "10.000000000",
"product": {
"id": "57caa3b1-cbfc-451f-b3fd-be58238e5d9a",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:42:05.594506Z"
},
"quantity": "1.000000000"
}
],
"order_datetime": "2020-01-01T00:00:02.000000Z",
"order_number": "SO-2160",
"owner": null,
"shipping_location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008df9dc",
"id": "00000000-0000-0000-0000-000000387a86",
"license_id": "00000000-0000-0000-0000-000000248787",
"name": "Place 11318"
},
"status": "PROCESSING",
"total": "10.00",
"updated_datetime": "2025-01-14T21:42:05.896694Z"
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1NjgsImlhdCI6MTczNjg5MDk2OCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYmE5YTRiMWYtMGMxNy00OTgzLWI0YTQtNzlhMDA1MmJkYzRlIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTY3LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjcwNzgiLCJ0eXAiOiJhY2Nlc3MifQ.VGI2ilGtA1oBUYC4XyHjvxJmMzBvszBy6vpKMqoQMeY
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 57733e2c4f23e0000000000000000001-403c50d4fc04bae9-0
{
"data": [
{
"batch_number": null,
"compliance_label": "ABCDEF012345670000079291",
"expiration_date": "2024-01-01T00:00:00.000000Z",
"id": "00000000-0000-0000-0000-0000001286c3",
"license": {
"id": "00000000-0000-0000-0000-000000248d16",
"license_number": "CDPH-00009479"
},
"location": {
"id": "00000000-0000-0000-0000-00000038829b",
"name": "Place 13380"
},
"metrc_label": "ABCDEF012345670000079291",
"primary_test_result": null,
"product_id": "563a555e-a1f8-499f-ad14-2dc150e86eed",
"quantity": "1.000000000",
"quantity_assembling": "0.000000000",
"quantity_available": "1.000000000",
"status": "active",
"unit_type": {
"id": "00000000-0000-0000-0000-000007df6aec",
"name": "Ounce"
}
},
{
"batch_number": null,
"compliance_label": "ABCDEF012345670000079315",
"expiration_date": null,
"id": "00000000-0000-0000-0000-0000001286ce",
"license": {
"id": "00000000-0000-0000-0000-000000248d16",
"license_number": "CDPH-00009479"
},
"location": {
"id": "00000000-0000-0000-0000-0000003882aa",
"name": "Place 13395"
},
"metrc_label": "ABCDEF012345670000079315",
"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": "ca21fbf9-3f82-4f0f-85ca-b0d0d31c4ca4",
"quantity": "1.000000000",
"quantity_assembling": "0.000000000",
"quantity_available": "1.000000000",
"status": "active",
"unit_type": {
"id": "00000000-0000-0000-0000-000007df6aec",
"name": "Ounce"
}
}
]
}
Get packages sorted by their creation date and filtered by various attributes
Note: The page size for this endpoint is 50,000 packages per page.
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0MjEsImlhdCI6MTczNjg5MDgyMSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiN2I5MDA5OWMtYmMyMC00ZWYwLWFlZTYtNGMyYWIyYzBlMTUwIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODIwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNDA1MTIiLCJ0eXAiOiJhY2Nlc3MifQ.aTs_5gmHhTKDS-FUn-j8yBh6wF6yg5XL_jeV8TFFLnc
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 3e7c8fdf76f8ec000000000000000001-449a0ea1eaf8b6e4-0
{
"data": [
{
"id": "00000000-0000-0000-0000-00000000fc38",
"name": "Payment Method 156"
}
]
}
Get payment methods
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1ODIsImlhdCI6MTczNjg5MDk4MiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiY2NlOTQ3MzQtN2YyZC00Nzg3LTg0ZmEtZWExOGMyNjE5NjlmIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTgxLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjkzNjMiLCJ0eXAiOiJhY2Nlc3MifQ.dRs0oM6SPNDt6DVwB4xGetLxFPE0Y7qfpUyx7uWhBeQ
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 21eecb6a72aa3c000000000000000001-67f607cfeb03d1c7-0
{
"data": [
{
"brand": {
"id": "00000000-0000-0000-0000-00000053eb9b",
"name": "Company 34114",
"updated_datetime": "2030-11-01T00:00:00.000000Z"
},
"category": {
"id": "00000000-0000-0000-0000-0000004526bf",
"name": "Some category 13660",
"type": "OTHER"
},
"description": "test",
"id": "7f48d3ea-40d7-4769-b341-c1f46d3a18d4",
"images": [
{
"id": "00000000-0000-0000-0000-000000006411",
"name": "Image Name 601",
"rank": 0,
"url": "https://google.com/original-85.jpg"
},
{
"id": "00000000-0000-0000-0000-000000006412",
"name": "Image Name 602",
"rank": 1,
"url": "https://google.com/original-86.jpg"
}
],
"is_active": true,
"msrp": null,
"name": "Product 37887",
"sku": "sku 37888",
"strain": {
"id": "00000000-0000-0000-0000-000000015e0c",
"name": "Strain 365"
},
"subcategory": {
"id": "00000000-0000-0000-0000-000000456deb",
"name": "Some subcategory 13000"
},
"unit_price": "1",
"unit_type": {
"id": "00000000-0000-0000-0000-000007dfc0c5",
"name": "Gram"
},
"units_per_case": null,
"updated_datetime": "2023-11-01T00:00:00.000000Z",
"vendor": {
"id": "00000000-0000-0000-0000-00000053eba0",
"name": "Company 34121",
"updated_datetime": "2030-11-03T00:00:00.000000Z"
}
},
{
"brand": {
"id": "00000000-0000-0000-0000-00000053eb9e",
"name": "Company 34118",
"updated_datetime": "2030-11-02T00:00:00.000000Z"
},
"category": {
"id": "00000000-0000-0000-0000-0000004526c5",
"name": "Some category 13666",
"type": "OTHER"
},
"description": null,
"id": "bb1afdca-5a1a-4a25-8007-2629a7e3e8fb",
"images": [],
"is_active": false,
"msrp": "100",
"name": "Product 37898",
"sku": "sku 37899",
"strain": null,
"subcategory": {
"id": "00000000-0000-0000-0000-000000456df0",
"name": "Some subcategory 13005"
},
"unit_price": "1",
"unit_type": {
"id": "00000000-0000-0000-0000-000007dfc0c3",
"name": "Pound"
},
"units_per_case": null,
"updated_datetime": "2023-11-02T00:00:00.000000Z",
"vendor": {
"id": "00000000-0000-0000-0000-00000053eba3",
"name": "Company 34127",
"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 50,000 products per page.
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1ODEsImlhdCI6MTczNjg5MDk4MSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNmFmNzQxNGItOWM5MS00ZTc5LTkwOTItOTM4MjliNzFlZDVhIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTgwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjkyODgiLCJ0eXAiOiJhY2Nlc3MifQ.jLev1opjjCEr1igSo32cG-jDjBSK77k7blWK-a5uiEA
{
"brand_id": "00000000-0000-0000-0000-00000053eb83",
"category_id": "00000000-0000-0000-0000-0000004526a4",
"description": "My Product Description",
"group_id": "00000000-0000-0000-0000-00000038d624",
"id": "f5ce44c7-469f-4e96-886c-2a2910829b32",
"inventory_tracking_method": "PACKAGE",
"is_featured": true,
"is_inactive": true,
"menu_visibility": "INCLUDE_IN_ALL",
"menus": ["00000000-0000-0000-0000-00000001fe4b"],
"msrp": "100.5",
"name": "My Product",
"owner_id": "00000000-0000-0000-0000-000000bb36e6",
"quantity_available_threshold_max": "10.5",
"quantity_available_threshold_min": "5.5",
"sku": "12345",
"strain_id": "00000000-0000-0000-0000-000000015e08",
"subcategory_id": "00000000-0000-0000-0000-000000456dd2",
"tags": ["00000000-0000-0000-0000-0000000069ba"],
"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-000007dfbdf6",
"unit_price": "100",
"unit_serving_size": "2.2",
"unit_type_id": "00000000-0000-0000-0000-000007dfbdfd",
"units_per_case": "0.2",
"upc": "036000291452",
"vendor_id": "00000000-0000-0000-0000-00000053eb81",
"wholesale_unit_price": "90.50"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: fe23c16fd09480000000000000000001-a9497b07c7e678a1-0
{
"data": {
"brand": {
"id": "00000000-0000-0000-0000-00000053eb83",
"name": "Company 34071",
"updated_datetime": "2025-01-14T21:43:01.955757Z"
},
"category": {
"id": "00000000-0000-0000-0000-0000004526a4",
"name": "Some category 13633",
"type": "OTHER"
},
"description": "My Product Description",
"id": "f5ce44c7-469f-4e96-886c-2a2910829b32",
"images": [],
"is_active": false,
"msrp": "100.5",
"name": "My Product",
"sku": "12345",
"strain": {
"id": "00000000-0000-0000-0000-000000015e08",
"name": "Strain 361"
},
"subcategory": {
"id": "00000000-0000-0000-0000-000000456dd2",
"name": "Some subcategory 12975"
},
"unit_price": "100",
"unit_type": {
"id": "00000000-0000-0000-0000-000007dfbdfd",
"name": "Unit"
},
"units_per_case": "0.2",
"updated_datetime": "2025-01-14T21:43:02.105223Z",
"vendor": {
"id": "00000000-0000-0000-0000-00000053eb81",
"name": "Company 34064",
"updated_datetime": "2025-01-14T21:43:01.912499Z"
}
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1ODEsImlhdCI6MTczNjg5MDk4MSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiOTg5YWMyNmMtMzc4Zi00M2IxLTliYzAtZjdhMmU5MGIxOTY3IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTgwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjkxNTciLCJ0eXAiOiJhY2Nlc3MifQ.SGOd-heMgaln2SszF2mMC4qzfSMgzrvC8hDbeDSPOHg
{
"category_id": "00000000-0000-0000-0000-000000452684",
"id": "8e41668a-2e5b-4299-8f0e-1e4520124a17",
"inventory_tracking_method": "PACKAGE",
"name": "My Product",
"sku": "12345",
"unit_price": "100",
"unit_type_id": "00000000-0000-0000-0000-000007dfb959",
"upc": "036000291452",
"vendor_id": "00000000-0000-0000-0000-00000053eb52"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: f807eb9938e8e0000000000000000001-be006c3d30ea45e0-0
{
"data": {
"brand": null,
"category": {
"id": "00000000-0000-0000-0000-000000452684",
"name": "Some category 13601",
"type": "OTHER"
},
"description": null,
"id": "8e41668a-2e5b-4299-8f0e-1e4520124a17",
"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-000007dfb959",
"name": "Gram"
},
"units_per_case": null,
"updated_datetime": "2025-01-14T21:43:01.298822Z",
"vendor": {
"id": "00000000-0000-0000-0000-00000053eb52",
"name": "Company 33982",
"updated_datetime": "2025-01-14T21:43:01.193333Z"
}
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1ODEsImlhdCI6MTczNjg5MDk4MSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiOTg5YWMyNmMtMzc4Zi00M2IxLTliYzAtZjdhMmU5MGIxOTY3IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTgwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjkxNTciLCJ0eXAiOiJhY2Nlc3MifQ.SGOd-heMgaln2SszF2mMC4qzfSMgzrvC8hDbeDSPOHg
{
"brand_id": "00000000-0000-0000-0000-00000053eb67",
"category_id": "00000000-0000-0000-0000-000000452692",
"description": "My Product Description",
"group_id": "00000000-0000-0000-0000-00000038d611",
"id": "8e41668a-2e5b-4299-8f0e-1e4520124a17",
"inventory_tracking_method": "PACKAGE",
"is_featured": true,
"is_inactive": true,
"menu_visibility": "INCLUDE_IN_ALL",
"menus": ["00000000-0000-0000-0000-00000001fe49"],
"msrp": "100.5",
"name": "Updated Name",
"owner_id": "00000000-0000-0000-0000-000000bb36a8",
"quantity_available_threshold_max": "10.5",
"quantity_available_threshold_min": "5.5",
"sku": "45678",
"strain_id": "00000000-0000-0000-0000-000000015e07",
"subcategory_id": "00000000-0000-0000-0000-000000456dc0",
"tags": ["00000000-0000-0000-0000-0000000069b7"],
"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-000007dfb95b",
"unit_price": "200",
"unit_serving_size": "2.2",
"unit_type_id": "00000000-0000-0000-0000-000007dfb962",
"units_per_case": "0.2",
"upc": "036000291453",
"vendor_id": "00000000-0000-0000-0000-00000053eb64",
"wholesale_unit_price": "90.50"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: f807eb9938e8e0000000000000000001-012cb8b5fd1edbff-0
{
"data": {
"brand": {
"id": "00000000-0000-0000-0000-00000053eb67",
"name": "Company 34015",
"updated_datetime": "2025-01-14T21:43:01.511134Z"
},
"category": {
"id": "00000000-0000-0000-0000-000000452692",
"name": "Some category 13615",
"type": "OTHER"
},
"description": "My Product Description",
"id": "8e41668a-2e5b-4299-8f0e-1e4520124a17",
"images": [],
"is_active": false,
"msrp": "100.5",
"name": "Updated Name",
"sku": "45678",
"strain": {
"id": "00000000-0000-0000-0000-000000015e07",
"name": "Strain 360"
},
"subcategory": {
"id": "00000000-0000-0000-0000-000000456dc0",
"name": "Some subcategory 12957"
},
"unit_price": "200",
"unit_type": {
"id": "00000000-0000-0000-0000-000007dfb962",
"name": "Unit"
},
"units_per_case": "0.2",
"updated_datetime": "2025-01-14T21:43:01.596665Z",
"vendor": {
"id": "00000000-0000-0000-0000-00000053eb64",
"name": "Company 34008",
"updated_datetime": "2025-01-14T21:43:01.472293Z"
}
}
}
POST /public/v1/orders Menus act as expected
POST /public/v1/products
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1NzksImlhdCI6MTczNjg5MDk3OSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMjg2ZWQwZTctZDljOC00ZTg0LWFlYTktNzI5YzdiZTM1OTVmIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTc4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjg3NTQiLCJ0eXAiOiJhY2Nlc3MifQ.UI01-ddTy_b5khgQEnFfQrkguRhRca3Js9oH8e308f4
{
"category_id": "00000000-0000-0000-0000-000000452606",
"id": "61032f8e-e2a0-4e48-bc7a-befb50acf7fa",
"inventory_tracking_method": "PACKAGE",
"menu_visibility": "INCLUDE_IN_ALL",
"menus": ["00000000-0000-0000-0000-00000001fe36"],
"name": "My Product",
"sku": "12345",
"unit_price": "100",
"unit_type_id": "00000000-0000-0000-0000-000007dfaa78",
"upc": "036000291452",
"vendor_id": "00000000-0000-0000-0000-00000053eaa8"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 39b5031349445c000000000000000001-af106f3cf5daff46-0
{
"data": {
"brand": null,
"category": {
"id": "00000000-0000-0000-0000-000000452606",
"name": "Some category 13475",
"type": "OTHER"
},
"description": null,
"id": "61032f8e-e2a0-4e48-bc7a-befb50acf7fa",
"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-000007dfaa78",
"name": "Gram"
},
"units_per_case": null,
"updated_datetime": "2025-01-14T21:42:59.356574Z",
"vendor": {
"id": "00000000-0000-0000-0000-00000053eaa8",
"name": "Company 33703",
"updated_datetime": "2025-01-14T21:42:59.151962Z"
}
}
}
POST /public/v1/orders Menus act as expected
POST /public/v1/products
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1NzksImlhdCI6MTczNjg5MDk3OSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMjg2ZWQwZTctZDljOC00ZTg0LWFlYTktNzI5YzdiZTM1OTVmIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTc4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjg3NTQiLCJ0eXAiOiJhY2Nlc3MifQ.UI01-ddTy_b5khgQEnFfQrkguRhRca3Js9oH8e308f4
{
"category_id": "00000000-0000-0000-0000-000000452606",
"id": "61032f8e-e2a0-4e48-bc7a-befb50acf7fa",
"inventory_tracking_method": "PACKAGE",
"menu_visibility": "DO_NOT_INCLUDE",
"menus": [
"00000000-0000-0000-0000-00000001fe36",
"00000000-0000-0000-0000-00000001fe37"
],
"name": "My Product",
"sku": "12345",
"tags": [],
"unit_price": "100",
"unit_type_id": "00000000-0000-0000-0000-000007dfaa78",
"upc": "036000291452",
"vendor_id": "00000000-0000-0000-0000-00000053eaa8"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 39b5031349445c000000000000000001-fa5b22654f9069d8-0
{
"data": {
"brand": null,
"category": {
"id": "00000000-0000-0000-0000-000000452606",
"name": "Some category 13475",
"type": "OTHER"
},
"description": null,
"id": "61032f8e-e2a0-4e48-bc7a-befb50acf7fa",
"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-000007dfaa78",
"name": "Gram"
},
"units_per_case": null,
"updated_datetime": "2025-01-14T21:42:59.536985Z",
"vendor": {
"id": "00000000-0000-0000-0000-00000053eaa8",
"name": "Company 33703",
"updated_datetime": "2025-01-14T21:42:59.151962Z"
}
}
}
POST /public/v1/orders Menus act as expected
POST /public/v1/products
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1NzksImlhdCI6MTczNjg5MDk3OSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMjg2ZWQwZTctZDljOC00ZTg0LWFlYTktNzI5YzdiZTM1OTVmIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTc4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjg3NTQiLCJ0eXAiOiJhY2Nlc3MifQ.UI01-ddTy_b5khgQEnFfQrkguRhRca3Js9oH8e308f4
{
"category_id": "00000000-0000-0000-0000-000000452606",
"id": "61032f8e-e2a0-4e48-bc7a-befb50acf7fa",
"inventory_tracking_method": "PACKAGE",
"menu_visibility": "INCLUDE_IN_SELECT",
"menus": [
"00000000-0000-0000-0000-00000001fe36",
"00000000-0000-0000-0000-00000001fe37"
],
"name": "My Product",
"sku": "12345",
"tags": [],
"unit_price": "100",
"unit_type_id": "00000000-0000-0000-0000-000007dfaa78",
"upc": "036000291452",
"vendor_id": "00000000-0000-0000-0000-00000053eaa8"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 39b5031349445c000000000000000001-8b749247886f9ef2-0
{
"data": {
"brand": null,
"category": {
"id": "00000000-0000-0000-0000-000000452606",
"name": "Some category 13475",
"type": "OTHER"
},
"description": null,
"id": "61032f8e-e2a0-4e48-bc7a-befb50acf7fa",
"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-000007dfaa78",
"name": "Gram"
},
"units_per_case": null,
"updated_datetime": "2025-01-14T21:42:59.680293Z",
"vendor": {
"id": "00000000-0000-0000-0000-00000053eaa8",
"name": "Company 33703",
"updated_datetime": "2025-01-14T21:42:59.151962Z"
}
}
}
POST /public/v1/orders Menus act as expected
POST /public/v1/products
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1NzksImlhdCI6MTczNjg5MDk3OSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMjg2ZWQwZTctZDljOC00ZTg0LWFlYTktNzI5YzdiZTM1OTVmIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTc4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjg3NTQiLCJ0eXAiOiJhY2Nlc3MifQ.UI01-ddTy_b5khgQEnFfQrkguRhRca3Js9oH8e308f4
{
"category_id": "00000000-0000-0000-0000-000000452606",
"id": "61032f8e-e2a0-4e48-bc7a-befb50acf7fa",
"inventory_tracking_method": "PACKAGE",
"menu_visibility": "INCLUDE_IN_SELECT",
"menus": ["00000000-0000-0000-0000-00000001fe37"],
"name": "My Product",
"sku": "12345",
"unit_price": "100",
"unit_type_id": "00000000-0000-0000-0000-000007dfaa78",
"upc": "036000291452",
"vendor_id": "00000000-0000-0000-0000-00000053eaa8"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 39b5031349445c000000000000000001-b4628d1c7f05cfc3-0
{
"data": {
"brand": null,
"category": {
"id": "00000000-0000-0000-0000-000000452606",
"name": "Some category 13475",
"type": "OTHER"
},
"description": null,
"id": "61032f8e-e2a0-4e48-bc7a-befb50acf7fa",
"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-000007dfaa78",
"name": "Gram"
},
"units_per_case": null,
"updated_datetime": "2025-01-14T21:42:59.825456Z",
"vendor": {
"id": "00000000-0000-0000-0000-00000053eaa8",
"name": "Company 33703",
"updated_datetime": "2025-01-14T21:42:59.151962Z"
}
}
}
POST /public/v1/orders Menus act as expected
POST /public/v1/products
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1NzksImlhdCI6MTczNjg5MDk3OSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMjg2ZWQwZTctZDljOC00ZTg0LWFlYTktNzI5YzdiZTM1OTVmIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTc4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjg3NTQiLCJ0eXAiOiJhY2Nlc3MifQ.UI01-ddTy_b5khgQEnFfQrkguRhRca3Js9oH8e308f4
{
"category_id": "00000000-0000-0000-0000-000000452606",
"id": "61032f8e-e2a0-4e48-bc7a-befb50acf7fa",
"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-000007dfaa78",
"upc": "036000291452",
"vendor_id": "00000000-0000-0000-0000-00000053eaa8"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 39b5031349445c000000000000000001-e1f3b6143e87f19f-0
{
"data": {
"brand": null,
"category": {
"id": "00000000-0000-0000-0000-000000452606",
"name": "Some category 13475",
"type": "OTHER"
},
"description": null,
"id": "61032f8e-e2a0-4e48-bc7a-befb50acf7fa",
"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-000007dfaa78",
"name": "Gram"
},
"units_per_case": null,
"updated_datetime": "2025-01-14T21:42:59.941248Z",
"vendor": {
"id": "00000000-0000-0000-0000-00000053eaa8",
"name": "Company 33703",
"updated_datetime": "2025-01-14T21:42:59.151962Z"
}
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1ODMsImlhdCI6MTczNjg5MDk4MywiaXNzIjoiRGlzdHJ1IiwianRpIjoiNGM0ZmEzYzktYmI3NC00MDAwLTkwYTktZjM4OGNlOWM3YmQ0IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTgyLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjk1NTgiLCJ0eXAiOiJhY2Nlc3MifQ.hPqi2U2aJrvTSYRvzKchWd4JavsFQAIfKHJXB9l7tWQ
{
"id": "c3d902d7-d345-4319-90a8-4894addbee61",
"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: 833d4da3d17590000000000000000001-14b1983c35cc9241-0
{
"errors": [
{
"context": {
"id": "c3d902d7-d345-4319-90a8-4894addbee61"
},
"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": "c3d902d7-d345-4319-90a8-4894addbee61"
},
"message": "Unit Serving Size can't be greater than Unit Net Weight/Volume",
"pointer": ["unit_serving_size"],
"section": "body"
},
{
"context": {
"id": "c3d902d7-d345-4319-90a8-4894addbee61"
},
"message": "Cannot be negative",
"pointer": ["quantity_available_threshold_max"],
"section": "body"
},
{
"context": {
"id": "c3d902d7-d345-4319-90a8-4894addbee61"
},
"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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1ODMsImlhdCI6MTczNjg5MDk4MywiaXNzIjoiRGlzdHJ1IiwianRpIjoiZjQ5NmUxNzEtN2M5OC00OGQ5LWIyZDQtZTRlOTk0ZWJkYzJiIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTgyLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjk1NDciLCJ0eXAiOiJhY2Nlc3MifQ.gF0oYQfEblGlMfnKt3d2JDPL-9gXR5dtalejz7VcwR4
{
"id": "10eae852-b4d2-4dbd-9dd3-1054912688e9",
"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: 3ead63064181c6000000000000000001-80a482b915d1e44a-0
{
"errors": [
{
"context": {
"id": "10eae852-b4d2-4dbd-9dd3-1054912688e9"
},
"message": "Must be greater than threshold min",
"pointer": ["quantity_available_threshold_max"],
"section": "body"
},
{
"context": {
"id": "10eae852-b4d2-4dbd-9dd3-1054912688e9"
},
"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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1ODAsImlhdCI6MTczNjg5MDk4MCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNjFmMTE4ZmEtNWQ4MS00NmQ1LWE0NDktN2QwNjI4MDFiZjI1IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTc5LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNjkwMTEiLCJ0eXAiOiJhY2Nlc3MifQ.xyBlaf-pRzTKq2d8-lV3l412d9dyj1kgUAw9ZcahzWQ
{
"brand_id": "00000000-0000-0000-0000-00000053eb20",
"category_id": "00000000-0000-0000-0000-00000045265a",
"cbd": "5.2",
"description": "My Product Description",
"group_id": "00000000-0000-0000-0000-00000038d5de",
"id": "23ffd310-3a68-40d1-9d55-a2bd58598707",
"inventory_tracking_method": "PACKAGE",
"is_featured": true,
"is_inactive": true,
"menu_visibility": "INCLUDE_IN_ALL",
"menus": [
"00000000-0000-0000-0000-00000001fe43",
"00000000-0000-0000-0000-00000001fe44",
"00000000-0000-0000-0000-00000001fe45"
],
"msrp": "100.5",
"name": "My Product",
"owner_id": "00000000-0000-0000-0000-000000bb35de",
"quantity_available_threshold_max": "10.5",
"quantity_available_threshold_min": "5.5555",
"sku": "12345",
"strain_id": "00000000-0000-0000-0000-000000015e06",
"subcategory_id": "00000000-0000-0000-0000-000000456d8d",
"tags": [
"00000000-0000-0000-0000-0000000069b2",
"00000000-0000-0000-0000-0000000069b3",
"00000000-0000-0000-0000-0000000069b4"
],
"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-000007dfb448",
"unit_price": "100",
"unit_serving_size": "2.2",
"unit_type_id": "00000000-0000-0000-0000-000007dfb44f",
"units_per_case": "0.2",
"upc": "036000291452",
"vendor_id": "00000000-0000-0000-0000-00000053eb1b",
"wholesale_unit_price": "90.50"
}
Response
400
cache-control: max-age=0, private, must-revalidate
content-type: application/json; charset=utf-8
b3: b932238be30ee8000000000000000001-f599fd7fae356dca-0
{
"errors": [
{
"context": {
"id": "23ffd310-3a68-40d1-9d55-a2bd58598707"
},
"message": "Brand does not exist",
"pointer": ["brand_id"],
"section": "body"
},
{
"context": {
"id": "23ffd310-3a68-40d1-9d55-a2bd58598707"
},
"message": "Category does not exist",
"pointer": ["category_id"],
"section": "body"
},
{
"context": {
"id": "23ffd310-3a68-40d1-9d55-a2bd58598707"
},
"message": "Vendor does not exist",
"pointer": ["vendor_id"],
"section": "body"
},
{
"context": {
"id": "23ffd310-3a68-40d1-9d55-a2bd58598707"
},
"message": "Group does not exist",
"pointer": ["group_id"],
"section": "body"
},
{
"context": {
"id": "23ffd310-3a68-40d1-9d55-a2bd58598707"
},
"message": "Serving unit type does not exist",
"pointer": ["unit_net_weight_and_serving_size_unit_type_id"],
"section": "body"
},
{
"context": {
"id": "23ffd310-3a68-40d1-9d55-a2bd58598707"
},
"message": "Owner does not exist",
"pointer": ["owner_id"],
"section": "body"
},
{
"context": {
"id": "23ffd310-3a68-40d1-9d55-a2bd58598707"
},
"message": "Strain does not exist",
"pointer": ["strain_id"],
"section": "body"
},
{
"context": {
"id": "23ffd310-3a68-40d1-9d55-a2bd58598707"
},
"message": "Subcategory does not belong to the product category",
"pointer": ["subcategory_id"],
"section": "body"
},
{
"context": {
"id": "23ffd310-3a68-40d1-9d55-a2bd58598707"
},
"message": "One or more of the provided tags do not exist",
"pointer": ["tags"],
"section": "body"
},
{
"context": {
"id": "23ffd310-3a68-40d1-9d55-a2bd58598707"
},
"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-00000001fe43"],
"section": "body"
},
{
"context": {},
"message": "Menu does not exist",
"pointer": ["menus", 1, "00000000-0000-0000-0000-00000001fe44"],
"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. This field should be null unless the product's unit type is count-based. | query | number | false | ||
unit_serving_size | The serving size of the product per unit. This field should be null unless the product's unit type is count-based. | 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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NzIsImlhdCI6MTczNjg5MDg3MiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYjFlMGEwZTYtYzA1My00NTBiLWE5ODktZmJhZjQ5NGIxMDEyIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODcxLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTAzNDQiLCJ0eXAiOiJhY2Nlc3MifQ.wkMUjLGjMF4IvnA3i0ILPjm-OReIoF0lO2Vp89Qmy9s
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: f0740e60ed8018000000000000000001-8476c4ed9c058667-0
{
"data": [
{
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053cad5",
"name": "Company 19922",
"updated_datetime": "2025-01-14T21:41:12.703912Z"
},
"due_datetime": "2025-01-14T21:41:12.786698Z",
"id": "00000000-0000-0000-0000-000000033de1",
"inserted_datetime": "2025-01-14T21:41:12.788988Z",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338651",
"name": "B21618"
},
"compliance_quantity": null,
"id": "1ebb4f62-5aed-4f19-96d4-f4ec23f45a1f",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddc8b",
"id": "00000000-0000-0000-0000-000000386e98",
"license_id": null,
"name": "Place 8289"
},
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "c31f9a4d-e154-47fe-ae96-6f36b1b3f153",
"name": "Product 21602",
"sku": "sku 21603",
"updated_datetime": "2025-01-14T21:41:12.814169Z"
},
"quantity": "15.000000000",
"received_quantity": "0.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338652",
"name": "B21619"
},
"compliance_quantity": null,
"id": "5c285e7e-0e65-42bb-bbcd-c1998fdbab78",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddc8b",
"id": "00000000-0000-0000-0000-000000386e98",
"license_id": null,
"name": "Place 8289"
},
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "5742fb7a-9b46-42c4-9fb5-17f1a39840a4",
"name": "Product 21604",
"sku": "sku 21605",
"updated_datetime": "2025-01-14T21:41:12.839176Z"
},
"quantity": "10.000000000",
"received_quantity": "0.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338653",
"name": "B21620"
},
"compliance_quantity": null,
"id": "83cdd3be-db27-436b-839c-c2ad2af73eff",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddc8b",
"id": "00000000-0000-0000-0000-000000386e98",
"license_id": null,
"name": "Place 8289"
},
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "60082fc6-b329-491f-9dd7-444537ea6a17",
"name": "Product 21608",
"sku": "sku 21609",
"updated_datetime": "2025-01-14T21:41:12.861926Z"
},
"quantity": "5.000000000",
"received_quantity": "0.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338654",
"name": "B21621"
},
"compliance_quantity": null,
"id": "85597d54-ebe1-4529-a837-388a1b1cf08d",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddc8b",
"id": "00000000-0000-0000-0000-000000386e98",
"license_id": null,
"name": "Place 8289"
},
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "3e39fa8f-7090-4e1a-a8e3-034090771ccb",
"name": "Product 21614",
"sku": "sku 21615",
"updated_datetime": "2025-01-14T21:41:12.889613Z"
},
"quantity": "2.000000000",
"received_quantity": "0.000000000"
}
],
"order_datetime": "2025-01-14T21:41:12.786695Z",
"purchase_number": "Purchase #235",
"status": "PENDING",
"total": "32.00",
"updated_datetime": "2025-01-14T21:41:12.788988Z"
},
{
"charges": [
{
"id": "c61d9dbe-0da1-4262-ac25-24079faa93a8",
"name": "C1",
"percent": "10.0000",
"price": "1.00",
"type": "CHARGE",
"unit_type": "PERCENT"
}
],
"company": {
"id": "00000000-0000-0000-0000-00000053cacf",
"name": "Company 19910",
"updated_datetime": "2030-11-01T00:00:00.000000Z"
},
"due_datetime": "2020-01-01T00:00:01.000000Z",
"id": "00000000-0000-0000-0000-000000033ddf",
"inserted_datetime": "2020-01-01T00:00:03.000000Z",
"items": [
{
"batch": {
"batch_number": "UID1",
"id": "00000000-0000-0000-0000-000000338644",
"name": "B1"
},
"compliance_quantity": "1.0000",
"id": "f0b3a93c-eaf2-48fb-bb5a-34a63edbee30",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddc8b",
"id": "00000000-0000-0000-0000-000000386e87",
"license_id": "00000000-0000-0000-0000-000000248022",
"name": "Place 8272"
},
"package": {
"batch_number": "B1",
"compliance_label": "ABCDEF012345670000008039",
"id": "00000000-0000-0000-0000-0000001280aa",
"metrc_label": "ABCDEF012345670000008039",
"status": "active"
},
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "1e8f6ada-f09c-4970-b642-a6774057fbc3",
"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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NzYsImlhdCI6MTczNjg5MDg3NiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiODU3ZjAzNDYtM2ZlZS00N2NhLWJiNzQtODBlM2RhYjE2OTBhIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODc1LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTEyOTgiLCJ0eXAiOiJhY2Nlc3MifQ.Mg9797NYC6WwG0zdXpLn-BmUs6dg3tN7zu8uSrmXveU
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: f86497bbdb8af8000000000000000001-2908af0478b56540-0
{
"data": [
{
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053ccac",
"name": "Company 20725",
"updated_datetime": "2025-01-14T21:41:17.558632Z"
},
"due_datetime": "2025-01-14T21:41:17.638691Z",
"id": "00000000-0000-0000-0000-000000033df2",
"inserted_datetime": "2025-01-14T21:41:17.640446Z",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338754",
"name": "B22474"
},
"compliance_quantity": null,
"id": "6885ead9-4728-4d51-bf8e-d153e5c38992",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddf54",
"id": "00000000-0000-0000-0000-000000386fae",
"license_id": null,
"name": "Place 8567"
},
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "5ff707e1-d0dc-401d-b3a3-1b2f42f9e0d6",
"name": "Product 22458",
"sku": "sku 22459",
"updated_datetime": "2025-01-14T21:41:17.660682Z"
},
"quantity": "15.000000000",
"received_quantity": "0.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338755",
"name": "B22475"
},
"compliance_quantity": null,
"id": "3313f9fb-2821-4337-8061-45b735971690",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddf54",
"id": "00000000-0000-0000-0000-000000386fae",
"license_id": null,
"name": "Place 8567"
},
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "103c4c36-4d7c-408c-aa86-c3fcce9b2871",
"name": "Product 22462",
"sku": "sku 22463",
"updated_datetime": "2025-01-14T21:41:17.689736Z"
},
"quantity": "10.000000000",
"received_quantity": "0.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338756",
"name": "B22476"
},
"compliance_quantity": null,
"id": "26bf59c6-2dce-49ca-be09-d783ddfb68a0",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddf54",
"id": "00000000-0000-0000-0000-000000386fae",
"license_id": null,
"name": "Place 8567"
},
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "f82f3614-799c-4cac-8bdc-02222a0db3b5",
"name": "Product 22467",
"sku": "sku 22468",
"updated_datetime": "2025-01-14T21:41:17.712827Z"
},
"quantity": "5.000000000",
"received_quantity": "0.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338757",
"name": "B22477"
},
"compliance_quantity": null,
"id": "2cd1db12-4de2-4144-90a0-be7be586d863",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddf54",
"id": "00000000-0000-0000-0000-000000386fae",
"license_id": null,
"name": "Place 8567"
},
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "44f8d137-0b89-437e-8024-f715287fb5f5",
"name": "Product 22472",
"sku": "sku 22473",
"updated_datetime": "2025-01-14T21:41:17.743218Z"
},
"quantity": "2.000000000",
"received_quantity": "0.000000000"
}
],
"order_datetime": "2020-01-01T12:30:00.000000Z",
"purchase_number": "Purchase #251",
"status": "PENDING",
"total": "32.00",
"updated_datetime": "2025-01-14T21:41:17.640446Z"
},
{
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053cc8c",
"name": "Company 20678",
"updated_datetime": "2025-01-14T21:41:17.333206Z"
},
"due_datetime": "2025-01-14T21:41:17.412807Z",
"id": "00000000-0000-0000-0000-000000033df1",
"inserted_datetime": "2025-01-14T21:41:17.414461Z",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033874a",
"name": "B22432"
},
"compliance_quantity": null,
"id": "95d94f33-aca4-4653-b4d7-3b743d42ec24",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddf54",
"id": "00000000-0000-0000-0000-000000386f9c",
"license_id": null,
"name": "Place 8549"
},
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "72a4931a-8c54-4819-8f64-be9b06f08f61",
"name": "Product 22407",
"sku": "sku 22408",
"updated_datetime": "2025-01-14T21:41:17.437530Z"
},
"quantity": "15.000000000",
"received_quantity": "15.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033874b",
"name": "B22433"
},
"compliance_quantity": null,
"id": "17f95d59-fa5f-45be-b499-53de389b8f69",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddf54",
"id": "00000000-0000-0000-0000-000000386f9c",
"license_id": null,
"name": "Place 8549"
},
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "c243f504-0417-43d3-ac1d-34614b3275f8",
"name": "Product 22409",
"sku": "sku 22410",
"updated_datetime": "2025-01-14T21:41:17.463314Z"
},
"quantity": "10.000000000",
"received_quantity": "10.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033874c",
"name": "B22436"
},
"compliance_quantity": null,
"id": "ca98a789-1d9b-484a-888f-8a8a99317ca8",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddf54",
"id": "00000000-0000-0000-0000-000000386f9c",
"license_id": null,
"name": "Place 8549"
},
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "23ea3490-8238-434c-82c1-4e6a81282390",
"name": "Product 22417",
"sku": "sku 22418",
"updated_datetime": "2025-01-14T21:41:17.483622Z"
},
"quantity": "5.000000000",
"received_quantity": "5.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033874d",
"name": "B22437"
},
"compliance_quantity": null,
"id": "49875dfa-0d39-40c7-9349-a84b345cd125",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddf54",
"id": "00000000-0000-0000-0000-000000386f9c",
"license_id": null,
"name": "Place 8549"
},
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "484f90fa-3171-49de-9972-070c2dc2d89d",
"name": "Product 22430",
"sku": "sku 22431",
"updated_datetime": "2025-01-14T21:41:17.506263Z"
},
"quantity": "2.000000000",
"received_quantity": "2.000000000"
}
],
"order_datetime": "2020-01-01T12:20:00.000000Z",
"purchase_number": "Purchase #250",
"status": "COMPLETED",
"total": "32.00",
"updated_datetime": "2025-01-14T21:41:17.414461Z"
},
{
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053cc5f",
"name": "Company 20601",
"updated_datetime": "2025-01-14T21:41:16.891116Z"
},
"due_datetime": "2025-01-14T21:41:16.984008Z",
"id": "00000000-0000-0000-0000-000000033dee",
"inserted_datetime": "2025-01-14T21:41:16.986729Z",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338732",
"name": "B22336"
},
"compliance_quantity": null,
"id": "97a8fcac-6813-422e-8cb5-9b8ad27392cd",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddf54",
"id": "00000000-0000-0000-0000-000000386f82",
"license_id": null,
"name": "Place 8523"
},
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "653d903b-232c-4492-bf02-0077f2e0b46f",
"name": "Product 22318",
"sku": "sku 22319",
"updated_datetime": "2025-01-14T21:41:17.011221Z"
},
"quantity": "15.000000000",
"received_quantity": "15.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338733",
"name": "B22337"
},
"compliance_quantity": null,
"id": "fb2091fd-de10-4af8-bf5a-1bb2ebc601cc",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddf54",
"id": "00000000-0000-0000-0000-000000386f82",
"license_id": null,
"name": "Place 8523"
},
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "e9e3206d-6ffc-465c-a605-f75a567e66c0",
"name": "Product 22325",
"sku": "sku 22326",
"updated_datetime": "2025-01-14T21:41:17.035571Z"
},
"quantity": "10.000000000",
"received_quantity": "10.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338734",
"name": "B22338"
},
"compliance_quantity": null,
"id": "9dab6f09-9721-4ae0-873c-1e3f17e6241f",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddf54",
"id": "00000000-0000-0000-0000-000000386f82",
"license_id": null,
"name": "Place 8523"
},
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "f25d11fb-7418-470e-abf9-16ec79e1f02b",
"name": "Product 22329",
"sku": "sku 22332",
"updated_datetime": "2025-01-14T21:41:17.058627Z"
},
"quantity": "5.000000000",
"received_quantity": "5.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338735",
"name": "B22339"
},
"compliance_quantity": null,
"id": "c91b9dc0-7252-4e35-b337-c5b635d0d4e7",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddf54",
"id": "00000000-0000-0000-0000-000000386f82",
"license_id": null,
"name": "Place 8523"
},
"package": null,
"price": "10.000000000",
"price_base": "10",
"product": {
"id": "adc7fc11-4ac4-40b3-b2da-2fadb618246b",
"name": "Product 22334",
"sku": "sku 22335",
"updated_datetime": "2025-01-14T21:41:17.076728Z"
},
"quantity": "2.000000000",
"received_quantity": "2.000000000"
}
],
"order_datetime": "2020-01-01T12:00:00.000000Z",
"purchase_number": "Purchase #247",
"status": "COMPLETED",
"total": "32.00",
"updated_datetime": "2025-01-14T21:41:16.986729Z"
}
]
}
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-000000033dca/payments
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NjgsImlhdCI6MTczNjg5MDg2OCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYzY3NmE4MzUtYjI4OS00MDJhLWE5N2EtM2EyMGFhODk0YTYwIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODY3LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNDk0MDIiLCJ0eXAiOiJhY2Nlc3MifQ.Jq27jJOe2Ii9sbDQTidSmhGkRhrOhlfRpHv_8_jBJMw
{
"amount": 100.01,
"description": "Payment for purchase",
"payment_datetime": "2020-01-01T00:00:00.000000Z",
"payment_method_id": "00000000-0000-0000-0000-00000000fc55",
"quickbooks_deposit_account_id": "QBD-123"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 26a57ebd57688a000000000000000001-3e3aae985fdbd593-0
{
"data": {
"amount": "100.01",
"description": "Payment for purchase",
"id": "00000000-0000-0000-0000-000000004bc8",
"inserted_datetime": "2025-01-14T21:41:08.144855Z",
"payment_date": "2020-01-01T00:00:00.000000Z",
"payment_method": {
"id": "00000000-0000-0000-0000-00000000fc55",
"name": "Payment Method 0"
},
"payment_number": "PYT-0000002",
"purchase_id": "00000000-0000-0000-0000-000000033dca",
"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-000000033dca/payments
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NjgsImlhdCI6MTczNjg5MDg2OCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiYzY3NmE4MzUtYjI4OS00MDJhLWE5N2EtM2EyMGFhODk0YTYwIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODY3LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNDk0MDIiLCJ0eXAiOiJhY2Nlc3MifQ.Jq27jJOe2Ii9sbDQTidSmhGkRhrOhlfRpHv_8_jBJMw
{
"amount": 100.01,
"description": "Payment for purchase",
"payment_datetime": "2020-01-01T00:00:00.000000Z",
"payment_method_id": "00000000-0000-0000-0000-00000000fc55",
"quickbooks_deposit_account_name": "QBD-NAME"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 26a57ebd57688a000000000000000001-144843a8b7de37e7-0
{
"data": {
"amount": "100.01",
"description": "Payment for purchase",
"id": "00000000-0000-0000-0000-000000004bc9",
"inserted_datetime": "2025-01-14T21:41:08.279825Z",
"payment_date": "2020-01-01T00:00:00.000000Z",
"payment_method": {
"id": "00000000-0000-0000-0000-00000000fc55",
"name": "Payment Method 0"
},
"payment_number": "PYT-0000003",
"purchase_id": "00000000-0000-0000-0000-000000033dca",
"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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NjcsImlhdCI6MTczNjg5MDg2NywiaXNzIjoiRGlzdHJ1IiwianRpIjoiYWY4OWNkMzMtZTNiZi00OTFmLWJlZmItNGZmZDc4OGNlZTUwIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODY2LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNDkxODciLCJ0eXAiOiJhY2Nlc3MifQ.PQk-BCzEUjC5EPl5kKeDLYxvCWLCchrL_7Hufbqn8JM
{
"billing_location_id": "00000000-0000-0000-0000-000000386d4b",
"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-00000053c893",
"due_datetime": "2020-01-30T00:00:00.000000Z",
"items": [
{
"location_id": "00000000-0000-0000-0000-000000386d47",
"price": "10.000000000",
"product_id": "32570e83-b7da-401f-9063-d2d65bf254b2",
"quantity": "1.000000000"
}
],
"location_id": "00000000-0000-0000-0000-000000386d47",
"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: 88c4d395b5d1e0000000000000000001-3f1923ee80414342-0
{
"data": {
"charges": [
{
"id": "f54fad98-69d8-4d2c-95ae-8a99837c6942",
"name": "C1",
"percent": "10.0000",
"price": "1.00",
"type": "CHARGE",
"unit_type": "PERCENT"
},
{
"id": "90116d1c-7bfe-47b0-b2cd-2ee6a34967ab",
"name": "C2",
"percent": null,
"price": "-5.00",
"type": "DISCOUNT",
"unit_type": "PRICE"
}
],
"company": {
"id": "00000000-0000-0000-0000-00000053c893",
"name": "Company 18852",
"updated_datetime": "2025-01-14T21:41:07.128697Z"
},
"due_datetime": "2020-01-30T00:00:00.000000Z",
"id": "00000000-0000-0000-0000-000000033dc7",
"inserted_datetime": "2025-01-14T21:41:07.346468Z",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033850b",
"name": "B1"
},
"compliance_quantity": null,
"id": "8c7a7d61-55a6-408e-a773-5d2a3b97cc37",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dd8a9",
"id": "00000000-0000-0000-0000-000000386d47",
"license_id": "00000000-0000-0000-0000-000000247f0e",
"name": "Place 7972"
},
"package": null,
"price": "10.000000000",
"price_base": "10.000000000",
"product": {
"id": "32570e83-b7da-401f-9063-d2d65bf254b2",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:41:07.283482Z"
},
"quantity": "1.000000000",
"received_quantity": "0.000000000"
}
],
"order_datetime": "2020-01-01T00:00:00.000000Z",
"purchase_number": "PO-0000002",
"status": "PENDING",
"total": "6.00",
"updated_datetime": "2025-01-14T21:41:07.360190Z"
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NjcsImlhdCI6MTczNjg5MDg2NywiaXNzIjoiRGlzdHJ1IiwianRpIjoiNmQwMzEzZDQtNWU4MC00NmQ2LTkwMzYtYzliMjBmNzg5Mjk4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODY2LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNDkyNjMiLCJ0eXAiOiJhY2Nlc3MifQ.6jxv9HF4ks2ontIsiZQTP_-9vSRM_RkV8cpEUrua8pg
{
"billing_location_id": "00000000-0000-0000-0000-000000386d62",
"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-00000053c8ba",
"due_datetime": "2020-01-30T00:00:00.000000Z",
"items": [
{
"batch_id": "00000000-0000-0000-0000-00000033851b",
"location_id": "00000000-0000-0000-0000-000000386d62",
"price": "10.000000000",
"product_id": "370f753f-2b96-4d5f-ab58-bd84818d89f2",
"quantity": "1.000000000"
}
],
"location_id": "00000000-0000-0000-0000-000000386d62",
"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: 02ba9642365e0a000000000000000001-31d44a4d22fb3916-0
{
"data": {
"charges": [
{
"id": "668faab9-e125-4b20-b790-9fce8d6f8534",
"name": "C1",
"percent": "10.0000",
"price": "1.00",
"type": "CHARGE",
"unit_type": "PERCENT"
},
{
"id": "8a6922de-fc76-4f1b-8b92-4677dcfa089a",
"name": "C2",
"percent": null,
"price": "-5.00",
"type": "DISCOUNT",
"unit_type": "PRICE"
}
],
"company": {
"id": "00000000-0000-0000-0000-00000053c8ba",
"name": "Company 18919",
"updated_datetime": "2025-01-14T21:41:07.527011Z"
},
"due_datetime": "2020-01-30T00:00:00.000000Z",
"id": "00000000-0000-0000-0000-000000033dc8",
"inserted_datetime": "2025-01-14T21:41:07.656603Z",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033851b",
"name": "B1"
},
"compliance_quantity": null,
"id": "fb30579a-f6fb-46e7-954f-2f22ca164d42",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dd8ea",
"id": "00000000-0000-0000-0000-000000386d62",
"license_id": "00000000-0000-0000-0000-000000247f20",
"name": "Place 7999"
},
"package": null,
"price": "10.000000000",
"price_base": "10.000000000",
"product": {
"id": "370f753f-2b96-4d5f-ab58-bd84818d89f2",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:41:07.608171Z"
},
"quantity": "1.000000000",
"received_quantity": "0.000000000"
}
],
"order_datetime": "2020-01-01T00:00:00.000000Z",
"purchase_number": "PO-0000002",
"status": "PENDING",
"total": "6.00",
"updated_datetime": "2025-01-14T21:41:07.685208Z"
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NzQsImlhdCI6MTczNjg5MDg3NCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNDA5OWY3MWItMjUwNi00NDRlLWE1MjQtNDgxYzg0NDY3MjJiIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODczLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTA3NDUiLCJ0eXAiOiJhY2Nlc3MifQ.H3ram-IhfIBreWeouRsYlppwpyif4cafTwZc2mDtYZw
{
"billing_location_id": "00000000-0000-0000-0000-000000386eec",
"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-00000053cb6e",
"due_datetime": "2020-01-30T00:00:00.000000Z",
"items": [
{
"location_id": "00000000-0000-0000-0000-000000386eec",
"price": "10.000000000",
"product_id": "082c09a5-fa0f-4434-8f8a-0a7ef481a17f",
"quantity": "1.000000000"
}
],
"location_id": "00000000-0000-0000-0000-000000386eec",
"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: 4e5eead402b0f4000000000000000001-1420946853a9c082-0
{
"data": {
"charges": [
{
"id": "b1df28d7-b5ed-44fd-9237-78cab03c3d0c",
"name": "C1",
"percent": "10.0000",
"price": "1.00",
"type": "CHARGE",
"unit_type": "PERCENT"
},
{
"id": "df2e4c73-39ab-4df8-bf0f-36cfffc1d151",
"name": "C2",
"percent": null,
"price": "-5.00",
"type": "DISCOUNT",
"unit_type": "PRICE"
}
],
"company": {
"id": "00000000-0000-0000-0000-00000053cb6e",
"name": "Company 20195",
"updated_datetime": "2025-01-14T21:41:13.990295Z"
},
"due_datetime": "2020-01-30T00:00:00.000000Z",
"id": "00000000-0000-0000-0000-000000033de7",
"inserted_datetime": "2025-01-14T21:41:14.132672Z",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-0000003386a3",
"name": "B1"
},
"compliance_quantity": null,
"id": "0876d1b6-5db1-42c7-bd35-4654b4589cf6",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008dddbe",
"id": "00000000-0000-0000-0000-000000386eec",
"license_id": "00000000-0000-0000-0000-00000024807b",
"name": "Place 8373"
},
"package": null,
"price": "10.000000000",
"price_base": "10.000000000",
"product": {
"id": "082c09a5-fa0f-4434-8f8a-0a7ef481a17f",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:41:14.067306Z"
},
"quantity": "1.000000000",
"received_quantity": "0.000000000"
}
],
"order_datetime": "2020-01-01T00:00:00.000000Z",
"purchase_number": "PO-0000002",
"status": "PENDING",
"total": "6.00",
"updated_datetime": "2025-01-14T21:41:14.150162Z"
}
}
POST /public/v1/purchases updates a purchase
POST /public/v1/purchases
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NzgsImlhdCI6MTczNjg5MDg3OCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiM2JlNGU5MzgtNjQzNi00MGY3LTk0NjktZDA4MjQ0NzA4YWQ4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODc3LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTE2MjMiLCJ0eXAiOiJhY2Nlc3MifQ.C-J8eVep-NKbQde95vGyjCSRixzOIxbH7TQj-i26O6E
{
"billing_location_id": "00000000-0000-0000-0000-000000386fcb",
"charges": [
{
"name": "C1",
"percent": "10.0000",
"type": "CHARGE",
"unit_type": "PERCENT"
}
],
"company_id": "00000000-0000-0000-0000-00000053ccd6",
"due_datetime": "2020-01-20T00:00:00.000000Z",
"items": [
{
"location_id": "00000000-0000-0000-0000-000000386fcb",
"price": "10.000000000",
"product_id": "f6a915da-6411-40ac-963c-ae35c80014fc",
"quantity": "1.000000000"
}
],
"location_id": "00000000-0000-0000-0000-000000386fcb",
"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: 8f5c610ada7320000000000000000001-656319d71d16cf6e-0
{
"data": {
"charges": [
{
"id": "6310aef3-0caa-4040-bfcb-44690e974904",
"name": "C1",
"percent": "10.0000",
"price": "1.00",
"type": "CHARGE",
"unit_type": "PERCENT"
}
],
"company": {
"id": "00000000-0000-0000-0000-00000053ccd6",
"name": "Company 20803",
"updated_datetime": "2025-01-14T21:41:18.213603Z"
},
"due_datetime": "2020-01-20T00:00:00.000000Z",
"id": "00000000-0000-0000-0000-000000033df3",
"inserted_datetime": "2025-01-14T21:41:18.370924Z",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338768",
"name": "B1"
},
"compliance_quantity": null,
"id": "405b64a5-3c76-4f46-9d02-adb1de7cc817",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008de021",
"id": "00000000-0000-0000-0000-000000386fcb",
"license_id": "00000000-0000-0000-0000-000000248141",
"name": "Place 8596"
},
"package": null,
"price": "10.000000000",
"price_base": "10.000000000",
"product": {
"id": "f6a915da-6411-40ac-963c-ae35c80014fc",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:41:18.285223Z"
},
"quantity": "1.000000000",
"received_quantity": "0.000000000"
}
],
"order_datetime": "2020-01-02T00:00:00.000000Z",
"purchase_number": "PO-0000002",
"status": "PENDING",
"total": "11.00",
"updated_datetime": "2025-01-14T21:41:18.388077Z"
}
}
POST /public/v1/purchases updates a purchase
POST /public/v1/purchases
content-type: application/json
accept: application/json
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NzgsImlhdCI6MTczNjg5MDg3OCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiM2JlNGU5MzgtNjQzNi00MGY3LTk0NjktZDA4MjQ0NzA4YWQ4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODc3LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTE2MjMiLCJ0eXAiOiJhY2Nlc3MifQ.C-J8eVep-NKbQde95vGyjCSRixzOIxbH7TQj-i26O6E
{
"billing_location_id": "00000000-0000-0000-0000-000000386fcb",
"charges": [
{
"id": "6310aef3-0caa-4040-bfcb-44690e974904",
"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-00000053ccd6",
"due_datetime": "2020-01-30T00:00:00.000000Z",
"id": "00000000-0000-0000-0000-000000033df3",
"items": [
{
"id": "405b64a5-3c76-4f46-9d02-adb1de7cc817",
"location_id": "00000000-0000-0000-0000-000000386fcb",
"price": "10.000000000",
"product_id": "f6a915da-6411-40ac-963c-ae35c80014fc",
"quantity": "1.000000000"
},
{
"batch_id": "00000000-0000-0000-0000-00000033876b",
"location_id": "00000000-0000-0000-0000-000000386fcb",
"price": "5.000000000",
"product_id": "4d196635-108e-47f5-8bfb-df55361f223b",
"quantity": "2.000000000"
}
],
"location_id": "00000000-0000-0000-0000-000000386fcb",
"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: 8f5c610ada7320000000000000000001-45f59b63ae0383c3-0
{
"data": {
"charges": [
{
"id": "6310aef3-0caa-4040-bfcb-44690e974904",
"name": "C1",
"percent": "10.0000",
"price": "2.00",
"type": "CHARGE",
"unit_type": "PERCENT"
},
{
"id": "613c83a0-de33-4e37-a504-508bffa94819",
"name": "C2",
"percent": null,
"price": "-5.00",
"type": "DISCOUNT",
"unit_type": "PRICE"
}
],
"company": {
"id": "00000000-0000-0000-0000-00000053ccd6",
"name": "Company 20803",
"updated_datetime": "2025-01-14T21:41:18.213603Z"
},
"due_datetime": "2020-01-30T00:00:00.000000Z",
"id": "00000000-0000-0000-0000-000000033df3",
"inserted_datetime": "2025-01-14T21:41:18.370924Z",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-000000338768",
"name": "B1"
},
"compliance_quantity": null,
"id": "405b64a5-3c76-4f46-9d02-adb1de7cc817",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008de021",
"id": "00000000-0000-0000-0000-000000386fcb",
"license_id": "00000000-0000-0000-0000-000000248141",
"name": "Place 8596"
},
"package": null,
"price": "10.000000000",
"price_base": "10.000000000",
"product": {
"id": "f6a915da-6411-40ac-963c-ae35c80014fc",
"name": "P1",
"sku": "SKU1",
"updated_datetime": "2025-01-14T21:41:18.285223Z"
},
"quantity": "1.000000000",
"received_quantity": "0.000000000"
},
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033876b",
"name": "B2"
},
"compliance_quantity": null,
"id": "7ddaedd6-8615-4b78-b01d-96de2aa1737f",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008de021",
"id": "00000000-0000-0000-0000-000000386fcb",
"license_id": "00000000-0000-0000-0000-000000248141",
"name": "Place 8596"
},
"package": null,
"price": "5.000000000",
"price_base": "5.000000000",
"product": {
"id": "4d196635-108e-47f5-8bfb-df55361f223b",
"name": "P2",
"sku": "SKU2",
"updated_datetime": "2025-01-14T21:41:18.322130Z"
},
"quantity": "2.000000000",
"received_quantity": "0.000000000"
}
],
"order_datetime": "2020-01-01T00:00:00.000000Z",
"purchase_number": "PO-0000002",
"status": "PENDING",
"total": "17.00",
"updated_datetime": "2025-01-14T21:41:18.717660Z"
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NzIsImlhdCI6MTczNjg5MDg3MiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNzU1Y2I5YzYtZWVkNC00YWRiLTg5NzYtYjRkYWNkNTJjNDBlIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODcxLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTAyMzciLCJ0eXAiOiJhY2Nlc3MifQ.jmG2OvGrq7nJK1ztmZVohMdReCfzRwH7NvDK23PENWY
{
"billing_location_id": "00000000-0000-0000-0000-000000386e72",
"company_id": "00000000-0000-0000-0000-00000053ca98",
"due_datetime": "2020-01-20T00:00:00.000000Z",
"items": [
{
"location_id": "00000000-0000-0000-0000-000000386e72",
"price": "10",
"product_id": "fbc409ca-bd0d-42be-99c6-e4708fff13fd",
"quantity": "1"
}
],
"location_id": "00000000-0000-0000-0000-000000386e72",
"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: 50c200b5b898e0000000000000000001-536fbc6ee54036ed-0
{
"data": {
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053ca98",
"name": "Company 19809",
"updated_datetime": "2025-01-14T21:41:12.063930Z"
},
"due_datetime": "2020-01-20T00:00:00.000000Z",
"id": "00000000-0000-0000-0000-000000033ddd",
"inserted_datetime": "2025-01-14T21:41:12.174772Z",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033862e",
"name": "B21485"
},
"compliance_quantity": null,
"id": "bb87fdea-75a3-4997-826a-f5b69e38254a",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddc3a",
"id": "00000000-0000-0000-0000-000000386e72",
"license_id": "00000000-0000-0000-0000-00000024800c",
"name": "Place 8251"
},
"package": null,
"price": "10.000000000",
"price_base": "10.000000000",
"product": {
"id": "fbc409ca-bd0d-42be-99c6-e4708fff13fd",
"name": "Product 21482",
"sku": "sku 21483",
"updated_datetime": "2025-01-14T21:41:12.128437Z"
},
"quantity": "1.000000000",
"received_quantity": "0.000000000"
}
],
"order_datetime": "2020-01-02T00:00:00.000000Z",
"purchase_number": "PO-0000002",
"status": "PENDING",
"total": "10.00",
"updated_datetime": "2025-01-14T21:41:12.174772Z"
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NzIsImlhdCI6MTczNjg5MDg3MiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiNzU1Y2I5YzYtZWVkNC00YWRiLTg5NzYtYjRkYWNkNTJjNDBlIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODcxLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTAyMzciLCJ0eXAiOiJhY2Nlc3MifQ.jmG2OvGrq7nJK1ztmZVohMdReCfzRwH7NvDK23PENWY
{
"company_id": "00000000-0000-0000-0000-00000053ca98",
"id": "00000000-0000-0000-0000-000000033ddd",
"items": [
{
"location_id": "00000000-0000-0000-0000-000000386e72",
"price": "2",
"product_id": "fbc409ca-bd0d-42be-99c6-e4708fff13fd",
"quantity": "1"
}
]
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 50c200b5b898e0000000000000000001-3d94077da01401bb-0
{
"data": {
"charges": [],
"company": {
"id": "00000000-0000-0000-0000-00000053ca98",
"name": "Company 19809",
"updated_datetime": "2025-01-14T21:41:12.063930Z"
},
"due_datetime": "2020-01-20T00:00:00.000000Z",
"id": "00000000-0000-0000-0000-000000033ddd",
"inserted_datetime": "2025-01-14T21:41:12.174772Z",
"items": [
{
"batch": {
"batch_number": null,
"id": "00000000-0000-0000-0000-00000033862e",
"name": "B21485"
},
"compliance_quantity": null,
"id": "c75ccc80-fa14-444c-89e4-31468febbf0b",
"location": {
"address": "123 Fake Street, Beverly Hills, CA 88888, USA",
"company_id": "00000000-0000-0000-0000-0000008ddc3a",
"id": "00000000-0000-0000-0000-000000386e72",
"license_id": "00000000-0000-0000-0000-00000024800c",
"name": "Place 8251"
},
"package": null,
"price": "2.000000000",
"price_base": "2.000000000",
"product": {
"id": "fbc409ca-bd0d-42be-99c6-e4708fff13fd",
"name": "Product 21482",
"sku": "sku 21483",
"updated_datetime": "2025-01-14T21:41:12.128437Z"
},
"quantity": "1.000000000",
"received_quantity": "0.000000000"
}
],
"order_datetime": "2020-01-02T00:00:00.000000Z",
"purchase_number": "PO-0000002",
"status": "PENDING",
"total": "2.00",
"updated_datetime": "2025-01-14T21:41:12.364485Z"
}
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NjMsImlhdCI6MTczNjg5MDg2MywiaXNzIjoiRGlzdHJ1IiwianRpIjoiZjY0ODcxNGEtMmY3MS00OGE0LWFjMWQtNWU1YjA1MzVkNWUwIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODYyLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNDg4MDMiLCJ0eXAiOiJhY2Nlc3MifQ.zMNKnUyRUyGXKcoIJAJm35no8Q-giw3_YYtL14mWePc
{
"billing_location_id": "00000000-0000-0000-0000-000000386ccf",
"charges": [],
"company_id": "00000000-0000-0000-0000-00000053c7cd",
"due_datetime": "2020-01-30T00:00:00.000000Z",
"id": "00000000-0000-0000-0000-000000033dba",
"items": [
{
"batch_id": "00000000-0000-0000-0000-00000033849d",
"id": "a86993c8-fed3-4e42-acc3-1ea444b1ac4d",
"location_id": "00000000-0000-0000-0000-000000386ccf",
"price": "10.000000000",
"product_id": "f1cad52e-10de-44f6-922a-7dc719007c69",
"quantity": "1.000000000"
}
],
"location_id": "00000000-0000-0000-0000-000000386ccf",
"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: e0452b96ba8f68000000000000000001-d04df5a26297aff3-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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NzgsImlhdCI6MTczNjg5MDg3OCwiaXNzIjoiRGlzdHJ1IiwianRpIjoiMDJiZDhkODgtNTJmZC00Nzc1LTlhYTItNjg0NGQzZDE1ZGQyIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODc3LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTE3NjkiLCJ0eXAiOiJhY2Nlc3MifQ.3xxJehW_PXEku8qZU5dAPLTEu8IfvkcIOMk-MnJVuG0
{
"billing_location_id": "00000000-0000-0000-0000-000000386ff2",
"charges": [],
"company_id": "00000000-0000-0000-0000-00000053cd09",
"due_datetime": "2020-01-30T00:00:00.000000Z",
"items": [
{
"location_id": "00000000-0000-0000-0000-000000386ff2",
"price": "10.000000000",
"product_id": "8d4e9f9a-67ae-404d-b071-99faeb2a21d3",
"quantity": "1.000000000"
}
],
"location_id": "00000000-0000-0000-0000-000000386ff2",
"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: d7c7324bb4b9f0000000000000000001-d740a9d946c7a774-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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NjcsImlhdCI6MTczNjg5MDg2NywiaXNzIjoiRGlzdHJ1IiwianRpIjoiZjA5YWUwNzgtMmMyYi00MGYyLTgwODgtNDljOWNjZTY4NDJiIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODY2LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNDkzNTgiLCJ0eXAiOiJhY2Nlc3MifQ.OGeb1Z511LWvIQTKK1BZ-LHc7diAKQeU4hsrgcytO4E
{
"billing_location_id": "00000000-0000-0000-0000-000000386d7b",
"charges": [],
"company_id": "00000000-0000-0000-0000-00000053c8dc",
"due_datetime": "2020-01-30T00:00:00.000000Z",
"items": [
{
"location_id": "00000000-0000-0000-0000-000000386d7b",
"price": "10.000000000",
"product_id": "0b0d7b5f-0d6b-425d-a5f1-3657721d7e01",
"quantity": "1.000000000"
}
],
"location_id": "00000000-0000-0000-0000-000000386d7b",
"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: e467e1dc249bf0000000000000000001-0fca90c2f72ed775-0
{
"errors": [
{
"context": {
"id": "20a79200-6102-4727-8de8-3ab68fbca4bf"
},
"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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NzUsImlhdCI6MTczNjg5MDg3NSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiODUyNzc4NDgtOTFmZS00ODQ2LThmNzgtZTI3YjYyMzAxYTNiIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODc0LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTEyMDQiLCJ0eXAiOiJhY2Nlc3MifQ.Eg0Xi8bRYkZ7i-qm5FkuLZpnPjGOLEQhp03BsIWGq90
{
"billing_location_id": "00000000-0000-0000-0000-000000386f68",
"charges": [],
"company_id": "00000000-0000-0000-0000-00000053cc37",
"due_datetime": "2020-01-30T00:00:00.000000Z",
"items": [
{
"batch_id": "00000000-0000-0000-0000-00000033871c",
"location_id": "00000000-0000-0000-0000-000000386f68",
"price": "10.000000000",
"quantity": "1.000000000"
}
],
"location_id": "00000000-0000-0000-0000-000000386f68",
"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: 0348a904c1eca4800000000000000001-c9bc7eda086629c8-0
{
"errors": [
{
"context": {
"id": "d8d6e063-2e7b-48da-89f4-a8676222ed59"
},
"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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NzYsImlhdCI6MTczNjg5MDg3NiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiY2RmOTQxYjMtMmYwMy00NGUyLWEyNDMtZmEwNmU0MjlhMDM4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODc1LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTEyNTUiLCJ0eXAiOiJhY2Nlc3MifQ.JETL01mujTIDuJNHBtZtRAcyDHGM7yNzZDpAr1fcKEk
{
"billing_location_id": "00000000-0000-0000-0000-000000386f6f",
"charges": [],
"company_id": "00000000-0000-0000-0000-00000053cc47",
"due_datetime": "2020-01-30T00:00:00.000000Z",
"items": [
{
"location_id": "00000000-0000-0000-0000-000000386f73",
"price": "10.000000000",
"product_id": "cc3acca8-068f-4064-a9e6-bf9227c4beab",
"quantity": "1.000000000"
}
],
"location_id": "00000000-0000-0000-0000-000000386f73",
"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: b5e3686522fde0000000000000000001-b43b13da6d27f45c-0
{
"errors": [
{
"context": {
"id": "2ef776f0-0386-44d9-ba78-91c5cab96d8e"
},
"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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NzcsImlhdCI6MTczNjg5MDg3NywiaXNzIjoiRGlzdHJ1IiwianRpIjoiYWE1MTdiMTItOWMzNS00ODU4LWJkNzktYWE2M2IzZGExMzQ4IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODc2LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTE1NjMiLCJ0eXAiOiJhY2Nlc3MifQ.RQR5rVQJaWArzZDsEs1iI5kQsVNTGnuZHfhBNaBJP-s
{
"billing_location_id": "00000000-0000-0000-0000-000000386fbd",
"charges": [],
"company_id": "00000000-0000-0000-0000-00000053ccc4",
"due_datetime": "2020-01-30T00:00:00.000000Z",
"items": [
{
"location_id": "00000000-0000-0000-0000-000000386fbd",
"price": "10.000000000",
"product_id": "51dbc454-5645-4cb0-88c3-3133b5f5c02e",
"quantity": "1.000000000"
}
],
"location_id": "00000000-0000-0000-0000-000000386fc1",
"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: 04d439e931f5f7800000000000000001-0659f9dcee06dac0-0
{
"errors": [
{
"context": {
"id": "467ea764-f5cc-4529-8fb3-2f215c2f295f"
},
"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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA0NjksImlhdCI6MTczNjg5MDg2OSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiZGJjYmUwY2MtYzU5NC00ZDkxLTkwNGEtYjEwODM1ZDFlNWFjIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwODY4LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNDk3MjAiLCJ0eXAiOiJhY2Nlc3MifQ.p7LJuwbPd-OMz0HrycuLWoLtof38c-oT2xnyybxFjpE
{
"billing_location_id": "00000000-0000-0000-0000-000000386dea",
"charges": [],
"company_id": "00000000-0000-0000-0000-00000053c999",
"due_datetime": "2020-01-30T00:00:00.000000Z",
"items": [
{
"location_id": "00000000-0000-0000-0000-000000386de6",
"price": "10.000000000",
"product_id": "f33064e2-5519-49b8-a322-e539853c543d",
"quantity": "1.000000000"
}
],
"location_id": "00000000-0000-0000-0000-000000386de6",
"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: 687c8e660b5098000000000000000001-4df8315f714a4886-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 |
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDAzNjEsImlhdCI6MTczNjg5MDc2MSwiaXNzIjoiRGlzdHJ1IiwianRpIjoiN2VkZGEzOWMtMjFlNS00MzgwLThmODItNzE0ZjJjZmQ2NWYzIiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwNzYwLCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyMjkxMjgiLCJ0eXAiOiJhY2Nlc3MifQ.oX7oAnnyXBJeIIUygcNzakF1qsXjqsTNJgeFvQRw_Iw
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: dad0bc2fe664b0000000000000000001-fd3e651772566b6a-0
{
"data": [
{
"id": "00000000-0000-0000-0000-000000015cd1",
"name": "Strain 55"
},
{
"id": "00000000-0000-0000-0000-000000015cd2",
"name": "Strain 56"
}
]
}
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.eyJhdWQiOiJEaXN0cnUiLCJleHAiOjE3NjgzNDA1MTYsImlhdCI6MTczNjg5MDkxNiwiaXNzIjoiRGlzdHJ1IiwianRpIjoiN2NmY2I5YTYtMzk3Mi00MzQ2LTg3NTQtYWM5ZmY1ZTUyNzM2IiwibW9iaWxlIjpmYWxzZSwibmJmIjoxNzM2ODkwOTE1LCJwbGF0Zm9ybSI6IkFQSSIsInN1YiI6IlVzZXI6MTIyNTg4MTciLCJ0eXAiOiJhY2Nlc3MifQ.36Ja2v_Rc9sjTaUg5bqW-ULyTxHM2148bcqaEPqebB8
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
b3: 3a6c7bd199074a000000000000000001-378af7888fa82f86-0
{
"data": [
{
"banned": false,
"email": "owner-35042@example.com",
"full_name": "FirstName68791 LastName68792",
"id": "00000000-0000-0000-0000-000000bb0e01",
"role": {
"id": "00000000-0000-0000-0000-000000b9d27a",
"name": "Admin 34380"
}
},
{
"banned": false,
"email": "owner-35045@example.com",
"full_name": "FirstName68798 LastName68799",
"id": "00000000-0000-0000-0000-000000bb0e04",
"role": {
"id": "00000000-0000-0000-0000-000000b9d27d",
"name": "Admin 34383"
}
}
]
}
Get users sorted by their creation date and filtered by various attributes
Note: The page size for this endpoint is 1000 users per page.
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
- Added GET
/public/v1/strains
endpoint. - In endpoint GET /public/v1/companies, added fields category and relationship to the response.
2024-11-6
- Field thc of type string in the Product object was replaced with total_thc field of type number.
- Field cbd of type string in the Product object was replaced with total_cbd field of type number.
- Added total_cannabinoid_unit field to Product object. Allowed values are either "MG" or "PERCENT".
2024-12-24
- Added billing_location_id to POST
/public/v1/purchases
endpoint.
2024-12-26
- Added msrp, is_active, category.type and images.rank to GET
/public/v1/products
.
2025-01-08
- Added GET
/public/v1/payment-methods
endpoint.
2025-01-15
- Added POST
/public/v1/purchases/:id/payments
endpoint. - Added POST
/public/v1/invoices/:id/payments
endpoint.