Ticket Webhooks

Triggering Events

Below are the following events that trigger Ticket's webhooks:

  • Creation of the ticket.
  • When items are changed on a ticket.
  • Status updates:
    • Not triggered by canceled/abandoned/removed tickets in Treez.
    • Webhook is triggered when it passes through various fulfillment stages (Verification Pending, Awaiting Processing, In Process, Packed and Ready, Out for Delivery).
    • Completion of the ticket

Sample Content of the Sent Request

{
    "event_type": "TICKET",
    "data": {
        "type": "POS",
        "ticket_id": "13b3097f-a1e7-4383-a427-236c411704b7",
        "order_number": "APPQI5",
        "external_order_number": null,
        "order_source": "IN_STORE",
        "created_by_employee": {
            "employee_id": "b5c7a935-b232-11e8-9117-0a7674bad720",
            "name": "treez sample",
            "role": "manager"
        },
        "customer_id": null,
        "ticket_patient_type": "ADULT",
        "cash_register_id": "95f4ee49-b125-49fe-a285-f0007b543edc",
        "order_status": "DRAFT",
        "payment_status": "UNPAID",
        "date_created": "2019-08-29T09:43:17.000-07:00",
        "last_updated_at": "2019-08-29T09:43:20.000-07:00",
        "date_closed": null,
        "sub_total": 50,
        "tax_total": 16.033,
        "discount_total": 0,
        "total": 66.03,
        "ticket_note": null,
        "refund_reason": null,
        "original_ticket_id": null,
        "delivery_address": null,
        "scheduled_date": null,
        "items": [
            {
                "product_id": "7e2b2130-da84-11e5-bc38-5c514f48b06a",
                "barcodes": [
                    "HfVz",
                    "CFx",
                    "850000442177"
                ],
                "inventory_barcodes": [
                    "y3I"
                ],
                "location_name": "FRONT OF HOUSE",
                "size_id": "b3fff294-c0e1-11e8-9117-0a7674bad720",
                "product_size_name": "BLOOM FARMS | GG4",
                "quantity": 1,
                "price_total": 66.03,
                "price_sell": 50,
                "product_unit": "GRAMS",
                "apply_automatic_discounts": true,
                "POS_discounts": [],
                "discounts": [],
                "tax": [
                    {
                        "id": "7a9175c9-93e0-4a86-96a4-84261ad205bd",
                        "rate": 0.095,
                        "tax_name": "Sales Tax",
                        "amount": 4.75
                    },
                    {
                        "id": "582be647-23c9-48bf-82ce-662263d2110d",
                        "rate": 0.15,
                        "tax_name": "Excise Tax",
                        "amount": 5.28
                    },
                    {
                        "id": "6230f726-51a8-46fb-bf8f-3db7dbd1b2e6",
                        "rate": 0.1,
                        "tax_name": "LA City Tax",
                        "amount": 6.003
                    }
                ],
                "price_target": null,
                "price_target_note": null
            }
        ],
        "fees": [],
        "payments": [],
        "reward_eligible": true,
        "reward_points_earned": 0,
        "reward_points_used": 0,
        "purchase_limit": {
            "concentrated": "0/8",
            "non_concentrated": "3.5/28.5",
            "plant": "0/6"
        }
    }
}

What’s Next

Check the Parameters Explained page for the ticket API for the definition of each available field.