Available Endpoints

This page provides the various endpoints available to the partner and the capabilities of that endpoint.

Enpoint

Parameters

Endpoint Use Case

Endpoint sample

GET/ List of Products:

https://api.treez.io/v2.0/dispensary/
dispensary_name/product/product_list?&page=page_number

dispensary_name - this information can be pulled from the client's URL. The dispensary name is listed before treez.io in the URL. ie. partnersandbox2.treez.io dispensary name is ‘partnersandbox2’.

Available Filters:

category_type - this parameter allows partners to filter for certain product types.

active - The active parameter allows partners to search for active products in the catalog. If this parameter is set to 'FALSE' only deactivated products will be returned in the response. If this parameter is set to 'TRUE', only active products will be returned. If this parameter is set to 'ALL', it will return both active and deactivated products.

ID - This parameter allows partners to search up to 50 unique product IDs at a time.

sellable_quantity_in_location - This allows partners to filter for products in a particular location in Treez.

sellable_quantity_in_type - This field allows the partner to filter based on the inventory type of the product. The filters for this filter are MEDICAL, ADULT, and ALL.

above_threshold - When the parameter is set to 'TRUE' the response will only contain products that are above the minimum_visible_inventory_level set up in the config page of Treez. If 'FALSE' the products listed in the response will below the inventory threshold.

This endpoint provides a catalog of all products within the Treez instance. This endpoint has multiple query parameters that allow partners to filter what is returned in the response.

https://api.treez.io/v2.0/dispensary/partnersandbox2/product/product_list?&page=1

GET/ List of Products by Last_updated_at:

https://api.treez.io/v2.0/dispensary/
dispensary_name/product/product_list/
lastUpdated/after/date_time?&page=page_number

dispensary_name - this information can be pulled from the client's URL. The dispensary name is listed before treez.io in the URL. ie. partnersandbox2.treez.io dispensary name is ‘partnersandbox2’.

date_time - This value should be set to the point where you would like to see all products that have been updated after the time selected. The approved format for this field is yyyy-mm-ddThh:mm:ss.000-08:00.

This endpoint can be used to return all products that have been updated after a certain point in time. The last_updated_at value only updates after details of a product have been changed.

*Note: Inventory quantity changes do not update this field.

https://api.treez.io/v2.0/dispensary/partnersandbox2/product/product_list/lastUpdated/after/2020-12-20T14:44:44.000-07:00?&page=1&pagesize=50

GET/ Product by ID

https://api.treez.io/v2.0/dispensary/
dispensary_name/product/product_id

dispensary_name - this information can be pulled from the client's URL. The dispensary name is listed before treez.io in the URL. ie. partnersandbox2.treez.io dispensary name is ‘partnersandbox2’.

product_id - Unique ID associated with each product. This value will not change once a product has been created.

This endpoint allows partners to return product details for one or more specific products by product_id.

Note: You can pass up to 50 product_ids per call.

https://api.treez.io/v2.0/dispensary/partnersandbox2/product/7b9406c0-0621-11e8-b4e9-02429027d658

POST/ Upload an Image to a Product

https://api.treez.io/v2.0/dispensary/
dispensary_name/product/product_id/image/upload

dispensary_name - this information can be pulled from the client's URL. The dispensary name is listed before treez.io in the URL. ie. partnersandbox2.treez.io dispensary name is ‘partnersandbox2’.

product_id - Unique ID associated with each product. This value will not change once a product has been created.

This endpoint allows partners to upload an image to an existing product.

*Note: You cannot create a product AND upload an image to the product in the same call.

https://api.treez.io/v2.0/dispensary/partnersandbox2/product/7b9406c0-0621-11e8-b4e9-02429027d658/image/upload

POST/Create Product

https://api.treez.io/v2.0/dispensary/
dispensary_name/product/create

dispensary_name - this information can be pulled from the client's URL. The dispensary name is listed before treez.io in the URL. ie. partnersandbox2.treez.io dispensary name is ‘partnersandbox2’.

This endpoint allows partners to create new products. These products can then be assigned inventory.

*Note: Creating a product does not add inventory to the product, it only creates a product master.

https://api.treez.io/v2.0/dispensary/partnersandbox2/product/create

PUT/Update Product

https://api.treez.io/v2.0/dispensary/
dispensary_name/product/update/product_id

dispensary_name - this information can be pulled from the client's URL. The dispensary name is listed before treez.io in the URL. ie. partnersandbox2.treez.io dispensary name is ‘partnersandbox2’.

product_id - Unique ID associated with each product. This value will not change once a product has been created.

This endpoint allows partners to edit details of an existing product.

https://api.treez.io/v2.0/dispensary/partnersandbox2/product/update/7b9406c0-0621-11e8-b4e9-02429027d658

GET/ Product Fields by Category Type

https://api.treez.io/v2.0/dispensary/
dispensary_name/product/update/product_id?category_type?&page=page_number

dispensary_name - this information can be pulled from the client's URL. The dispensary name is listed before treez.io in the URL. ie. partnersandbox2.treez.io dispensary name is ‘partnersandbox2’.

category_type - This field is the equivalent to product type. The value of the field describes the type of product it is.

Example values for this field are:
FLOWER
PREROLL
EXTRACT

Please check the Parameters Explained section for the complete list.

This endpoint allows partners to see all available fields based on category type. It also informs the partner if the field is required or not for that category.

https://api.treez.io/v2.0/dispensary/partnersandbox2/product/product_fields?category_type=FLOWER


Did this page help you?