Parameters Explained

Ticket API

📘

Endpoint - Ticket Preview

Ticket preview API may show different totals sometimes. The reason is related to the tax total. Different inventory batches may have different taxes applied to them. There could be a time gap when you previewed the order and you actually placed the order. The batch you previewed the order total from may have been sold out and the actual order might have been placed from the different batch having different taxes.

Body Parameters

Data PointDescriptionExample/Options
type Required

Various types of tickets that Treez current accepts
Accepted values:

POS
DELIVERY
PICKUP
EXPRESS
ticket_id Read-Only

It returns the unique identifier for the ticket. Required for updating the information of existing ticket.
539a9127-3558-49ce-8245-257a6a05430c
order_number Read-Only

The customer facing order ID that is referred as receipt number on the ticket.
U2HNQ5
external_order_number This is an optional field and can be used by the integration partner for additional tracking. Order ID of the external integrating system.asd2123d
order_source Required

This tells the source used to place the order.
Accepted values:

KIOSK
ECOMMERCE
IN_STORE
VENDING_MACHINE
created_by_employee This tells the information of the employee who created the ticket. Blank for online orders, kiosk, API etc.
employee_id It brings in the employee id who has processed the order.f42ba95f-db7b-11e9-a587-0a1adb07b79e
name It returns the full name of the employee.ROBERT_PATTIRSON
roleIt tells the employee’s role.MANAGER
customer_id The field refers to the Member ID of the customer making the purchase. Blank if no customer is selected.2
packed_by_employeeThis array provides information on the fulfillment agent who packed the order.
nameThis field is nested in the packed_by_employee array and provides the name of the fulfillment agent who packed the order.John Smith
ticket_patient_type Read-Only

Tells the patient type at the time the sale was completed.
ADULT
cash_register_id Read-Only

It returns the cash Register Number, or ONLINE_ORDER, KIOSK, EXTERNAL in the case it was created via API.
X001
order_status Required

It reads the current status of the order. The only options that are accepted are:
Accepted values:

- VERIFICATION_PENDING
customer verification is needed

- AWAITING_PROCESSING
customer verification has been completed (or not necessary) and fulfillment is pending

- IN_PROCESS
the order is in the process of being fulfilled

- PACKED_READY
the order is packed and ready for the customer to pickup or to be delivered

- OUT_FOR_DELIVERY
the order is in-transit to the customer

- COMPLETED
the order is completed and paid

- CANCELED
the order is cancelled by the customer
payment_status Read-Only

It tells if the ticket is pre-paid or not. The only value it accepts are:
Accepted values:

PAID
UNPAID
AUTHORIZED
REFUNDED
date_created Read-Only

It returns the date when the ticket was created. It is a system generated value.
2019-04-29T11:39:21.000-07:00
last_updated_at Read-Only

It returns the date when the ticket was last updated in the Treez POS. It is a system generated value.
2019-04-29T11:39:22.000-07:00
date_closed Read-Only

It returns the date when the ticket was completed, abandoned or cancelled. It is a system generated value.
2019-04-30T11:39:22.000-07:00
sub_total Read-Only

It returns the sum of all line items and fees without tax.
2.9993
tax_total Read-Only

It returns the value of the total tax applied on the ticket.
0.273
discount_total Read-Only

It returns the value of the total discount applied on the ticket.
-12.4999
total Read-Only

It returns the due amount i.e., the grand total.
3.28
ticket_note It could be a note left by cashier during checkout or a note from the external partner while posting the ticket.THIS IS THE FRESH TICKET
refund_reason Read-Only

It returns the reason if entered at the time of a refund via POS.
THE ITEM WAS DEFECTIVE
original_ticket_id Read-Only

This value is only returned for refunded tickets. It refers to the parent ticket_id against which a refund was made.
539a9127-3558-49ce-8245-257a6a0543de
delivery_address It refers to the Pickup or Delivery address entered when the order was processed.-
id Read-Only

It returns the address id for the particular address.
wer-234-ty-87555
street It records the address for the pick up or delivery order types.
It is a conditionally required field if any corresponding address field contains the value.
7000 Coliseum Way
street2This is the 2nd field available for street value of an address. This usually denotes the suite or apartment number for a delivery address.300
city It records the city name.
It is a conditionally required field if any corresponding address field contains the value.
Oakland
countyOptional field that is applicable only to delivery_address in orders of type DELIVERY.

Required for dynamic sales tax calculation.
Alameda
state It records the 2-letter state code.
It is a conditionally required field if any corresponding address field contains the value.
CA
zip It records the ZIP number for the area. 5 digits in general.
It is a conditionally required field if any corresponding address field contains the value.
94621
scheduled_start_dateUse to specify the start time of a delivery window. Use with scheduled_date.2024-01-27T16:00:00.000-07:00
scheduled_date It refers to the delivery or pickup scheduled time. (ISO 8601 formatting)

