Parameters Explained

Customer API

Body Parameters

Data Point

Description

Example/Option

status

readOnly

It returns the current status of customers in Treez and whether the profile can still be used in Treez.

ACTIVE for active and
current customers.

DEACTIVATED for the
deleted customers or
the customers those
got merged to others
and accounts were
closed.

MERGED it tells that
some customer
account was merged
into this account at
some point. These are
active customers.

verification_status

readOnly

Returns the verification status of the customer.

Limitations: if existing patient uploads new documentation the status will remain verified

VERIFIED - if existing
customer and
documents have not
expired

VERIFICATION_PEND
ING
- if new customer
or if driver license has
expired or if medical
id has expired
(medical patients
only)

NOT_APPLICABLE-
this value will appear
for profiles merged
into another account
and is deactivated

verification_reasons

readOnly

Returns verification_reason and verification_reason_description

Empty array is returned when verification_status = VERIFIED

VERIFIED - if existing
customer and
documents have not
expired

VERIFICATION_PEN
DING
- if new
customer or if driver
license has expired or
if medical id has
expired (medical
patients only)

birthday

required

It tells the customer’s birth date which also calculates the customer’s age. The format of the date is YYYY-MM-DD.

1988-08-06

email

It reads in the customer’s email address.

NO duplicate email IDs are accepted.

[email protected]
mail.com

phone

It reads in the customer’s phone number. The phone number cannot start with 0 or 1. Do not include special characters while adding a new number to a profile.

Duplicate Phone numbers are NOT accepted.

4094562458

notes

It reads in the additional information added for the customer's profile under the notes section.

This Customer prefers
Sativa products and
edibles.

gender

It displays the customer gender associated to their profile.

M for male
F for female
U for unspecified
N for Non Binary

banned

It reads whether or not a customer from your store is banned or not.

TRUE
FALSE

Addresses

An array that reads the customer's Address data.

type

It displays the value of the type of the address. There are only three values possible for this field and are listed in the column over. Only one address of each type can be submitted.

The field is required if any value of the corresponding address field has the value in it.

ADDRESSOF
RECORD,
ALTERNATIVE
ADDRESS,
SECONDARY

ADDRESS

street1

This field provides the street address of the customer. The field is required if any value of the corresponding address field has the value in it.

6253 DOUGHERTY RD

street2

It reads in the street address of the customer.

APT 8207

city

This field displays the city of the customer.

The field is required if any value of the corresponding address field has the value in it.

DUBLIN

state

It reads in the 2 letter state code of the customer.

The field is required if any value of the corresponding address field has the value in it.

CA

primary

It reads in the value TRUE or FALSE for if the address entered to be treated as Primary Delivery Address.

TRUE
FALSE

zipcode

This field provides the area code for the address. The field is required if any value of the corresponding address field has the value in it.

94568

imageList

It brings in the type and the URL of all the associated documents uploaded for the particular customer.

type

readOnly

It read in the value of the document type to be uploaded. The only values read are –
a) DOCTORS_PERMIT,
b) MEMBERSHIP_AGREEMENT,
c) DRIVERS_LICENSE,
d) MISC_UPLOAD.

It is required if the corresponding data field ‘url’ has the value in it.

DOCTORSPERMIT,
MEMBERSHIP

AGREEMENT,
DRIVERS_LICENSE,
MISC_UPLOAD

url

readOnly

This reads in the URL address for the document to be attached for the customer. It should be valid URL.

It is required if the corresponding data field ‘type’ has the value in it.

http://api.treez.io/
yourdispensary/file/
secure/treeztest/
customer/
1_547_fullLicense_15-04-19-12-31-47

lastupdated

readOnly

This returns the date and time when this document was last updated. The format is YYYY-MM-DD HH:MM:SS.

2019-04-15 12:31:50

customer_id

readOnly

It returns the unique id of the customer.

This is a required field at the time to update the customer’s information.

1117

first_name

required

It reads the customer’s first name.

JOHNNY

middle_name

It reads the customer’s middle name.

JAMES

