AirService API v3.0

The mobile commerce platform

OAuth Authentication

Properties

Name Type Description
client_id String Used to identify the application a request is coming from. Use your generated client id from the developer portal. Can be public.
client_secret String Used to verify the application. Used only with grant_type client_credentials. Keep this safe from malicious users.
grant_type String Allowed values are password for customer or venue authentication. client_credentials for application authentication. refresh_token for getting a new token using refresh_token
password String Corresponding password used with grant_type password.
refresh_token String Refresh token used with grant_type refresh_token
username String Customer, venue slug or client email used with grant_type password.

OAuth

Actions available on the OAuth resource

POST https://qa.venues.airservice.co/api/:version/oauth/token
Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "client_id": null,
  "client_secret": null,
  "grant_type": null,
  "password": null,
  "refresh_token": null,
  "username": null
}
Responses201
Headers
Content-Type: application/json
Body
[
  {
    "id": 205,
    "client_id": null,
    "client_secret": null,
    "grant_type": null,
    "password": null,
    "refresh_token": null,
    "username": null
  }
]

Issues an access token based on provided credentials
POST/:version/oauth/token

URI Parameters
HideShow
client_id
String (required) 

Used to identify the application a request is coming from. Use your generated client id from the developer portal. Can be public.

client_secret (optional, String, ``) ... Used to verify the application. Used only with grant_type `client_credentials`. Keep this safe from malicious users.
string (required) 
grant_type (required, String, ``) ... Allowed values are `password` for customer or venue authentication. `client_credentials` for application authentication. `refresh_token` for getting a new token using refresh_token
string (required) 
password
String (optional) 
refresh_token (optional, String, ``) ... Refresh token used with grant_type `refresh_token`
string (required) 
username
String (optional) 

DELETE https://qa.venues.airservice.co/api/:version/oauth/token
Responses200
Headers
Content-Type: application/json
Body
{
  "id": 86,
  "client_id": null,
  "client_secret": null,
  "grant_type": null,
  "password": null,
  "refresh_token": null,
  "username": null
}

Expires token provided in Authorization header. If access token is supplied it expires corresponding refresh token
DELETE/:version/oauth/token

URI Parameters
HideShow
client_id
String (required) 

Used to identify the application a request is coming from. Use your generated client id from the developer portal. Can be public.

client_secret (optional, String, ``) ... Used to verify the application. Used only with grant_type `client_credentials`. Keep this safe from malicious users.
string (required) 
grant_type (required, String, ``) ... Allowed values are `password` for customer or venue authentication. `client_credentials` for application authentication. `refresh_token` for getting a new token using refresh_token
string (required) 
password
String (optional) 
refresh_token (optional, String, ``) ... Refresh token used with grant_type `refresh_token`
string (required) 
username
String (optional) 

Collection

Collection

Actions available on the Collection resource

GET https://qa.venues.airservice.co/api/:version/collection
Responses200
Headers
Content-Type: application/json
Body
[
  {
    "id": 223
  }
]

Returns detailed information about Collection
GET/:version/collection

URI Parameters
HideShow
collection
String (optional) 

The collection code of venues you wish to search against. Default is primary Airservice collection


Collection Regions

Actions available on the Collection resource

Sectors

Sectors

Actions available on the Sectors resource

GET https://qa.venues.airservice.co/api/:version/sectors
Responses200
Headers
Content-Type: application/json
Body
[
  {
    "id": 531
  }
]

Returns sectors grouped by active and coming soon
GET/:version/sectors

URI Parameters
HideShow
lat
Float (optional) 

Latitude of location to perform the search around

long
Float (optional) 

Longitude of location to perform the search around


Sector

Actions available on the Sectors resource

GET https://qa.venues.airservice.co/api/:version/sectors/:id
Responses200
Headers
Content-Type: application/json
Body
{
  "id": 553
}

Returns detailed information about Sector
GET/:version/sectors/:id

URI Parameters
HideShow
id
String (required) 

Unique sector id or sector slug


Venues

Venues

Actions available on the Venues resource

GET https://qa.venues.airservice.co/api/:version/venues
Responses200
Headers
Content-Type: application/json
Body
[
  {
    "id": 42
  }
]

Returns venues grouped by active and coming soon
GET/:version/venues

URI Parameters
HideShow
collection
String (optional) 

DEPRECATED: Use ‘X-App-ASCollection’ in headers. The Collection code of venues. Default is primary Airservice collection

lat
Float (optional) 

Latitude of location to perform the search around

limit
Integer (optional) 

Limit the response size of the search of Collection, Location, Search Terms and Service applied

long
Float (optional) 

Longitude of location to perform the search around

search
String (optional) 