This parameter can be used by itself, or to specify the end time of a delivery window when used with the scheduled_start_date parameter.
2024-01-27T18:00:00.000-07:00
delivery_minimum_totalRead-Only

Shows the minimum order total required to quality for delivery. This value is defined in SellTreez config page -> ecommerce tab.
"delivery_minimum_total": "25.00"
items It includes all the items ordered in the ticket.
product_id Read-Only

It refers to the product unique id. Can be used to track the product from product API.
7e2b2130-da84-11e5-bc38-5c514f48b06a
barcodes Read-Only

This returns the barcode at the product level. It is visible ID that can be scanned to identify the product such as SKU.
[ "z3tM", "Y2tM" ]
inventory_barcodesRead-Only

This returns the barcode at the inventory level. It is a visible ID that can be scanned to identify the product and particular shipment such as SKU.
[ "W23r", "Y85t" ]
location_nameThis is the field to identify the inventory location.

To use this feature with the POST/Create Ticket endpoint at a store, reach out to [email protected] to ensure the necessary configurations are enabled.
FRONT OF HOUSE
size_id Required

It is the unique identification of the product. It can be retrieved from the Product API as the data point product_id.
7b9406c0-0621-11e8-b4e9-02429027d658
product_size_name Read-Only

It returns the name of the exact product ordered.
CHEM FIRE
quantity Required

It refers to the quantity of the particular item ordered in the ticket.

While placing an order, this value determines the number of units being ordered for a product. When placing an order for bulk flower the quantity field will determine the amount of grams included in an order.
3
price_total Read-Only

It tells the total price for the line including discounts and tax.
10
price_sell Read-Only

It returns the total price of all units of a given product, excluding taxes.
39.9985
product_unitRead-Only

Provides unit of measurement of the product
Accepted values:

GRAMS
LITERS
MILLIGRAMS
MILLILITERS
OUNCES
COUNT
product_amountRead-Only

Amount of the product that corresponds to the product_unit field.
3.5
state_tracking_uomRead-Only

Unit of Measure provided by the state tracking system.
each
product_unit Read-Only

It returns the unit of measure of the product say each, gm etc.
GRAMS
apply_automatic_discounts This field refers to the automatic discounts that are applied to the product when entered to a cart unless removed. This takes in either TRUE or FALSE. The value by default is kept as TRUE to support the POS behavior.Accepted values:

TRUE
FALSE
POS_discounts This refers to the discount that can be applied at the POS per line item.-
discount_title It reads in the name of the discount to be applied.
It is a conditionally required field if any corresponding POS_discount field contains the value.
CUSTOM PRICE ADJUSTMENT
discount_amount It takes in the amount value for the discount to be applied. Amount value can either be a dollar value or the percentage value.
It is a conditionally required field if any corresponding POS_discount field contains the value.
110
discount_method It reads in the specified method for the amount entered. It only reads DOLLAR or PERCENT.
It is a conditionally required field if any corresponding POS_discount field contains the value.
Accepted values:

DOLLAR
PERCENT
discounts This returns the list of all the discounts applied per line item.-
discount_title Read-Only

It returns the name of the discount.
CUSTOM PRICE ADJUSTMENT
discount_amount Read-Only

It returns the amount value for the discount for the line item.
110
discount_method Read-Only

It tells the discount method for the amount. It is always either DOLLAR or PERCENT.
Accepted values:

DOLLAR
PERCENT
savings Read-Only

This is always the dollar value that tells the total savings done after the discount is applied.
110
discount_category Read-Only

List the various type of discounts applied to a ticket.
Accepted values:

AUTOMATIC
TIER
REWARD DOLLARS
CUSTOM PRICING
POS DISCOUNT
tax --
id Read-Only

It returns the value of the particular id of the tax applied to the ticket line.
4d8da9db-63af-41f9-8564-a3e86d75b73b
rate Read-Only

It tells the value of tax rate in percentage.
0.0925
tax_name Read-Only

Display the name of the tax applied.
Sales Tax
amount Read-Only

It tells the amount value in dollars applied for the particular tax.
0.2775
price_target It can be used for pricing adjustment. It overrides the price_sell and all taxes/fees will be calculated over it. If target_price is set, all other applied discounts will be ignored.3
price_target_note Note associated with the target price adjustment.I've set the price target now.
fees--
type Read-Only

It reads in the name of the fee type applied.
Delivery Fee
total_amount Read-Only

It takes in the amount value for the fee applied. Amount value is a dollar value.
7
reward_eligible Read-Only

It tells if the ticket counts towards reward points or not.
Accepted values:

