Orders can have the following states:
"pending"
"accepted"
"rejected"
"cancelled"
"expired"
"pending_substitution"

List
GET  /orders

Sample Code

Sample Response

{
                   "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
                        }
                    ]
                }
            ]
}

Parameters

Name Value Description
po_number

Filter orders by purchase order number

buyer_id

iD of the buyer on the order

invoice_number

Number of the invoice on the order

state

The current order state.

seller_id

ID of the seller on the order

updated_at

An ISO 8601 date time when the performer was last updated. Use in combination with the conditionals like `.gte` to get updated since.

page

Number of pages that you want to return

per_page

Number of results returned per page

Show
GET  /orders/:order_id

Sample Code

Sample Response

{
                  "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
                }
            ]
}

Parameters

Name Value Description
order_id

ID of the order to show

Create Brokerage Order
POST  /orders

Brokerage orders are orders placed between two brokerage offices on the Exchange and paid for with EvoPay funds.

Most API users should be using Create Client Order. If you need to be using Create Brokerage Order you will likely have been told specifically instructed to do so.

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.

Sample Code

Sample Request Body

{"orders":[{"buyer_id":"997","items":[{"price":"45.0","quantity":2,"ticket_group_id":"1135"}]}]}

Sample Response

{
  "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"
    }
  ]
}

Parameters

Name Value Description
buyer_id Required

ID of the buyer on the order

items Required

Array of JSON objects for order items, each with fields 'ticket_group_id', 'quantity' (integer), and 'price'

instructions Optional

Instructions included on the order

po_number Optional

Purchase Order number on the order

shipping Optional

The shipping amount to be added to the total

additional_expenses Optional

The additional expenses to be added to the total

service_fee Optional

The service fee to be added to the total

invoice_number Optional

Number of the invoice on the order

reference Optional

Pass a string for your own reference when viewing the order later. This is typically used for accounting. EX if selling to another broker office, you would enter their PO#

tax Optional

The tax amount to be added to the total

Create Client Order
POST  /orders

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

Sample Code

Sample Request Body

{"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"
      }
    }

Sample Response

{
       "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
          }
       ]
    }

Parameters

Name Value Description
client_id Required

The client ID of the buyer

seller_id Required

The office ID of the seller

items Required

Array of JSON objects for order items, each with fields 'ticket_group_id', 'quantity' (integer), and 'price'

payments Required

Array with single JSON object that has field 'type' with value of either 'credit_card' or 'offline'. See the sample request body above for examples of the options.

shipping_address Optional

An object of shipping address attributes

shipping_address_id Optional

An address ID of the client

shipping Optional

The shipping amount to be added to the total

po_number Optional

The purchase order number

invoice_number Optional

The invoice number on the order

service_fee Optional

The service fee to be added to the total

tax Optional

The tax to be added to the total

instructions Optional

Instructions on the order

billing_address Optional

The order billing address

additional_expense Optional

The additional expense to be added to the total

billing_address_id Optional

ID of the billing address

reference Optional

Pass a string for your own reference when viewing the order later. This is typically used for accounting. EX if selling to another broker office, you would enter their PO#

Update
PUT  /orders/:order_id

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.

Sample Code

Sample Request Body

{"instructions":"Sample instructions here","invoice_number":"12345","billing_address_id":3657,"shipping_address_id":3658}

Sample Response

{
  "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"
}

Parameters

Name Value Description
order_id Required

ID of the order to be updated

invoice_number Optional

invoice number to be updated

instructions Optional

Instructions to be added to the order

shipping_address_id Optional

ID of the shipping address

shipping_address Optional

An object of shipping address attributes

po_number Optional

Purchase order number

billing_address_id Optional

ID of the billing address

billing_address Optional

An object of billing address attributes

Accept Order
POST  /orders/:order_id/accept

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.

Sample Code

Sample Request Body

{"reviewer_id":18}

Sample Response


Parameters

Name Value Description
order_id Required

ID of the order

reviewer_id Required

ID of the reviewer on the order

Reject Order
POST  /orders/:order_id/reject

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.

Sample Code

Sample Request Body

{"reason":"Tickets No Longer Available","reviewer_id":18}

Sample Response


Parameters

Name Value Description
reason Required

Reason why this order should be rejected. Must be one of: ['Tickets No Longer Available','Tickets Priced Incorrectly','Duplicate Order','Fraudulent Order','Test Order','Other']

order_id Required

ID of the order

reviewer_id Required

ID of the reviewer on the order

Complete Order
POST  /orders/:order_id/complete

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.

Sample Code

Sample Response


Parameters

Name Value Description

Deliver E-Tickets
POST  /orders/:order_id/deliver_etickets

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.

Sample Code

Sample Response


Parameters

Name Value Description
order_id Required

etickets Required

This takes an array that includes the Base64 encoded PDF with the ALL of the tickets for the corresponding item_id. Ex. ( :etickets => [{ :item_id => 10719, :eticket => Base64.encode64(File.new('tmp/2.pdf').read)}]})

Print E-Tickets
GET  /orders/:order_id/print_etickets

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.

Sample Code

Sample Response

{
  "files": [
    {
      "content": "JVBERi0xLjQNJeLjz9MNCjM1IDAgb2JqDTw8IA0vTGluZWFyaXplZCAxIA0v",
      "item_id": 11973
    }
  ]
}

Parameters

Name Value Description
item_id

Pass in the item_id of the order th want at you to print the E-Tickets of

ip_address

Pass in the IP address of the client that is downloading the E-Tickets