Available Endpoints

Available Endpoints

Sample Request & Response

curl --location 'https://api.treez.io/v2.0/dispensary/partnersandbox2/stock/getStock' \
--header 'client_id: UMCTcZKXU...' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9...'
{
   "resultCode":"SUCCESS",
   "resultReason":null,
   "resultDetail":null,
   "data":{
      "page_elements":200,
      "total_elements":468,
      "stock":[
         {
            "product_id":"00511bd7-4297-4826-abbb-8a9215100d8b",
            "product_name":"LITTLE HELPERS BOOST",
            "product_brand":"BEST LIFE",
            "product_type":"EDIBLE",
            "product_subtype":null,
            "product_uom":null,
            "inventory_details":[
               {
                  "location_name":"BACK OF HOUSE",
                  "inventory_type":"ADULT",
                  "sellable_quantity":80.0,
                  "last_updated_at":"2023-02-14T11:12:25.000-08:00"
               },
               {
                  "location_name":"SHELF02",
                  "inventory_type":"ADULT",
                  "sellable_quantity":20.0,
                  "last_updated_at":"2023-02-14T11:12:32.000-08:00"
               }
            ]
         },
         {
            "product_id":"00e5fc08-2509-44ef-8945-29fa4a0fac13",
            "product_name":"LAVA CAKE",
            "product_brand":"HEAVY HIYTERS",
            "product_type":"CARTRIDGE",
            "product_subtype":"510 THREAD",
            "product_uom":"GRAMS",
            "inventory_details":[
               {
                  "location_name":"RETAIL",
                  "inventory_type":"ADULT",
                  "sellable_quantity":144.0,
                  "last_updated_at":"2023-02-16T20:41:21.000-08:00"
               }
            ]
         },
         {
            "..."
         }
      ]
   }
}

Optional URL Parameters

ParameterDescriptionUsage Example
location_nameUsed to look up specific inventory locations available in Treez and return sellable inventory available.cation_name=RETAIL

{dispensary}

required

The hostname of the dispensary to which the API call will be made. This information can be pulled from the client's SellTreez URL. The dispensary name is listed before treez.io in the URL. ie. partnersandbox2.treez.io dispensary name is ‘partnersandbox2’.api.treez.io/v2.0/dispensary/partnersandbox2/
product_type

Used to return products based on the category they were assigned upon creation.

Accepted values:
BEVERAGE, PLANT, PREROLL, MERCH, NON-INV, TINCTURE, MISC, TOPICAL, CARTRIDGE, FLOWER, PILL, EXTRACT, EDIBLE

product_type=PLANT
product_idUsed to get responses for up to 50 different products in one call. The product_id is unique ID assigned to a product upon creation.

Single:
product_id=8e399275-966d-4fab-82b9-92e8f59a0862

Multiple:
product_id=8e399275-966d-4fab-82b9-92e8f59a0862∏uct_id=0072bf3d-9441-44a9-ab6a-8b2e5357cd6d

last_update_dateUsed to look up changes in product inventory since the date provided. The last_update_date will change when inventory level changes for a product, whether through sale, intake, or transfer.last_update_date=2023-01-31T12:31:25.000-07:00
inventory_type

Used to filter based on whether a product is meant for medical or adult use.

Accepted values: MEDICAL, ADULT, ALL (Use ALL for non-cannabis products.)

inventory_type=ADULT
active

Used to return products based on status.

Accepted values: true, false

Default if not specified: true

active=true
minimum_sellable_quantityUsed to return products where sellable_quantity is greater than or equal to the specified value. If this value is not specified the response will include all results.minimum_sellable_quantity=80
pageThe page index to be returned in the response. Must be greater than 0.page=2
group_by_packageReturns results for each product grouped by Metrc package ID

group_by_package=true

Accepted values: true, false

Defaults to false if parameter is not used

include_non_sellableReturns non-sellable quantity of each product in addition to the sellable quantity

include_non_sellable=true

Accepted values: true, false

Defaults to false if parameter is not used

page_size

Used to define the maximum number of complete records to be returned per page. This value cannot exceed 200.

Default if not specified: 200

?page_size=125

What’s Next