AirService - Ordering API v1.0

The mobile commerce platform

Customer

Properties

Name Type Description

Customer collection

Actions on the Customer resource

GET https://api-sandbox.airservice.com/ordering/:version/customer
Responses200
Headers
Content-Type: application/json
Body
[
  {
    "id": 885
  }
]

Returns customer details
GET/ordering/:version/customer


Promotions

Properties

Name Type Description

Promotions collection

Actions on the Promotions resource

GET https://api-sandbox.airservice.com/ordering/:version/promotions
Responses200
Headers
Content-Type: application/json
Body
[
  {
    "id": 518
  }
]

Returns detailed information about Promotions
GET/ordering/:version/promotions

URI Parameters
HideShow
ordered_for
String (optional) 

Optional Ordered For to test availability etc for promotion

venue_id
Integer (optional) 

Optional Venue Id


:Promotion

Properties

Name Type Description
coupon String A promotion coupon

:Promotion collection

Actions on the :promotion resource

Delivery Details

Properties

Name Type Description
address String Delivery address
venue_id Integer Unique venue ID

Delivery Details collection

Actions on the Delivery details resource

GET https://api-sandbox.airservice.com/ordering/:version/delivery_details
Responses200
Headers
Content-Type: application/json
Body
[
  {
    "id": 714,
    "address": null,
    "venue_id": null
  }
]

Get list of addresses that belongs to the customer
GET/ordering/:version/delivery_details

URI Parameters
HideShow
venue_id
Integer (optional) 

Unique Venue ID or Venue code


POST https://api-sandbox.airservice.com/ordering/:version/delivery_details
Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "address": null,
  "venue_id": null
}
Responses201
Headers
Content-Type: application/json
Body
[
  {
    "id": 220,
    "address": null,
    "venue_id": null
  }
]

Adds a delivery address to a customer
POST/ordering/:version/delivery_details

URI Parameters
HideShow
venue_id
Integer (optional) 

Unique Venue ID or Venue code


Delivery Details single

Actions on the Delivery details resource

DELETE https://api-sandbox.airservice.com/ordering/:version/delivery_details/:id
Responses200
Headers
Content-Type: application/json
Body
{
  "id": 643,
  "address": null,
  "venue_id": null
}

Delete a delivery address from a customer
DELETE/ordering/:version/delivery_details/:id

URI Parameters
HideShow
id
Integer (required) 

Unique delivery address of a customer


Orders

Properties

Name Type Description
card_reference String Card reference used to pay the order
location_id Integer Location used for in-venue or home delivery
order_items Array Order items ordered by customer
ordered_for String Time customer is ordering for
promotion_code String Promotion Code if applicable
promotion_estimate String Requested Promotion Amount to be applied to this Order
promotion_id Integer Requested Promotion ID
service_id Integer Service ID selected by customer
venue_id Integer Venue ID of the order

Orders collection

Actions on the Orders resource

POST https://api-sandbox.airservice.com/ordering/:version/orders
Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "card_reference": null,
  "location_id": null,
  "order_items": null,
  "ordered_for": null,
  "promotion_code": null,
  "promotion_estimate": null,
  "promotion_id": null,
  "service_id": null,
  "venue_id": null
}
Responses201
Headers
Content-Type: application/json
Body
[
  {
    "id": 702,
    "card_reference": null,
    "location_id": null,
    "order_items": null,
    "ordered_for": null,
    "promotion_code": null,
    "promotion_estimate": null,
    "promotion_id": null,
    "service_id": null,
    "venue_id": null
  }
]

Creates a new order
POST/ordering/:version/orders

URI Parameters
HideShow
card_reference
String (optional) 

Card reference used to pay the order

location_id
Integer (optional) 

Location used for in-venue or home delivery

order_items
Array (required) 

Order items ordered by customer

ordered_for
String (optional) 

Time customer is ordering for

promotion_code
String (optional) 

Promotion Code if applicable

promotion_estimate
String (optional) 

Requested Promotion Amount to be applied to this Order

promotion_id
Integer (optional) 

Requested Promotion ID

service_id
Integer (required) 

Service ID selected by customer

venue_id
Integer (required) 

Venue ID of the order


GET https://api-sandbox.airservice.com/ordering/:version/orders
Responses200
Headers
Content-Type: application/json
Body
[
  {
    "id": 301,
    "card_reference": null,
    "location_id": null,
    "order_items": null,
    "ordered_for": null,
    "promotion_code": null,
    "promotion_estimate": null,
    "promotion_id": null,
    "service_id": null,
    "venue_id": null
  }
]