Search string for Venues and all Products

sector_id
String (optional) 

The Sector ID with the Collection

service_time
String (optional) 

The Service time for the customer to filter venue results

service_type_id
Integer (optional) 

The Service Type ID to filter venue results


Venue

Actions available on the Venues resource

GET https://qa.venues.airservice.co/api/:version/venues/:id
Responses200
Headers
Content-Type: application/json
Body
{
  "id": 209
}

Returns detailed information about Venue
GET/:version/venues/:id

URI Parameters
HideShow
id
String (required) 

Unique Venue ID or Venue code


GET https://qa.venues.airservice.co/api/:version/venues/:venue_id/menus
Responses200
Headers
Content-Type: application/json
Body
[
  {
    "id": 428
  }
]

GET https://qa.venues.airservice.co/api/:version/venues/:venue_id/menus/:id
Responses200
Headers
Content-Type: application/json
Body
{
  "id": 440
}

Search Venue for Available Services and Menus

GET https://qa.venues.airservice.co/api/:version/venues/:venue_id/search
Responses200
Headers
Content-Type: application/json
Body
[
  {
    "id": 109
  }
]

Search for menus based on above params
GET/:version/venues/:venue_id/search

URI Parameters
HideShow
begins
String (optional) 

Begin time of interval in ‘12:00’ format

ends
String (optional) 

End Time of interval ‘12:00’ format

interval_id
Integer (optional) 

Interval Id for Customer selected Service period

location_id
Integer (optional) 

Location used for in-venue or home delivery

service_id
Integer (required) 

Service ID selected by customer

venue_id
String (required) 

Unique Venue ID or Venue code


Products

Product

Actions available on the Products resource

GET https://qa.venues.airservice.co/api/:version/venues/:venue_id/products/:id
Responses200
Headers
Content-Type: application/json
Body
{
    "id": 80
  }
Group Customer
Properties

| Name | Type | Description |
|:-----|:-----|:------------|
| birth_date |   | Customer birth date |
| email |  String | Unique customer email address |
| mobile |  String | Customer mobile number |
| name |  String | Customer full name |
| photo |   | Customer photo |

Returns the specified product
GET/:version/venues/:venue_id/products/:id

URI Parameters
HideShow
id
Integer (required) 

Unique product id

venue_id
String (required) 

Unique Venue ID or Venue code


Customer

Actions available on the Customer resource

POST https://qa.venues.airservice.co/api/:version/customer
Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "birth_date": null,
  "email": null,
  "mobile": null,
  "name": null,
  "photo": null
}
Responses201
Headers
Content-Type: application/json
Body
[
  {
    "id": 137,
    "birth_date": null,
    "email": null,
    "mobile": null,
    "name": null,
    "photo": null
  }
]

Creates a new customer
POST/:version/customer

URI Parameters
HideShow
birth_date
string (optional) 

Customer birth date

email
String (required) 

Unique customer email address

mobile
String (required) 

Customer mobile number

name
String (required) 

Customer full name

photo
string (optional) 

Customer photo


GET https://qa.venues.airservice.co/api/:version/customer
Responses200
Headers
Content-Type: application/json
Body
[
  {
    "id": 630,
    "birth_date": null,
    "email": null,
    "mobile": null,
    "name": null,
    "photo": null
  }
]

Returns customer details
GET/:version/customer

URI Parameters
HideShow
birth_date
string (optional) 

Customer birth date

email
String (required) 

Unique customer email address

mobile
String (required) 

Customer mobile number

name
String (required) 

Customer full name

photo
string (optional) 

Customer photo


PATCH https://qa.venues.airservice.co/api/:version/customer
Responses200
Headers
Content-Type: application/json
Body
{
  "id": 310,
  "birth_date": null,
  "email": null,
  "mobile": null,
  "name": null,
  "photo": null
}

Updates customer details. Customer is identified by token.
PATCH/:version/customer

URI Parameters
HideShow
birth_date
string (optional) 

Customer birth date

email
String (required) 

Unique customer email address

mobile
String (required) 

Customer mobile number

name
String (required) 

Customer full name

photo
string (optional) 

Customer photo


Customer single

Actions available on the Customer resource

[DELETE]

  • Response 200 (application/json)

    • Body

      {
            "id": 684,
            "birth_date": null,
            "email": null,
            "mobile": null,
            "name": null,
            "photo": null
          }

Customer

Actions available on the Customer resource

In-Venue Locations

Locations

Actions available on the Locations resource

GET https://qa.venues.airservice.co/api/:version/venues/:venue_id/locations
Responses200
Headers
Content-Type: application/json
Body
[
  {
    "id": 143
  }
]