nickname

This field provides the customer’s nickname, if any.

JR

last_name

required

It reads the customer’s last name.

Appleseed

drivers_license

required

It reads in the driver license number of the customer.

It is required if data field ‘driver_license_expiration’ contains value. It is required if set in the configuration as required field.

NO duplicate IDs are accepted.

C1234567

drivers_license_expiration

required

It reads in the driver license expiration date of the customer. The date format is YYYY-MM-DD.

It is required if the data field ‘driver_license’ contains value.

2029-08-02

is_caregiver

optional

Set it true if wishes to create a caregiver customer.

TRUE
FALSE

caregiver_license_number

optional

It reads in the caregiver license number.

This field is required when the data point "is_caregiver" is set true.

C7654321

state_medical_id

It reads in the Medical MMID number of the customer.

It is required if the patient type is MEDICAL_MMID.

756434

permit_expiration

It reads in the medical card expiration date. The date format is YYYY-MM-DD.

It is required if the field state_medical_id contains value.

2026-08-28

physician_first_name

It reads in the first name of the physician for the customer.

PATRICK

physician_last_name

It reads in the last name of the physician for the customer.

DICKINSON

physician_license

It reads in the physician’s license number

45HGFD32

physician_address

It reads in the address of the physician.

264 WILLOW AVE, CA, 7654

physician_phone

It reads in the physician’s contact number.

87654323456

caregiver_name_1

readOnly

It reads in the name of the primary care giver.

BLUE_SHIELD

caregiver_name_2

readOnly
It reads in the name of the additional care giver. Disabled for now.

N/A

caregiver_details

An array that reads the customer's caregiver information.

caregiver_license_number

readOnly

This reads in the caregiver's license number.

C9123456

caregiver_customer_id

Optional

This reads the member_id of the caregiver of the customer. It should be used if trying to add the caregiver to the profile while creating or updating.

3132

caregiver_name

readOnly

This reads in the caregiver's first and last name.

ARTHUR WOOD

rewards_balance

readOnly

This field provides the current reward balance for the customer.

23

rewards_type

readOnly

It returns the reward type for the customer.

DOLLAR
POINTS

signup_date

readOnly

It returns the date and time when customer joined Treez. at that particular store

"2017-01-23T00:00:00.000-08:00"

last_visit_date

readOnly

It returns the date and time when the customer was last scanned in the store.

"2000-01-01 00:00:00"

last_update

readOnly

It returns the date and time when the customer’s information was last updated via API or POS.

2019-05-02T14:36:49.000-07:00m

opt_out

It reads true/false or null value for the customer’s interest in promotional offers or MailList for marketing purposes. Null indicates that customer has not yet made the selection on the membership agreement form and should be interpreted based on state and local laws for opt in/ opt out procedures.

TRUE
FALSE

referral_source

It reads in the value of the source via which customer got to know about the dispensary’s store or online portal.

FACEBOOK

customer_group

It reads in the value of the group(s) to which a customer belongs. Available for both read and write.
API cannot be used to create a new customer group.

SENIOR

warning_1

It reads in TRUE or FALSE for if the customer has received the first warning.

TRUE
FALSE

warning_2

It reads in TRUE or FALSE for if the customer has received the second warning.

TRUE
FALSE

patient_type

required

It reads in the value for the account type to be created for the customer. The only values that are available are listed in the column to the right.

Data fields ‘state_medical_id’ and ‘permit_expiration’ are required in this case.

ADULT
MEDICAL
MEDICAL_MMID

merged_customer_ids

This gets the value of all the membership IDs whose accounts were merged into this customer account. In case no value is returned, no customer account was ever merged in to this account. The merged_customer_ID field only displays the last 100 merges for a customer.

3456

customer_groups

This reads all the groups to which the particular customer belongs to.

Only the existing groups can be accepted under POST/PUT request.

EMPLOYEE

merged_into_customer_ID

This returns the Membership ID of the account the profile was merged into. This field will only populate if this is the account that was merged and deactivated.

6543


Did this page help you?