Authenticated Customer Recent Order List for Venue
GET/ordering/:version/orders

URI Parameters
HideShow
card_reference
String (optional) 

Card reference used to pay the order

location_id
Integer (optional) 

Location used for in-venue or home delivery

order_items
Array (required) 

Order items ordered by customer

ordered_for
String (optional) 

Time customer is ordering for

promotion_code
String (optional) 

Promotion Code if applicable

promotion_estimate
String (optional) 

Requested Promotion Amount to be applied to this Order

promotion_id
Integer (optional) 

Requested Promotion ID

service_id
Integer (required) 

Service ID selected by customer

venue_id
Integer (required) 

Venue ID of the order


Orders single

Actions on the Orders resource

PUT https://api-sandbox.airservice.com/ordering/:version/orders/:id/pay
Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "card_reference": null,
  "location_id": null,
  "order_items": null,
  "ordered_for": null,
  "promotion_code": null,
  "promotion_estimate": null,
  "promotion_id": null,
  "service_id": null,
  "venue_id": null
}
Responses200
Headers
Content-Type: application/json
Body
{
  "id": 32,
  "card_reference": null,
  "location_id": null,
  "order_items": null,
  "ordered_for": null,
  "promotion_code": null,
  "promotion_estimate": null,
  "promotion_id": null,
  "service_id": null,
  "venue_id": null
}

Settle Payment of successful Order
PUT/ordering/:version/orders/:id/pay

URI Parameters
HideShow
id
Integer (required) 

The Order ID received from successful order creation

payment_details
Hash (required) 

The requisite payment details that must match to the Payment Type

payment_type
String (required) 

The requisite payment type that will be used for the transaction


Orders single

Actions on the Orders resource

GET https://api-sandbox.airservice.com/ordering/:version/orders/:id
Responses200
Headers
Content-Type: application/json
Body
{
  "id": 917,
  "card_reference": null,
  "location_id": null,
  "order_items": null,
  "ordered_for": null,
  "promotion_code": null,
  "promotion_estimate": null,
  "promotion_id": null,
  "service_id": null,
  "venue_id": null
}

Returns order details
GET/ordering/:version/orders/:id

URI Parameters
HideShow
id
Integer (required) 

The Order ID received from successful order creation


Ordering

Properties

Name Type Description
location_id Integer Location used for in-venue or home delivery
order_items Array Order items ordered by customer
ordered_for String Time customer is ordering for
promotion_id Integer Promotion Customer has selected to redeem
service_id Integer Service ID selected by customer
venue_id Integer Venue ID of the order

Ordering collection

Actions on the Ordering resource

POST https://api-sandbox.airservice.com/ordering/:version/pricecheck
Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "location_id": null,
  "order_items": null,
  "ordered_for": null,
  "promotion_id": null,
  "service_id": null,
  "venue_id": null
}
Responses201
Headers
Content-Type: application/json
Body
[
  {
    "id": 444,
    "location_id": null,
    "order_items": null,
    "ordered_for": null,
    "promotion_id": null,
    "service_id": null,
    "venue_id": null
  }
]

Pricechecks an order
POST/ordering/:version/pricecheck

URI Parameters
HideShow
location_id
Integer (optional) 

Location used for in-venue or home delivery

order_items
Array (required) 

Order items ordered by customer

ordered_for
String (optional) 

Time customer is ordering for

promotion_id
Integer (optional) 

Promotion Customer has selected to redeem

service_id
Integer (required) 

Service ID selected by customer

venue_id
Integer (required) 

Venue ID of the order


Payment Methods

Properties

Name Type Description
payment_method_nonce

Payment Methods collection

Actions on the Payment methods resource

GET https://api-sandbox.airservice.com/ordering/:version/payment_methods/client_token
Responses200
Headers
Content-Type: application/json
Body
[
  {
    "id": 784,
    "payment_method_nonce": null
  }
]

Provides Authorized Client Payment Token
GET/ordering/:version/payment_methods/client_token


Payment Methods collection

Actions on the Payment methods resource

GET https://api-sandbox.airservice.com/ordering/:version/payment_methods
Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "payment_method_nonce": null
}
Responses201
Headers
Content-Type: application/json
Body
[
  {
    "id": 565,
    "payment_method_nonce": null
  }
]

Provides Authenticated Customer Payment Methods
GET/ordering/:version/payment_methods


Payment Methods single

Actions on the Payment methods resource

Generated by aglio on 29 Nov 2016