Returns venue locations for in-venue delivery
GET/:version/venues/:venue_id/locations

URI Parameters
HideShow
page
Integer (optional) 

Current page or results

search
String (optional) 

Search for locations

venue_id
String (required) 

Unique venue id


Delivery Address Suggestions

Suggestions

Actions available on the Suggestions resource

GET https://qa.venues.airservice.co/api/:version/addresses/suggestions
Responses200
Headers
Content-Type: application/json
Body
[
    {
      "id": 106
    }
]
Group Customer Delivery Details
Properties

| Name | Type | Description |
|:-----|:-----|:------------|
| address |  String | Delivery address |
| venue_id |  Integer | Unique venue ID |

Get list of addresses matching search criteria
GET/:version/addresses/suggestions

URI Parameters
HideShow
String
string (optional) 
collection
string (optional) 
q
String (required) 

Address to search

region
String (optional) 

Region used for search, default to au


Delivery Details

Actions available on the Delivery details resource

GET https://qa.venues.airservice.co/api/:version/customer/delivery_details
Responses200
Headers
Content-Type: application/json
Body
[
  {
    "id": 824,
    "address": null,
    "venue_id": null
  }
]

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

URI Parameters
HideShow
venue_id
Integer (optional) 

Unique Venue ID or Venue code


POST https://qa.venues.airservice.co/api/:version/customer/delivery_details
Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "address": null,
  "venue_id": null
}
Responses201
Headers
Content-Type: application/json
Body
[
  {
    "id": 287,
    "address": null,
    "venue_id": null
  }
]

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

URI Parameters
HideShow
venue_id
Integer (optional) 

Unique Venue ID or Venue code


Delivery Detail

Actions available on the Delivery details resource

DELETE https://qa.venues.airservice.co/api/:version/customer/delivery_details/:id
Responses200
Headers
Content-Type: application/json
Body
{
  "id": 5,
  "address": null,
  "venue_id": null
}

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

URI Parameters
HideShow
id
Integer (required) 

Unique delivery address of a customer


Delivers To

Delivers To

Actions available on the Delivers to resource

GET https://qa.venues.airservice.co/api/:version/venues/:venue_id/delivers_to
Responses200
Headers
Content-Type: application/json
Body
[
    {
      "id": 965
    }
]
Group Orders
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 |

Returns whether or not a venue can deliver to a delivery address
GET/:version/venues/:venue_id/delivers_to

URI Parameters
HideShow
address
String (required) 

Delivery address

venue_id
String (required) 

Unique venue id


Orders

Actions available on the Orders resource

POST https://qa.venues.airservice.co/api/:version/orders/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": 286,
    "location_id": null,
    "order_items": null,
    "ordered_for": null,
    "promotion_id": null,
    "service_id": null,
    "venue_id": null
  }
]

Pricechecks an order
POST/:version/orders/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


Orders

Actions available on the Orders resource

POST https://qa.venues.airservice.co/api/:version/orders
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": 899,
    "location_id": null,
    "order_items": null,
    "ordered_for": null,
    "promotion_id": null,
    "service_id": null,
    "venue_id": null
  }
]

Creates a new order
POST/:version/orders

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

payment_details (optional, Hash, ``) ... The requisite payment details that must match to the Payment Type i.e. { "payment_method_token": "7t9fr6" }
string (required) 
payment_type
String (optional) 

The requisite payment type that will be used for the transaction i.e. ‘braintree’

promotion_estimate (optional, String, ``) ... Promotion estimate is the promotion amount expected for this order, this is returned in the pricecheck api call as promotion_amount. This is required for promotional orders
string (required) 
promotion_id
Integer (optional) 

Promotion Customer has selected to redeem

service_id
Integer (required) 

Service ID selected by customer

source_device (optional, Hash, ``) ... The device source with platform and token i.e. { "platform": "ios", "device_token": "blerg" }
string (required) 
venue_id
Integer (required) 

Venue ID of the order


GET https://qa.venues.airservice.co/api/:version/orders
Responses200
Headers
Content-Type: application/json
Body
[
  {
    "id": 834,
    "location_id": null,
    "order_items": null,
    "ordered_for": null,
    "promotion_id": null,
    "service_id": null,
    "venue_id": null
  }
]

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

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

payment_details (optional, Hash, ``) ... The requisite payment details that must match to the Payment Type i.e. { "payment_method_token": "7t9fr6" }
string (required) 
payment_type
String (optional) 

The requisite payment type that will be used for the transaction i.e. ‘braintree’

promotion_estimate (optional, String, ``) ... Promotion estimate is the promotion amount expected for this order, this is returned in the pricecheck api call as promotion_amount. This is required for promotional orders
string (required) 
promotion_id
Integer (optional) 

