FAQ - Customer API

What endpoint are available for use?

  • GET - Details by Customer_id
  • GET - Details by Email Address
  • GET - Details by First & Last Name
  • GET - Details by Driver license
  • GET - Details by Phone Number
  • GET- Filter by SignUp date range
  • GET - Filter by Last_Updated_at
  • POST - Create Customer
  • POST - Update Customer By Customer_id
  • PATCH - Update Customer
  • POST- Upload document(See below)

Check out the Developer's portal to learn about and test these endpoints.

Can we create a verified customer? Do Customers that have a Verification_Pending status need to be verified in Treez?

You cannot create customers that are verified. It is possible to bypass the verification pending flow. Partners have the ability to place orders in any status of fulfillment they like, with the exception of the completed status on the initial request to create a ticket. If you would like to skip this workflow in fulfillment, place the order in awaiting_process.

How can we add customer groups as an option for customer management?

Customer groups cannot be created via the Customer API. Customer groups must be added directly to the Treez portal before they are available for use within the Customer API.

Can we get a list of deactivated customers? Can we deactivate a customer profile via the Customer API?

No, the Customer API does not support retrieval of a list of deactivated customer records. It is however possible to update customers to a deactivated status through the Customer API.

How do you calculate reward points?

Points are calculated based on either the grand total or subtotal of a transaction depending on the configuration in the Treez Portal.

Can we add a discount or a promotion code for that customer?

The Customer API does not have a direct way to add one-time promo or discount directly to the customer's profile. You can, however, add an existing customer group that is eligible for a discount using the Customer API. In order for automatic customer group discounts to appear on an order the customer_id needs to be included in the request to create/update an order. The Ticket API also has functionality that will allow a partner to apply discounts to line items in a ticket.

How can we upload the customer image/docs/id?

There is an endpoint available for uploading customer documents. This endpoint has a few performance restrictions (listed below) that's the reason it is not mentioned through the entirety of CodeTreez documents.

URL endpoint: https://api.treez.io/v2.0/dispensary/{dispensary_name}/customer/document/base64/upload/{customer_id}

Sample body:

[
   {
      "file_name": "hz.pdf",
      "file_type": "drivers_license",
      "encoded_string": "base64_encoded_string_goes_here"
   },
   {
      "file_name": "hz.pdf",
      "file_type": "misc_upload",
      "encoded_string": "base64_encoded_string_goes_here"
   }
]

Restrictions:

  • Requires authorization.
  • Encoded string takes base64 format only.
  • File size can't be bigger than 5 MB.
  • Can't submit an empty file.
  • File Extension supported are - jpeg, jpg, png, doc, pdf, md, txt, gif, ppt, csv.
  • File_type accepted: misc_upload, doctor_permit, membership_agreement, drivers_license
  • No more than 2 files at a time.

What’s Next

If you have any specific