Creating an Order - Request Params

Client buys tickets listed on Affiliate website:

What you need:

  • API Token (32 character token)
  • API Secret (40 character secret)
  • Path/Params (POST to /v10/orders)

When creating an order the following attributes need to get passed in as part of the order create POST.

Note: To retrieve the client_id you will need to successfully create the client object before submitting your order. To do that you will need to make a POST request to the Clients Create endpoint.

Name Type Description
client_id Integer Unique identifier in our database for the client purchasing the ticket(s). This object needs to be created via another API call before submitting the order see (Clients Create endpoint).
session_id String Riskified session_id.
service_fee Float Service fee for your store.
additional_expense Float Any additional expenses.
tax Float Total tax on the order.
discount Float Discount on the order
instructions String Instructions that are considered a request. Will be visible to buyer and seller. Max 200 char.
reference String Only visible to the Affiliate that created order. For Affiliates that are associated with Commission Junction, you can pass in the SID value into this field. eg: SID=alphanumeric_value

ticket_group hash { } - the group of tickets client is buying from.

Name Type Description
id Integer Unique identifier for ticket_group.
price Float Price of one ticket.
quantity Integer Number of tickets purchased.

payments array of hash [{ }] - the client's payment for the order. Note: payment will either be identified by credit_card_id or token.

If the credit card doesn’t already have an address tied to it, you can pass in address_attributes or address_id.

If you need to update address on the card, you can pass in the new address here.

Name Type Description
type String Will always be 'credit_card'.
credit_card_id (required if token is nil) Integer ID for credit card used to make purchase. Will point to CC object in our database.
token (required if credit_card_id is nil) String Token from Stripe.
address_id (optional) Integer ID for CC's billing address. Will point to Address object in our database.
address_attributes (optional) Object Attributes for the address that is tied to the CC being used.

NOTE: The amount for the payment will be automatically calculated by the backend.

notes hash { } - notes for the order.

Name Type Description
internal Array Points to array containing one string. Notes that are only visible to office that created them.
external Array Points to array containing one string. Notes that are visible to buyer and seller. These are considered a request.

delivery hash { } - the delivery information for the order. See Delivery Options for the different methods that can be used.


cURL for Example Request:


curl -i \
-X POST \
-H "X-Signature: 4LrvHIqw9Lh4ii8LtYAZ5gve0qgHOUO3+eAlrHYkNnI=" \
-H "X-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{  
   "order":{  
      "ticket_group":{  
         "id":324466901,
         "price":145.48,
         "quantity":2
      },
      "payments":[  
         {  
            "type":"credit_card",
            "credit_card_id":327284,
            "amount":305.96,
            "address_id":5070352
         }
      ],
      "delivery":{  
         "type":"Eticket",
         "email_address_id":1965046,
         "cost":5.00
      },
      "client_id":1507094,
      "session_id":"riskified_session_id_123",
      "service_fee":10.00,
      "additional_expense":0.00,
      "tax":0.00,
      "discount":5.00,
      "promo_code":"TAKE5",
      "notes":{  
         "internal":[  
            "Internal notes will only be visible to the office that created them."
         ],
         "external":[  
            "External notes are visible to buyer and seller, and are considered a request."
         ]
      },
      "instructions":"Instructions are visible to buyer and seller, and are considered a request.",
      "reference":"Reference will only be visible to the Office that created them and is recommended for storing something such as a PO or Invoice number from another system."
   }
}' \
--url 'https://api.sandbox.ticketevolution.com/v10/orders?'

Example Response

