Product APIs
NOTICE: Changes to Product API behavior - 4/30/25 deadline
To ensure your integration has the full picture of sellable inventory, please update API calls to the
product_list
endpoint to include the following parameters:
active=all
above_threshold=true
Using this combination of parameters will return all products that have sellable inventory above the display threshold - regardless of whether they are
ACTIVE
orDEACTIVATED
.
Page Size + GET/List of Products
When using the GET/List of Products endpoint, Treez recommends excluding the
page_size
as a query parameter. Whenpage_size
is excluded Treez will return the maximum amount of information possible by default. Having this set up will ensure that your integration is not making any unnecessary calls to our mutual customer's site. The current maximumpage_size
for the GET/ List of Products endpoint is 1000 for most dispensary instances, with a few specific exceptions.
INTRODUCTION
Using the Product API you can easily create new products in the POS system. The Product API also allows you to update the details of an existing product, search for a specific product, and download a list of all existing products.
Here is a postman collection you can use to start making calls to the Product API.
AUTHORIZATION
In order to access the Product API, please use the client_id
and API key provided to your organization to generate an access_token
with the Authorization API.
LIMITATIONS
- You can’t create an additional data fields for a product.
- You can’t set a field as required.
- You can’t adjust the inventory for a product when you create or update a product.
- You can’t add a product image when you create or update a product. Call the Product Image endpoint separately to add an image.
- Rate limit is 10TPS per Treez location
- Each product variant(s) are a separate product and have their own unique id. This is well-matched with the product module in the POS portal.
UPLOAD A PRODUCT IMAGE VIA API
Treez allows uploading an image via API.
https://api.treez.io/v2.0/dispensary/{dispensary_name}/product/{product_id}/image/upload
DETAILS:
- Upload of gif, jpg, and png images is supported
- Authorization is required
- Image must be uploaded against a valid
product_id
- Only 1 image upload per call
- File size cannot be larger than 5 MB
- Cannot submit an empty file
- Content-Type must be 'multipart/form-data'
- Specify the image name and (optional) path using the 'form' parameter
curl --request POST \
--url https://api.treez.io/v2.0/dispensary/partnersandbox2/product/4e455ece-120a-4286-907f-58503115fa13/image/upload \
--header 'authorization: bearer o96wJz2jwb...' \
--header 'client_id: UMCTcZKXUj...' \
--header 'content-type: multipart/form-data' \
--form [email protected]
{
"resultCode": "SUCCESS",
"resultReason": null,
"resultDetail": null,
"data": {
"url": "https://treezpartnersandbox2.s3.amazonaws.com/product/1e43a152-f84f-4022-a2c6-0c66c86e9e7..."
}
}
Pagination: page_count
and total_count
explained
page_count
and total_count
explained- The
page_count
value provides the count of product records on the current page. - The
total_count
value is the total number of product records in the dispensary instance. - To determine the number of pages of records that are available, divide
total_count
bypage_count
. - All pages will show the same
page_count
with exception of the last page if there is a remainder that's less than the max page size. - Calling a page number that is out of range will return a
200
response withpage_count=0
andtotal_count=0
.
Updated 20 days ago