HOWTO: Create Orders Using The API

 


Selecting a ticket group

All orders need a ticket group, usually chosen from the response of Listings / Index.

 

Create a client

The order process requires that the client (purchaser) already exists. Usually this means that you need to use the Clients / Create endpoint. Within the response of successful client creation will be a unique id (a/k/a client_id) that must be captured and retained for use when POSTing the order. If this is a repeat customer, be sure to utilize the existing client_id instead of creating a duplicate client entry.


Create the client’s properties

The Ticket Evolution API allows you to store various properties for clients including, Company, Email Address(es), Phone Number(s), Address(es) and even Credit Card(s). You can create each of these individually and capture the resulting item’s id for use when creating the order or you may create them at the time of the order. It is recommended that you create each item before the order and that your checkout process include the ability to add/edit/delete these various properties. Each of these properties has a label attribute that can be used to help separate a Home address from a Work address. The labels can be any string you wish—up to 20 characters.

 

A good example of how such properties can be managed at checkout—and also within a client profile section—is Amazon.com as shown below.





Creating Client Credit Cards

If you are utilizing the Braintree Gateway that we have fully integrated with the Ticket Evolution API you can also store client credit card information. Braintree stores the credit card information in their PCI Complaint vault and returns a unique identifier that Ticket Evolution records allowing you to process future transactions using the same payment information. The credit card information is never stored by Ticket Evolution.

If you do not utilize the Braintree Gateway you will not be able to store credit card information, nor will our API process payments for you. Instead, you will need to handle payment processing on your end before submitting the order.

 

Choose a delivery method

In your Settings you must specify the delivery options that you wish to allow. It is suggested that you include as many of the non-ground FedEx as you wish as well as Eticket, Will Call and Local Pickup.

Shipping via FedEx

If you are going to permit FedEx as a delivery method you will need to let us know so that we can enable it for your account. You can also choose to participate in our FedEx Discount Program

When you create and order with a FedEx method of shipping you must pass the shipping address (preferably by using an existing address_id. This allows the Seller to simply click a button to generate a FedEx label to ship the tickets to your customer.

FedEx Cannot Ship To PO Boxes

REMEMBER: FedEx cannot ship to P.O. Boxes. Please ensure that the address is not a PO Box or PMB before submitting it with an order. A sample regex for detecting US P.O. Boxes is at https://forrst.com/posts/Regular_Expression_to_identify_a_PO_Box-uG6

FedEx Service Types

Although you can specify an explicit service_type such as STANDARD_OVERNIGHT it is recommended that you always use LEAST_EXPENSIVE. When the airbill is created we will check with FedEx’s API to see what options are available at that time and then use an algorithm to determine which of those available methods will get the package to your customer on time with the lowest cost to you.

Determining the delivery method

Determining the delivery method for a specific ticket group can be complex because you need to consider several different variables:

  • format: Are they etickets or physical tickets?

  • in_hand: Are the tickets in hand and ready to ship? If not, you also need to consider the in_hand_on date.

  • delivery address and time to the event: If the tickets are being shipped you need to ensure that they can be delivered in time for your customer to make it to the event.

Luckily, we have made it easier to account for all these variables by providing the Shipments / Suggestions endpoint. Simply provide the  ticket_group_id and the shipping address_id and we will utilize our algorithm to return which of your shipping methods we suggest. Shipments / Suggestions may return a specific FedEx service_type, but as mentioned above, we recommend that you use LEAST_EXPENSIVE when creating the order, but you probably should use the price returned as the price to charge your customer.

Choose a payment method

Most Brokers and Partners placing orders from their website will use either credit_card or offline as the payment method. 

If you are utilizing our Braintree Gateway then you should submit your orders with a payment type of credit_card. If you are not using the Braintree Gateway then you are responsible for handling payment processing on your own before you place the order using a payment type of offline.

Offline payments

WARNING: When using the offline payment type you must ensure that you have received payment and completed any fraud reviews before submitting your order.

Submit the order details

Once you have handled all of the above you are ready to POST your order details to the Orders / Create endpoint. The details must be JSON encoded in the POST body.




  • Related articles