{
"id":819975,
"oid":"388214-819975",
"order_type":"sale",
"substitute_order_link_id":null,
"was_auto_pended":null,
"was_auto_accepted":null,
"was_auto_canceled":null,
"pending_non_refund_payments_total":0,
"completed_non_refund_payments_total":0,
"pending_balance":"0.0",
"shipping":"5.0",
"service_fee":"10.0",
"additional_expense":"0.0",
"discount":"0.0",
"tax":"0.0",
"fee":"0.0",
"refunded":"0.0",
"returns_total":0.0,
"penalties_total":0.0,
"instructions":"Instructions are visible to buyer and seller, and are considered a request.",
"buyer_state":"accepted",
"consignment":null,
"seller_cancellation_reason":null,
"buyer_cancellation_reason":null,
"seller_cancellation_notes":null,
"buyer_cancellation_notes":null,
"seller_rejection_reason":null,
"buyer_rejection_reason":null,
"seller_rejection_notes":null,
"buyer_rejection_notes":null,
"created_at":"2017-03-21T20:28:41Z",
"updated_at":"2017-03-21T20:28:42Z",
"url":"/orders/819975",
"oth_created":false,
"reference":"Reference will only be visible to the Office that created them and is recommended for storing something such as a PO or Invoice number from another system.",
"created_by_ip_address":null,
"substitutions":[],
"subtotal":"30.0",
"total":"45.0",
"balance":"45.0",
"state":"pending",
"child_orders":[819974],
"created_by": {
    "affiliate_id":42,
    "label":"aff cred label",
    "affiliate_store_id":63,
    "type":"AffiliateCredential"
    },
"buyer": {
    "id":787814,
    "url":"/clients/787814",
    "name":"Max",
    "updated_at":"2017-03-08T23:09:10Z",
    "type":"Client",
    "pnr_id":null,
    "tags":[]
    },
"seller": {
    "id":63,
    "name":"my first ticket store",
    "affiliate_id":42,
    "created_at":"2017-03-08T20:21:42Z",
    "updated_at":"2017-03-08T20:21:42Z",
    "type":"AffiliateStore",
    "logo":null,
    "website":"first.com"
    },
"billing_address": {
    "id":null,
    "label":null,
    "street_address":null,
    "extended_address":null,
    "po_box":false,
    "locality":null,
    "region":null,
    "postal_code":null,
    "country_code":null,
    "latitude":null,
    "longitude":null,
    "primary":false
    },
"shipping_address": {
    "id":null,
    "label":null,
    "street_address":null,
    "extended_address":null,
    "po_box":false,
    "locality":null,
    "region":null,
    "postal_code":null,
    "country_code":null,
    "latitude":null,
    "longitude":null,
    "primary":false
    },
"deliveries":[{
    "id":514480,
    "url":"/shipments/514480",
    "type":"Eticket",
    "state":"pending",
    "tracking_number":null,
    "tracking_url":null,
    "service_type":"LEAST_EXPENSIVE",
    "service_type_display":null,
    "name":null,
    "ship_to_name":null,
    "ship_to_company_name":null,
    "updated_at":"2017-03-21T20:28:41Z",
    "carrier":null,
    "available":null,
    "cost":"5.0",
    "courier_company":null,
    "signature_type":""
    }],
"notes":[{
    "id":103684,
    "content":"External notes are visible to buyer and seller, and are considered a request.",
    "created_at":"2017-03-21T20:28:41Z",
    "category":"external",
    "affiliate_store_id":63,
    "order_id":null,
    "order_link_id":819975,
    "properties":{
        "order_link_participant_type":"seller"
        },
    "updated_at":"2017-03-21T20:28:41Z"
    },
    {
    "id":103683,
    "content":"Internal notes will only be visible to the office that created them.",
    "created_at":"2017-03-21T20:28:41Z",
    "category":"internal",
    "affiliate_store_id":63,
    "order_id":null,
    "order_link_id":819975,
    "properties": {
        "order_link_participant_type":"seller"
        },
    "updated_at":"2017-03-21T20:28:41Z"
    }],
"items":[{
    "id":958454,
    "created_at":"2017-03-21T20:28:41Z",
    "updated_at":"2017-03-21T20:28:41Z",
    "price":"30.0",
    "quantity":1,
    "eticket_delivery":true,
    "eticket_available":false,
    "eticket_updated_at":null,
    "eticket_downloaded_at":null,
    "eticket_downloaded_by":null,
    "eticket_finalized":null,
    "eticket_finalized_at":null,
    "eticket_pdf_pages":null,
    "eticket_file_size":null,
    "needs_eticket":true,
    "needs_sub":false,
    "seats":[10],
    "eticket_thumbnails":[],
    "has_spec_tickets":false,
    "ticket_group": {
        "id":"161443705",
        "url":"/ticket_groups/161443705",
        "quantity":1,
        "retail_price":"30.0",
        "wholesale_price":"10.0",
        "office_id":1692,
        "office_name":"Auto-Purchase",
        "brokerage_id":61,
        "brokerage_name":"Ticket Evolution",
        "remote_id":"1103822",
        "external_notes":null,
        "section":"23",
        "row":"a",
        "format":"Eticket",
        "seats":["10"],
        "in_hand":"true",
        "in_hand_on":"2017-03-21",
        "instant_delivery":false,
        "tickets":[{
            "seat":"10",
            "purchase_order_id":"819940"
            }],
        "event":{
            "id":"648825",
            "url":"/events/648825",
            "name":"Massive Attack",
            "occurs_at":"2017-10-20T19:00:00Z",
            "venue":{
                "id":"1388",
                "name":"Santa Barbara Bowl",
                "address":{
                    "locality":"Santa Barbara",
                    "region":"CA"
                    }
                }
            }
        },
    "delivery_id":514480,
    "order_item_id":632108,
    "order_id":819975
    }],
"payments":[{
    "id":657163,
    "type":"credit_card",
    "amount":"45.0",
    "refundable_amount":0,
    "refunded_from_id":null,
    "avs_response":null,
    "avs_response_code":null,
    "avs_street_address_response":"Match.",
    "avs_street_address_response_code":"M",
    "avs_postal_code_response":"Match.",
    "avs_postal_code_response_code":"M",
    "cvv_response":null,
    "cvv_response_code":null,
    "order_link_id":819975,
    "credit_memo_id":null,
    "payment_for_credit_memo_id":null,
    "created_at":"2017-03-21T20:28:41Z",
    "updated_at":"2017-03-21T20:28:41Z",
    "state":"authorized",
    "is_refund":false,
    "url":"/payments/657163"
    }]
}