Promotion Customer has selected to redeem

service_id
Integer (required) 

Service ID selected by customer

source_device (optional, Hash, ``) ... The device source with platform and token i.e. { "platform": "ios", "device_token": "blerg" }
string (required) 
venue_id
Integer (required) 

Venue ID of the order


Order

Actions available on the Orders resource

PUT https://qa.venues.airservice.co/api/:version/orders/:id/pay
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
}
Responses200
Headers
Content-Type: application/json
Body
{
  "id": 602,
  "location_id": null,
  "order_items": null,
  "ordered_for": null,
  "promotion_id": null,
  "service_id": null,
  "venue_id": null
}

Settle Payment of successful Order
PUT/: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


Order

Actions available on the Orders resource

PUT https://qa.venues.airservice.co/api/:version/orders/:id/cancel
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
}
Responses200
Headers
Content-Type: application/json
Body
{
  "id": 389,
  "location_id": null,
  "order_items": null,
  "ordered_for": null,
  "promotion_id": null,
  "service_id": null,
  "venue_id": null
}

Cancel a Succesful Order prior to Payment Settlement
PUT/:version/orders/:id/cancel

URI Parameters
HideShow
id
Integer (required) 

Orders

Actions available on the Orders resource

POST https://qa.venues.airservice.co/api/:version/paypal/orders
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": 410,
    "location_id": null,
    "order_items": null,
    "ordered_for": null,
    "promotion_id": null,
    "service_id": null,
    "venue_id": null
  }
]

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

URI Parameters
HideShow
card_reference
String (optional) 

Card reference used to pay the order

customer
Hash (required) 
email
String (optional) 
mobile
String (optional) 
name
String (optional) 
paypal_customer_id
String (required) 
delivery_address
String (optional) 

Delivery address

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

paypal_tab_id
String (required) 
service_id
Integer (required) 

Service ID selected by customer

venue_id
Integer (required) 

Venue ID of the order


Order

Actions available on the Orders resource

Password

Actions available on the Password resource

POST https://qa.venues.airservice.co/api/:version/customer/password
Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "email": null
}
Responses201
Headers
Content-Type: application/json
Body
[
  {
    "id": 793,
    "email": null
  }
]

Resets customer password
POST/:version/customer/password

URI Parameters
HideShow
email
String (required) 

Unique customer email address


Client Token

Client Token

Actions available on the Client token resource

GET https://qa.venues.airservice.co/api/:version/payment/client_token
Responses200
Headers
Content-Type: application/json
Body
[
  {
    "id": 842
  }
]

Provides Authorized Client Payment Token
GET/:version/payment/client_token


Payment Methods

Methods

Actions available on the Methods resource

GET https://qa.venues.airservice.co/api/:version/payment/methods
Requestsexample 1example 2
Headers
Content-Type: application/json
Body
{
  "payment_method_nonce": null
}
Responses201
Headers
Content-Type: application/json
Body
[
  {
    "id": 152,
    "payment_method_nonce": null
  }
]
Headers
Content-Type: application/json
Body
{
  "payment_method_nonce": null
}
Responses200
Headers
Content-Type: application/json
Body
{
  "id": 316,
  "payment_method_nonce": null
}

Provides Authenticated Customer Payment Methods
GET/:version/payment/methods


Promotions

Collection and iBeacon Promotions

Actions available on the Promotions resource

GET https://qa.venues.airservice.co/api/:version/collection/promotions
Responses200
Headers
Content-Type: application/json
Body
[
  {
    "id": 921
  }
]

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

URI Parameters
HideShow
customer_id
Integer (optional) 

Authenticated Customer Id

major
Integer (required) 

Beacon Major

minor
Integer (required) 

Beacon Minor

uuid
String (required) 

Beacon UUID


Promotions

Actions available on the Promotions resource

GET https://qa.venues.airservice.co/api/:version/customer/promotions
Responses200
Headers
Content-Type: application/json
Body
[
  {
    "id": 908
  }
]

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

URI Parameters
HideShow
ordered_for
String (optional) 

Optional Ordered For to test availability etc for promotion

venue_id
Integer (optional) 

Optional Venue Id


Activate a coupon promotion for a customer

Actions available on the Activate resource

POST https://qa.venues.airservice.co/api/:version/customer/promotions/:promotion_id/activate
Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "coupon": null
}
Responses201
Headers
Content-Type: application/json
Body
[
  {
    "id": 520,
    "coupon": null
  }
]

Activate a particular promotion for a customer via coupon
POST/:version/customer/promotions/:promotion_id/activate

URI Parameters
HideShow
coupon
String (required) 

A promotion coupon


Generated by aglio on 03 Aug 2016