Available Endpoints
This page provides the various endpoints available to the partner and the capabilities of that endpoint.
Here is a Postman collection you can use to start making calls to the Product API.
Endpoint | Parameters | Endpoint Use Case |
---|---|---|
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. NOTE: 'TRUE' is used by default if this parameter is not specified. 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. Note: Results are sorted by name asc, product_id asc. |
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. |
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. |
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. |
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. |
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. |
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. | 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. |
Updated over 1 year ago