Orders can have the following states:
"pending"
"accepted"
"rejected"
"cancelled"
"expired"
"pending_substitution"
{
"orders" => [
[0] {
"child_orders" => [
[0] 11731
],
"service_fee" => "72.6",
"items" => [
[0] {
"price" => "242.0",
"eticket_downloaded_at" => "2012-09-15T22:23:38Z",
"quantity" => 2,
"eticket_delivery" => true,
"id" => "11961",
"ticket_group" => {
"retail_price" => "242.0",
"remote_id" => "191497",
"url" => "/ticket_groups/16637811",
"quantity" => 2,
"wholesale_price" => 210.0,
"row" => "28",
"seats" => [
[0] 20,
[1] 21
],
"external_notes" => "Can email 40-50 yardline",
"section" => "120",
"event" => {
"occurs_at" => "2012-09-16T13:00:00Z",
"url" => "/events/304581",
"venue" => {
"address" => {
"locality" => "Philadelphia",
"id" => "209541",
"region" => "PA"
},
"name" => "Lincoln Financial Field",
"id" => "2542"
},
"name" => "Baltimore Ravens at Philadelphia Eagles (Home Opener)",
"id" => "304581"
},
"id" => "16637811",
"office_id" => 141
},
"eticket_available" => true
}
],
"client" => {
"phone_numbers" => [],
"url" => "/clients/3447",
"email_addresses" => [
[0] {
"label" => nil,
"address" => "dgainor@me.com",
"id" => "1873"
}
],
"name" => "CheapTickets",
"id" => "3447"
},
"buyer" => nil,
"state" => "accepted",
"additional_expense" => "0.0",
"shipping" => "5.0",
"created_at" => "2012-09-15T22:05:57Z",
"po_number" => nil,
"total" => "561.6",
"billing_address" => {
"street_address" => "123 Merry Lane",
"extended_address" => "#2A",
"label" => "billing",
"updated_at" => "2012-09-15T19:01:31Z",
"url" => "/clients/3447/addresses/231231",
"primary" => false,
"country_code" => "US",
"locality" => "Jersey City",
"name" => "John Smith",
"latitude" => nil,
"postal_code" => "07030",
"id" => "231231",
"longitude" => nil,
"region" => "NJ"
},
"url" => "/orders/11730",
"updated_at" => "2012-09-15T22:22:59Z",
"tax" => "0.0",
"seller" => {
"brokerage" => {
"url" => "/brokerages/1672",
"abbreviation" => "ChpTix",
"name" => "CheapTickets",
"id" => "1672"
},
"url" => "/offices/1652",
"name" => "CheapTickets",
"id" => "1652"
},
"reference" => nil,
"shipments" => [],
"invoice_number" => nil,
"notes" => [],
"placer" => nil,
"instructions" => nil,
"subtotal" => "484.0",
"hold_placed_at" => nil,
"shipping_address" => {
"street_address" => "123 Merry Lane",
"extended_address" => "#2A",
"label" => "shipping",
"updated_at" => "2012-09-15T19:05:48Z",
"url" => "/clients/3447/addresses/231233",
"primary" => false,
"country_code" => "US",
"locality" => "Jersey City",
"name" => "CheapTickets",
"latitude" => nil,
"postal_code" => "07030",
"id" => "231233",
"longitude" => nil,
"region" => "NJ"
},
"refunded" => "0.0",
"hold_expires_at" => nil,
"id" => "11730",
"partner" => false,
"balance" => "0.0",
"payments" => [
[0] {
"avs_postal_code_response_code" => nil,
"type" => "credit_card",
"avs_postal_code_response" => nil,
"state" => "captured",
"avs_street_address_response_code" => nil,
"created_at" => "2012-09-15T22:05:57Z",
"cvv_response" => "Not provided.",
"url" => "/orders/11730/payments/21601",
"cvv_response_code" => "I",
"avs_response" => nil,
"amount" => "561.6",
"avs_response_code" => nil,
"credit_card" => {
"expiration_year" => 2014,
"card_company" => "Visa",
"association" => {
"url" => "/clients/3447",
"phone_numbers" => [],
"email_addresses" => [
[0] {
"label" => nil,
"address" => "dgainor@me.com",
"id" => "1873"
}
],
"name" => "CheapTickets",
"id" => "3447"
},
"phone_number" => nil,
"url" => "/clients/3447/credit_cards/379",
"primary" => false,
"address" => {
"street_address" => "123 Merry Lane",
"extended_address" => "#2A",
"label" => "billing",
"primary" => false,
"country_code" => "US",
"locality" => "Jersey City",
"name" => "John Smith",
"latitude" => nil,
"postal_code" => "07030",
"id" => "231231",
"longitude" => nil,
"region" => "NJ"
},
"last_digits" => "1111",
"name" => "John Smith",
"expiration_month" => 8,
"id" => "379"
},
"id" => "21601",
"avs_street_address_response" => nil
},
"id" => "21601",
"avs_street_address_response" => nil
}
]
}
]
}
{
"child_orders" => [
[0] 11731
],
"service_fee" => "72.6",
"items" => [
[0] {
"price" => "242.0",
"eticket_downloaded_at" => "2012-09-15T22:23:38Z",
"quantity" => 2,
"eticket_delivery" => true,
"id" => "11961",
"ticket_group" => {
"retail_price" => "242.0",
"remote_id" => "191497",
"url" => "/ticket_groups/16637811",
"quantity" => 2,
"wholesale_price" => 210.0,
"row" => "28",
"seats" => [
[0] 20,
[1] 21
],
"external_notes" => "Can email 40-50 yardline",
"section" => "120",
"event" => {
"occurs_at" => "2012-09-16T13:00:00Z",
"url" => "/events/304581",
"venue" => {
"address" => {
"locality" => "Philadelphia",
"id" => "209541",
"region" => "PA"
},
"name" => "Lincoln Financial Field",
"id" => "2542"
},
"name" => "Baltimore Ravens at Philadelphia Eagles (Home Opener)",
"id" => "304581"
},
"id" => "16637811",
"office_id" => 141
},
"eticket_available" => true
}
],
"client" => {
"phone_numbers" => [],
"url" => "/clients/3447",
"email_addresses" => [
[0] {
"label" => nil,
"address" => "ticketevo@me.com",
"id" => "1873"
}
],
"name" => "CheapTickets",
"id" => "3447"
},
"buyer" => nil,
"state" => "accepted",
"additional_expense" => "0.0",
"shipping" => "5.0",
"created_at" => "2012-09-15T22:05:57Z",
"po_number" => nil,
"total" => "561.6",
"billing_address" => {
"street_address" => "123 Merry Lane",
"extended_address" => "#2A",
"label" => "billing",
"updated_at" => "2012-09-15T19:01:31Z",
"url" => "/clients/3447/addresses/231231",
"primary" => false,
"country_code" => "US",
"locality" => "Jersey City",
"name" => "John Smith",
"latitude" => nil,
"postal_code" => "07030",
"id" => "231231",
"longitude" => nil,
"region" => "NJ"
},
"url" => "/orders/11730",
"updated_at" => "2012-09-15T22:22:59Z",
"tax" => "0.0",
"seller" => {
"brokerage" => {
"url" => "/brokerages/1672",
"abbreviation" => "ChpTix",
"name" => "CheapTickets",
"id" => "1672"
},
"url" => "/offices/1652",
"name" => "CheapTickets",
"id" => "1652"
},
"reference" => nil,
"shipments" => [],
"invoice_number" => nil,
"notes" => [],
"placer" => nil,
"instructions" => nil,
"subtotal" => "484.0",
"hold_placed_at" => nil,
"shipping_address" => {
"street_address" => "123 Merry Lane",
"extended_address" => "#2A",
"label" => "shipping",
"updated_at" => "2012-09-15T19:05:48Z",
"url" => "/clients/3447/addresses/231233",
"primary" => false,
"country_code" => "US",
"locality" => "Jersey City",
"name" => "CheapTickets",
"latitude" => nil,
"postal_code" => "07030",
"id" => "231233",
"longitude" => nil,
"region" => "NJ"
},
"refunded" => "0.0",
"hold_expires_at" => nil,
"id" => "11730",
"partner" => false,
"balance" => "0.0",
"payments" => [
"id" => "21601",
"avs_street_address_response" => nil
}
]
}
Brokerage orders are orders placed between two brokerage offices on the Exchange and paid for with EvoPay funds.
For brokerage orders, the buyer_id should be set to one of the requester's offices. The seller will be automatically set to the owner of the item being ordered.
Only one order may be passed in a single request.
At this time, only a single item may be included in an order. Any additional items passed to this endpoint will be ignored.
{"orders":[{"buyer_id":"997","items":[{"price":"45.0","quantity":2,"ticket_group_id":"1135"}]}]}
{
"orders": [
{
"items": [
{
"price": "45.0",
"quantity": 2,
"ticket_group": {
"section": "7",
"url": "/ticket_groups/1135",
"row": "IU",
"id": "1135",
"event": {
"name": "Autem Exercitationem Qui",
"occurs_at": "2012-01-01T15:08:19Z",
"url": "/events/1171",
"id": "1171"
}
},
"id": "942"
}
],
"tax": "0.0",
"placer": null,
"seller": {
"name": "Sed Quia Optio",
"url": "/offices/998",
"id": "998",
"brokerage": {
"name": "Pfannerstill-Torphy",
"url": "/brokerages/1058",
"id": "1058",
"abbreviation": "Pfannerstill-Torphy"
}
},
"hold_expires_at": null,
"created_at": "2011-10-05T15:08:40Z",
"refunded": "0.0",
"hold_placed_at": null,
"buyer": {
"name": "Possimus Iusto Labor",
"url": "/offices/997",
"id": "997",
"brokerage": {
"name": "Green LLC",
"url": "/brokerages/111111",
"id": "111111",
"abbreviation": "Green LLC"
}
},
"updated_at": "2011-10-05T15:08:41Z",
"url": "/orders/540",
"total": "90.0",
"additional_expense": "0.0",
"payments": [
],
"id": "540",
"shipping_address": null,
"shipping": "0.0",
"invoice_number": null,
"client": null,
"billing_address": null,
"subtotal": "90.0",
"po_number": null,
"instructions": null,
"service_fee": "0.0",
"balance": "0.0",
"state": "pending"
}
]
}
Client orders are orders placed between a brokerage office and a client of that brokerage and paid for with a credit card (or you can handle the payment yourself separately).
For client orders, the seller_id should be set to one of the requester's offices, and the client_id should be set to one of the requester's clients.
When specifying the billing and shipping address for client orders, the addresses may be created in advance using the Addresses endpoint and specified by ID (billing_address_id and shipping_address_id), or they may be specified inline as a full hash of the address. If specified inline, address records will be created at the time the order is created.
A payment also needs to be specified. At this time, only a single payment may be included in an order.
A credit card may either be created in advance using the Credit Cards endpoint and specified by credit_card_id or it may be specified inline as a full hash of the credit card specified by the Credit Cards endpoint. If specified inline, a credit card record will be created at the time the order is created.
If you wish to handle the payment processing yourself you may simply pass offline as the payment type. If you specify the payment as offline the order will be marked as paid in our system, and assumes that the brokerage will process the actual payment for the order offline.
Only one order may be passed in a single request.
Multiple Items can be passed in to an order.
Authorization settings for orders can be set in the Account Settings APP: https://settings.ticketevolution.com/brokerage/payment_gateway
The sandbox is designed to work exactly the same as the production environment, but it allows you to use specific card data to trigger specific responses. All possible testing values can be found at:
https://www.braintreepayments.com/docs/ruby/reference/sandbox
{"orders":[
// This needs to be passed in to create shipments on the order.
{
"shipping": "15.0",
"service_fee": "19.04",
"additional_expense": "-0.0",
"create_shipments_by_seller": {
"type": "fedex_shipments",
"service_type": "LEAST_EXPENSIVE",
"phone_number": "123456789",
"ship_to_name": "Drew Gainor"
},
"payments":[
{"type":"credit_card"}
],
"billing_address_id":3656,
"seller_id":997,
"shipping_address_id":3656,
"client_id":12345,
"items":[{"price":"45.0","quantity":2,"ticket_group_id":"1135"}]
}
]}
// The `payments` field can be one of:
// A) A credit_card_id previously created for this client
{
"type":"credit_card",
"credit_card_id":1234
}
// B) A full set of credit card info.
// The billing address will be automatically filled by the client.
{
"type":"credit_card",
"credit_card":{
"expiration_year":"2013",
"ip_address":"12.345.678.90",
"phone_number_id":45,
"verification_code":"589",
"name":"Will Smith",
"expiration_month":"6",
"number":"4111111111111111"
}
}
{
"orders":[
{
"child_orders":[
17141
],
"partner":false,
"client":{
"email_addresses":[
{
"address":"ian@testingnewphone.com",
"label":null,
"id":"3199"
}
],
"url":"/clients/4760",
"phone_numbers":[
{
"country_code":null,
"number":"5163076172",
"label":null,
"id":"3492",
"extension":null
}
],
"name":"Ian Testing",
"id":"4760"
},
"instructions":null,
"additional_expense":"0.0",
"shipping":"15.0",
"payments":[
{
"avs_street_address_response":null,
"type":"credit_card",
"avs_response_code":null,
"avs_postal_code_response":null,
"credit_card":{
"primary":false,
"address":{
"primary":false,
"region":"NJ",
"street_address":"123 Main st",
"country_code":"US",
"extended_address":null,
"latitude":null,
"name":"Drew Gainor",
"locality":"Hoboken",
"longitude":null,
"label":"billing",
"id":"222569",
"postal_code":"12345"
},
"expiration_month":4,
"url":"/clients/4760/credit_cards/642",
"expiration_year":2014,
"last_digits":"1111",
"association":{
"email_addresses":[
{
"address":"client@emailaddress.com",
"id":"3199",
"label":null
}
],
"url":"/clients/4760",
"phone_numbers":[
{
"country_code":null,
"number":"123456789",
"id":"3500",
"label":null,
"extension":null
},
{
"country_code":null,
"number":"5163076172",
"id":"3492",
"label":null,
"extension":null
}
],
"name":"Ian Testing",
"id":"4760"
},
"card_company":"Visa",
"phone_number":null,
"name":"Drew Gainor",
"id":"642"
},
"amount":"134.04",
"url":"/orders/17140/payments/32862",
"state":"authorized",
"avs_postal_code_response_code":null,
"cvv_response":"Not provided.",
"avs_street_address_response_code":null,
"created_at":"2012-09-28T18:09:39Z",
"avs_response":null,
"id":"32862",
"cvv_response_code":"I"
},
{
"avs_street_address_response":null,
"type":"credit_card",
"avs_response_code":null,
"avs_postal_code_response":null,
"credit_card":{
"primary":false,
"address":{
"primary":false,
"region":"NJ",
"street_address":"123 Main st",
"country_code":"US",
"extended_address":null,
"latitude":null,
"name":"Drew Gainor",
"locality":"Hoboken",
"longitude":null,
"label":"billing",
"id":"222569",
"postal_code":"12345"
},
"expiration_month":4,
"url":"/clients/4760/credit_cards/642",
"expiration_year":2014,
"last_digits":"1111",
"association":{
"email_addresses":[
{
"address":"client@emailaddress.com",
"id":"3199",
"label":null
}
],
"url":"/clients/4760",
"phone_numbers":[
{
"country_code":null,
"number":"123456789",
"id":"3500",
"label":null,
"extension":null
},
{
"country_code":null,
"number":"5163076172",
"id":"3492",
"label":null,
"extension":null
}
],
"name":"Ian Testing",
"id":"4760"
},
"card_company":"Visa",
"phone_number":null,
"name":"Drew Gainor",
"id":"642"
},
"amount":"134.04",
"url":"/orders/17140/payments/32862",
"state":"authorized",
"avs_postal_code_response_code":null,
"cvv_response":"Not provided.",
"avs_street_address_response_code":null,
"created_at":"2012-09-28T18:09:39Z",
"avs_response":null,
"id":"32862",
"cvv_response_code":"I"
}
],
"placer":null,
"notes":[
],
"po_number":null,
"service_fee":"19.04",
"shipping_address":{
"region":"NY",
"primary":false,
"street_address":"123 Main St",
"extended_address":null,
"country_code":"US",
"url":"/clients/4760/addresses/222568",
"latitude":null,
"updated_at":"2012-09-28T18:09:39Z",
"locality":"Hoboken",
"name":"Drew Gainor",
"id":"222568",
"label":"shipping",
"longitude":null,
"postal_code":"12345"
},
"items":[
{
"eticket_downloaded_by":null,
"ticket_group":{
"row":"4",
"section":"328",
"wholesale_price":25.0,
"office_id":141,
"url":"/ticket_groups/18174332",
"quantity":4,
"external_notes":"View Reserve",
"seats":[
12,
13,
14,
15
],
"remote_id":"31811",
"event":{
"venue":{
"address":{
"region":"CA",
"locality":"San Francisco",
"id":"209244"
},
"name":"AT&T Park",
"id":"1172"
},
"url":"/events/188823",
"occurs_at":"2012-08-10T19:15:00Z",
"name":"Colorado Rockies at San Francisco Giants",
"id":"188823"
},
"id":"18174332",
"retail_price":"45.0"
},
"eticket_available":false,
"price":"45.0",
"quantity":4,
"eticket_downloaded_at":"",
"id":"16940",
"eticket_delivery":false
}
],
"url":"/orders/17140",
"invoice_number":null,
"total":"214.04",
"subtotal":"180.0",
"tax":"0.0",
"state":"pending",
"updated_at":"2012-09-28T18:09:44Z",
"hold_placed_at":null,
"balance":"214.04",
"refunded":"0.0",
"reference":null,
"created_at":"2012-09-28T18:09:39Z",
"hold_expires_at":null,
"billing_address":{
"region":"NJ",
"primary":false,
"street_address":"123 Main st",
"extended_address":null,
"country_code":"US",
"url":"/clients/4760/addresses/222567",
"latitude":null,
"updated_at":"2012-09-28T18:09:39Z",
"locality":"Hoboken",
"name":"Drew Gainor",
"id":"222567",
"label":"billing",
"longitude":null,
"postal_code":"12345"
},
"id":"17140",
"shipments":[
{
"type":"FedEx",
"tracking_number":null,
"address":{
"primary":false,
"region":"NY",
"street_address":"123 Main St",
"country_code":"US",
"extended_address":null,
"latitude":null,
"locality":"Hoboken",
"longitude":null,
"label":"shipping",
"id":"222570",
"postal_code":"12345"
},
"service_type":"LEAST_EXPENSIVE",
"items":[
{
"eticket_downloaded_by":null,
"ticket_group":{
"row":"4",
"section":"328",
"wholesale_price":25.0,
"office_id":141,
"url":"/ticket_groups/18174332",
"quantity":4,
"external_notes":"View Reserve",
"seats":[
12,
13,
14,
15
],
"remote_id":"31811",
"event":{
"venue":{
"address":{
"region":"CA",
"locality":"San Francisco",
"id":"209244"
},
"name":"AT&T Park",
"id":"1172"
},
"url":"/events/188823",
"occurs_at":"2012-08-10T19:15:00Z",
"name":"Colorado Rockies at San Francisco Giants",
"id":"188823"
},
"id":"18174332",
"retail_price":"45.0"
},
"eticket_available":false,
"price":"45.0",
"quantity":4,
"eticket_downloaded_at":"",
"id":"16940",
"eticket_delivery":false
}
],
"ship_to_name":"Drew Gainor",
"state":"pending",
"ship_to_company_name":null,
"signature_type":"",
"id":"13135"
}
],
"seller":{
"url":"/offices/1694",
"name":"Main Office",
"id":"1694",
"brokerage":{
"url":"/brokerages/1714",
"name":"Cheap Tickets",
"abbreviation":"Cheap Tickets",
"id":"1714"
}
},
"buyer":null
}
]
}
After an order has been placed, it's possible to update portions of it.
The client, buyer and seller are set at the time the order is created and cannot be modified. Neither can the contents of an order or the billing details. However, the following fields can be modified:
These attributes can be modified for any order.
* po_number
* invoice_number
* instructions — additional notes or instructions for the seller
* Customer Order Parameters
These attributes can only be modified for customer orders.
* billing_address — a hash of billing address attributes
* billing_address_id — the ID of an address belonging to the client
* shipping_address — a hash of shipping address attributes
* shipping_address_id — the ID of an address belonging to the client
Note: The shipping address cannot be changed when a shipment is in transit or has been delivered.
{"instructions":"Sample instructions here","invoice_number":"12345","billing_address_id":3657,"shipping_address_id":3658}
{
"items": [
],
"tax": "0.0",
"placer": null,
"seller": {
"name": "Possimus Iusto Labor",
"url": "/offices/997",
"id": "997",
"brokerage": {
"name": "Green LLC",
"url": "/brokerages/111111",
"id": "111111",
"abbreviation": "Green LLC"
}
},
"hold_expires_at": null,
"created_at": "2011-10-05T15:08:26Z",
"refunded": "0.0",
"hold_placed_at": null,
"buyer": null,
"updated_at": "2011-10-05T15:08:44Z",
"url": "/orders/539",
"total": "0.0",
"additional_expense": "0.0",
"payments": [
],
"id": "539",
"shipping_address": {
"name": "William Bernier IV",
"region": "GU",
"latitude": -33.2559354428329,
"country_code": "SJ",
"extended_address": "Apt. 628",
"postal_code": "26051",
"street_address": "8203 Brakus Stravenue",
"locality": "Klingtown",
"longitude": -66.5118708856657
},
"shipping": "0.0",
"invoice_number": "12345",
"client": {
"name": "Kenya Mertz",
"url": "/clients/12345",
"id": "12345"
},
"billing_address": {
"name": "Dr. Sam Thiel",
"region": "OH",
"latitude": 55.3248951992715,
"country_code": "PA",
"extended_address": "Apt. 352",
"postal_code": "24923",
"street_address": "661 Brooks Drive",
"locality": "North Hershelport",
"longitude": 110.649790398543
},
"subtotal": "0.0",
"po_number": null,
"instructions": "Sample instructions here",
"service_fee": "0.0",
"balance": "0.0",
"state": "accepted"
}
If an order is in the pending state, this endpoint may be used to accept it. The reviewer_id should be the ID of a user that belongs to the brokerage who received the order.
{"reviewer_id":18}
If an order is in the pending state, this endpoint may be used to reject it. The reviewer_id should be the ID of a user that belongs to the brokerage who received the order.
{"reason":"Tickets No Longer Available","reviewer_id":18}
If an order is in the accepted state, this endpoint may be used to mark it as completed.
This endpoint doesn't have any parameters.
This endpoint should be used to store an entire ticket group for an item on an accepted order. Each PDF should contain all tickets for the corresponding item. This endpoint is not currently for pre-delivering your E-Tickets.
This endpoint will return a Base64 encoded PDF for the corresponding item_id that is required in this request. If you pass the users ip address with this request, you will get back both the users ip and the date/time the user downloaded the tickets with the order.
The item_id can be found on the Order Show endpoint.
{
"files": [
{
"content": "JVBERi0xLjQNJeLjz9MNCjM1IDAgb2JqDTw8IA0vTGluZWFyaXplZCAxIA0v",
"item_id": 11973
}
]
}