Example Request Params:

{
  "order": {
      "ticket_group": {
        "id": 324466901,
        "price":145.48,
        "quantity":2
        },
      "payments": [{
        "type":"credit_card",
        "credit_card_id":327284,
        "amount":305.96,
        "address_id":5070352
        }],
      "delivery": {
        "type":"Eticket",
        "email_address_id":1965046,
        "cost":5.00
        },
      "client_id":1507094,
      "session_id":"riskified_session_id_123",
      "service_fee":10.00,
      "additional_expense":0.00,
      "tax":0.00,
      "discount":5.00,
      "promo_code":"TAKE5",
      "notes": {
        "internal":[
          "Internal notes will only be visible to the office that created them."
          ],
        "external":[
           "External notes are visible to buyer and seller, and are considered a request."
          ]
        },
      "instructions":"Instructions are visible to buyer and seller, and are considered a request.",
      "reference":"Reference will only be visible to the Office that created them and is recommended for storing something such as a PO or Invoice number from another system."
    }
}

Example Response

{
"id":819975,
"oid":"388214-819975",
"order_type":"sale",
"substitute_order_link_id":null,
"was_auto_pended":null,
"was_auto_accepted":null,
"was_auto_canceled":null,
"pending_non_refund_payments_total":0,
"completed_non_refund_payments_total":0,
"pending_balance":"0.0",
"shipping":"5.0",
"service_fee":"10.0",
"additional_expense":"0.0",
"discount":"0.0",
"tax":"0.0",
"fee":"0.0",
"refunded":"0.0",
"returns_total":0.0,
"penalties_total":0.0,
"instructions":"Instructions are visible to buyer and seller, and are considered a request.",
"buyer_state":"accepted",
"consignment":null,
"seller_cancellation_reason":null,
"buyer_cancellation_reason":null,
"seller_cancellation_notes":null,
"buyer_cancellation_notes":null,
"seller_rejection_reason":null,
"buyer_rejection_reason":null,
"seller_rejection_notes":null,
"buyer_rejection_notes":null,
"created_at":"2017-03-21T20:28:41Z",
"updated_at":"2017-03-21T20:28:42Z",
"url":"/orders/819975",
"oth_created":false,
"reference":"Reference will only be visible to the Office that created them and is recommended for storing something such as a PO or Invoice number from another system.",
"created_by_ip_address":null,
"substitutions":[],
"subtotal":"30.0",
"total":"45.0",
"balance":"45.0",
"state":"pending",
"child_orders":[819974],
"created_by": {
    "affiliate_id":42,
    "label":"aff cred label",
    "affiliate_store_id":63,
    "type":"AffiliateCredential"
    },
"buyer": {
    "id":787814,
    "url":"/clients/787814",
    "name":"Max",
    "updated_at":"2017-03-08T23:09:10Z",
    "type":"Client",
    "pnr_id":null,
    "tags":[]
    },
"seller": {
    "id":63,
    "name":"my first ticket store",
    "affiliate_id":42,
    "created_at":"2017-03-08T20:21:42Z",
    "updated_at":"2017-03-08T20:21:42Z",
    "type":"AffiliateStore",
    "logo":null,
    "website":"first.com"
    },
"billing_address": {
    "id":null,
    "label":null,
    "street_address":null,
    "extended_address":null,
    "po_box":false,
    "locality":null,
    "region":null,
    "postal_code":null,
    "country_code":null,
    "latitude":null,
    "longitude":null,
    "primary":false
    },
"shipping_address": {
    "id":null,
    "label":null,
    "street_address":null,
    "extended_address":null,
    "po_box":false,
    "locality":null,
    "region":null,
    "postal_code":null,
    "country_code":null,
    "latitude":null,
    "longitude":null,
    "primary":false
    },
"deliveries":[{
    "id":514480,
    "url":"/shipments/514480",
    "type":"Eticket",
    "state":"pending",
    "tracking_number":null,
    "tracking_url":null,
    "service_type":"LEAST_EXPENSIVE",
    "service_type_display":null,
    "name":null,
    "ship_to_name":null,
    "ship_to_company_name":null,
    "updated_at":"2017-03-21T20:28:41Z",
    "carrier":null,
    "available":null,
    "cost":"5.0",
    "courier_company":null,
    "signature_type":""
    }],
"notes":[{
    "id":103684,
    "content":"External notes are visible to buyer and seller, and are considered a request.",
    "created_at":"2017-03-21T20:28:41Z",
    "category":"external",
    "affiliate_store_id":63,
    "order_id":null,
    "order_link_id":819975,
    "properties":{
        "order_link_participant_type":"seller"
        },
    "updated_at":"2017-03-21T20:28:41Z"
    },
    {
    "id":103683,
    "content":"Internal notes will only be visible to the office that created them.",
    "created_at":"2017-03-21T20:28:41Z",
    "category":"internal",
    "affiliate_store_id":63,
    "order_id":null,
    "order_link_id":819975,
    "properties": {
        "order_link_participant_type":"seller"
        },
    "updated_at":"2017-03-21T20:28:41Z"
    }],
"items":[{
    "id":958454,
    "created_at":"2017-03-21T20:28:41Z",
    "updated_at":"2017-03-21T20:28:41Z",
    "price":"30.0",
    "quantity":1,
    "eticket_delivery":true,
    "eticket_available":false,
    "eticket_updated_at":null,
    "eticket_downloaded_at":null,
    "eticket_downloaded_by":null,
    "eticket_finalized":null,
    "eticket_finalized_at":null,
    "eticket_pdf_pages":null,
    "eticket_file_size":null,
    "needs_eticket":true,
    "needs_sub":false,
    "seats":[10],
    "eticket_thumbnails":[],
    "has_spec_tickets":false,
    "ticket_group": {
        "id":"161443705",
        "url":"/ticket_groups/161443705",
        "quantity":1,
        "retail_price":"30.0",
        "wholesale_price":"10.0",
        "office_id":1692,
        "office_name":"Auto-Purchase",
        "brokerage_id":61,
        "brokerage_name":"Ticket Evolution",
        "remote_id":"1103822",
        "external_notes":null,
        "section":"23",
        "row":"a",
        "format":"Eticket",
        "seats":["10"],
        "in_hand":"true",
        "in_hand_on":"2017-03-21",
        "instant_delivery":false,
        "tickets":[{
            "seat":"10",
            "purchase_order_id":"819940"
            }],
        "event":{
            "id":"648825",
            "url":"/events/648825",
            "name":"Massive Attack",
            "occurs_at":"2017-10-20T19:00:00Z",
            "venue":{
                "id":"1388",
                "name":"Santa Barbara Bowl",
                "address":{
                    "locality":"Santa Barbara",
                    "region":"CA"
                    }
                }
            }
        },
    "delivery_id":514480,
    "order_item_id":632108,
    "order_id":819975
    }],
"payments":[{
    "id":657163,
    "type":"credit_card",
    "amount":"45.0",
    "refundable_amount":0,
    "refunded_from_id":null,
    "avs_response":null,
    "avs_response_code":null,
    "avs_street_address_response":"Match.",
    "avs_street_address_response_code":"M",
    "avs_postal_code_response":"Match.",
    "avs_postal_code_response_code":"M",
    "cvv_response":null,
    "cvv_response_code":null,
    "order_link_id":819975,
    "credit_memo_id":null,
    "payment_for_credit_memo_id":null,
    "created_at":"2017-03-21T20:28:41Z",
    "updated_at":"2017-03-21T20:28:41Z",
    "state":"authorized",
    "is_refund":false,
    "url":"/payments/657163"
    }]
}

results matching ""

    No results matching ""