TRUE
FALSE
reward_points_earnedRead-Only

If the ticket is eligible it returns the value of the points earned.
2
reward_points_usedRead-Only

It returns the reward points used in the particular order.
2
paymentsIt includes the payment details for the ticket.-
payment_idRead-Only

It returns the payment id of the particular payment posted.
39532a86-d2ac-4b1e-9c6d-6e13db34b3d3
payment_sourceThis refers to the source via which payment is posted and accomplished.
It is a conditionally required field if any corresponding payment field contains the value.
Accepted values:

KIOSK
ECOMMERCE
IN_STORE
VENDING_MACHINE
payment_methodIt reads the payment method used to accomplish the payment for the ticket. In the case of refunds, the method is always going to be CASH.
It is a conditionally required field if any corresponding payment field contains the value.
Accepted values:

CREDIT
DEBIT
CASH
CHEQUE
ACH
amount_paidThe amount value paid by the customer using the particular method.
Only the exact amount that is expected to be paid is accepted.
It is a conditionally required field if any corresponding payment field contains the value.
3.28
payment_dateRead-Only

The timestamp when the payment was submitted. It reads the format yyyy-mm-dd.
2019-04-29T18:39:21+00:00
purchase_limitIt reads the consumed products in a day. All items consumed will be reflected in their respective purchase limit groups.

NO ticket can be created for customers who reach/exceed their purchase limits.

Some CA stores are an exception to this rule. If medical customer are allowed to exceed purchase limits because of a prescription from a doctor you can generate a ticket over the recommended purchase limit without encountering an error.
-
concentratedIt reads the consumed value for the 'concentrated' in the particular ticket.0.1/8
non_concentratedIt reads the consumed value for the 'non_concentrated' in the particular ticket.0/228
plantIt reads the consumed value for the 'plant' in the particular ticket.0/12
delivery_routeThis Array provides the partner the ability to add additional data about the driver, car and route that is being taken for a delivery-
driver_nameThis field is used to contain the name of the driver completing the deliveryJohn Doe
driver_occupational_license_numberOccupational license for the delivery driver.42523451
driver_vehicle_license_numberDrivers license of the delivery driverF1214231234
phone_number_for_questionsThe phone number that should be used when the Driver or customer have questions.9252820916
vehicle_makeMake of the car completing the delivery.Honda
vehicle_modelModel of the car completing the delivery.Civic
vehicle_license_plate_numberLicense plate number for the car making the delivery45HG29
estimated_departure_datetimeThis should be the estimated departure time of the delivery.2020-10-24T11:00:00.000
estimated_arrival_datetimeThis should be the estimated arrival time of the delivery.2020-10-24T13:00:00.000
planned_routeThis array provides the multiple legs and steps for the process of making the delivery.-
legsThe Legs array contains the multiple steps that are necessary for completing a delivery.-
stepsThe Steps array details the necessary route you are taking for a leg of the journey.-
html_instructionsThis field details what is necessary to do to complete the step in a leg of a route.Head \u003cb\u003enorth\u003c/b\u003e on \u003cb\u003eS Morgan St\u003c/b\u003e toward \u003cb\u003eW Cermak Rd\u003c/b\u003e
distanceThis array provides the necessary distance to complete each step in the planned_route.-
textThis field provides the distance for each step.0.1 mi
vinVIN of the car making the delivery123123SDSSDFSDSFSF
employee_IdThis is an editable field that allows partners to associate transactions with employees that have a profile in Treez. Employee ID equates to the employee # which can be found on the user management page of Sell Treez.C3K3IZ
cash_drawer_nameThis editable field allows partners to associate orders with a certain cash drawer when creating or updating tickets. Once the order has been completed, the numbers for that transaction will be displayed in the drawer the partner associated it with.CD01
revenue_sourceThis field allows the partner to designate the source of the ticket. this field will be displayed on the fulfillment page of Treez.

This is a required field. This field needs to be populated with the partner name in order to be able to create a ticket through the API
weedmaps
payment_authorizationThis field should only be used with customers who are using the Stronghold TreezPay feature of Treez. When a ticket payment_authorization is marked as 'true', SH has to run a check to make sure the customer's bank account is active, accessible, and has the required funds for the transaction. At this step, SH will not place a hold on the funds nor will they withdraw funds from a customer's account.true
false
webhookArray containing the ticket number webhook information associated with a specific order.-
webhook_idUnique ID associated to a webhook upon generation.a51ddd83-40ba-484c-bf43-c80440067b1b
shared_secretSecret API key that is associated to the webhook upon creation.JTUHMP1C49OJWA2YPC9OPQIN
listener_urlWebhook URL that is associated to the the order.https://en0xy121gm7m6j.x.pipedream.net/