Ticket APIs

INTRODUCTION

Tickets are how customer orders are represented in Treez. The Ticket API allows you to search, create, and update orders for customers in a Treez portal.

AUTHORIZATION

In order to access the Ticket API, please use the client_id and API key provided to your organization to generate an access_token with the Authorization API.

LIMITATIONS

  • Once payments are added to the ticket, the Ticket API can’t be used to update information on the ticket.
  • When the ticket status is posted as COMPLETED, the only update that can be made to the ticket is adding a payment. No other changes will be accepted by the Ticket API.
  • Refunds can’t be handled or processed using the Ticket API.
  • Ticket API cannot process the adding of products and ticket payment in the same request. Products should be added to the ticket first and then the payment should be posted in a separate API call to the Update Existing Ticket endpoint.
  • Partial payments for tickets aren’t supported via Ticket API. It can either process the full payments or null. The payment amount posted should equate to data_point - total.
  • The GET/ Ticket by Last Updated date can only pull data going back 30 days. If the limit is exceeded, you will not get a successful response back.
  • The Ticket API allows you to apply item level discounts but not cart level discounts.
  • While using the Create Ticket API endpoint for delivery orders, it should be noted that the configurations in Treez for the delivery zone do not impact the Ticket API. The configs in question are Delivery Radius, Included Zip Codes, and Excluded Zip Codes. These configurations can be found in Treez by going to Configuration>Config Page>eCommerce>Display Preferences. Partners should coordinate on the approved delivery zone with their Clients.
  • API response limit is 50 results per request call.
  • Rate limit is 5TPS per client_id.

📘

Ticket Preview Behavior

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 placed the order. The batch you previewed the order total from may have been sold out and the order might have been placed from the different batch having different taxes.

ERROR RESPONSES

Listed below are few commonly experienced errors.

Error Key

Error Description

VALIDATION_ERROR

When the POST/PUT request fails to meet the applied validation checks.

PARTIAL_PAYMENT_NOT_SUPPORTED

In case of less or more payment amount is posted than expected i.e. total.

CAN NOT UPDATE 'PAID' TICKET

If trying to update a 'PAID' ticket.
A new ticket should be created for new orders. In the case of refunds associated, those need to be handled manually in the store.

LOCATION_NAME DOES NOT MATCH

In case the product demanded is not located at the specified location.

OUT_OF_STOCK

Quantities entered is more than the available quantities for the item. Request can't be fulfilled.

RESPONSE_LIMIT_EXCEEDED

Response limit entered exceeds the maximum limit. Please do not exceed 50 per request call.

WORKFLOW

CREATE TICKETCREATE TICKET

CREATE TICKET

UPDATE TICKETUPDATE TICKET

UPDATE TICKET


Did this page help you?