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 Invoice APIs.

Distributor Endpoints

EndpointParametersEndpoint Use Case
POST/ Create Distributor

https://api.treez.io/v2.0/dispensary/{dispensary_name}/distributor
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’.Use this endpoint to create new distributor records in a SellTreez instance.
PUT/ Update Distributor

https://api.treez.io/v2.0/dispensary/{dispensary_name}/distributor
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’.

ID - This is the unique ID associated to the Distributor that will be updated in the request. This value will not change once a distributor has been created. ID should be included in the request body, not in the URL path.

"id": "6cea6ab0-1d4a-4430-95a9-47141a40ed7e"
Use this endpoint to update distributor records in a SellTreez instance.
GET/ Distributor by ID

https://api.treez.io/v2.0/dispensary/{dispensary_name}/distributor/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’.

ID - This is the unique ID associated to the Distributor that will be returned in the response. This value will not change once a distributor has been created.
Use this endpoint to retrieve details of a single distributor by unique ID number.
GET/ Distributor List

https://api.treez.io/v2.0/dispensary/{dispensary_name}/distributor/list
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:
Active - This filter allows partners to filter for only active distributors for a Treez site. The acceptable values for this field are 'true' and 'false.

Page - this filter will define the page of results that are being returned in the response.

Type - This filter allows partners to filter by the type of distributor. The two values that can be used with this field are ARMS_LENGTH or NON_ARMS_LENGTH.

id - This filter will allow a partner to define multiple IDs of distributors so the response only returns
Use this endpoint to retrieve a detailed list of all distributors in a SellTreez instance.

Location Endpoint

EndpointParametersEndpoint Use Case
GET/ Location List

https://api.treez.io/v2.0/dispensary/{dispensary_name}/location/list
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:
Page - this filter will define the page of results that are being returned in the response.

sellable - The filter allows the partner to filter by whether or not a location is sellable. Accepted values are true or false.

ID - This filter allows partners to define multiple IDs in the endpoint and only have them returned in the response.
Use this endpoint to retrieve a list of all product locations in a SellTreez instance.

Payment Term Endpoint

EndpointParametersEndpoint Use Case
GET/ Payment Terms

https://api.treez.io/v2.0/dispensary/{dispensary_name}/paymentTerm/list
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:
Page - this filter will define the page of results that are being returned in the response.

Label - Partners can use this filter to define a payment term label and only have that information returned in the response

ID - This filter allows partners to define multiple IDs in the endpoint and only have them returned in the response.
Use this endpoint to retrieve a list of all payment terms from a SellTreez instance.

Invoice Endpoints

EndpointParametersEndpoint Use Case
POST/ Create Invoice

https://api.treez.io/v2.0/dispensary/{dispensary_name}/invoice
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’.Use this endpoint to create a new invoice in a SellTreez instance.
PUT/ Update Invoice

https://api.treez.io/v2.0/dispensary/{dispensary_name}/invoice
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’.

ID - This is the unique ID associated to the invoice that will be updated in the request. This value will not change once an invoice has been created. ID should be included in the request body, not in the URL path.

"id": "6cea6ab0-1d4a-4430-95a9-47141a40ed7e"
Use this endpoint to update an existing invoice record in a SellTreez instance.
PATCH/ Update Invoice

https://api.treez.io/v2.0/dispensary/{dispensary_name}/invoice
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’.

ID - This is the unique ID associated with the invoice that will be returned in the response. This value will not change once an invoice has been created.

Note: Invoice ID is the only required field, and should be included in the request body, not in the URL path.

"id": "6cea6ab0-1d4a-4430-95a9-47141a40ed7e"
Use this endpoint to update and existing invoice record in a SellTreez instance.
GET/ Invoice by ID

https://api.treez.io/v2.0/dispensary/{dispensary_name}/invoice/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’.

ID - This is the unique ID associated to the invoice that will be returned in the response. This value will not change once an invoice has been created.
Use this endpoint to retrieve a specific invoice by unique ID number.
GET/ Invoice by Date Range

https://api.treez.io/v2.0/dispensary/{dispensary_name}/invoice/updated/from/start_date/to/end_date
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’.

start_date - The beginning of the time range that will be used to pull up a list of invoices.

end_date - The end of the time range that will be used to pull up a list of invoices by the date the invoice was created.
Use this endpoint to retrieve a list of detailed invoices by date range.

*Only 30 days of invoice history is available.

What’s Next