GET Accommodation by context, contextId

Overview

Retrieve accommodation components by Booking ID

Request

GET /[context]/[contextId]/Accommodation

Request Information

Request Parameters

Name
Type
Requirement
Description
context
String
Mandatory
Context in Request URI should be 'bookings'
contextId
Integer
Mandatory
ContextId in Request URI should be Booking ID

Response Information

Response Properties

Name
Type
Description
accommodation
List<Accommodation>
List of accommodation components

Accommodation

Name
Type
Description
product
HrefWrapper
URI of accommodation product
accommodationName
String
Name of accommodation product
accommodationDisplayName
String
Display Name of accommodation product
roomType
String
Room type for accommodation
startDate
String
Check-in date for accommodation
finishDate
String
Check-out date for accommodation
numberOfNights
Integer
Number of nights set for accommodation
suburb
String
Suburb of accommodation
city
String
City of accommodation
country
String
Country of accommodation
currency
String
Currency
totalPrice
Decimal
Total gross price for all customers on accommodation
netPrice
Decimal
Gross price minus any commission for the accommodation
customers
HrefWrapper
URI used to retrieve all customers on accomodation
customerStatuses
Key Value Pair
Key/value pairs indicating the number of customers 
per status on the accommodation; e.g.: 
{
''confirmed'': 2,
''cancelled'': 1
}
customerStatusIds
List<CustomerStatuses>
List of customer statuses along with url for each customer on that status
streetAddress1
String
First street address of the accommodation
streetAddress2
String
Second Street address of the accommodation
phoneNumber
String
Phone Number
postCode
String
Post Code
locationName
String
Display Name of accommodation location
id
Integer
ID of the resource
href
String
URI of the resource
sequence
Int64
Sequence of product

Customerstatusids

Name
Type
Description
status
String
Customers status
customers
List<HrefWrapper>
Url of Customers in relevant status

Product

Name
Type
Description
href
String
URI of the resource

Customers

Name
Type
Description
href
String
URI of the resource

Response Codes

HTTP status code
Description
200 OK
The resource was retrieved successfully
400 Bad Request
The resource was malformed
401 Unauthorized
Missing or invalid API key
404 Not Found
The specified resource was not found
500 Internal Server Error
An unexpected error occurred on the API server

Response Example

{
  "accommodation": [
    {
      "product": {
        "href": "/products/91066"
      },
      "accommodationName": "Hilton hotel",
      "accommodationDisplayName": "Hilton hotel",
      "roomType": "Single",
      "startDate": "2016-12-20",
      "finishDate": "2016-12-22",
      "numberOfNights": 1,
      "suburb": "Southbank",
      "city": "Melbourne",
      "country": "Australia",
      "currency": "AUD",
      "totalPrice": 1250.0,
      "netPrice": 1120.75,
      "customers": {
        "href": "/accommodation/887124/customers"
      },
      "customerStatuses": {
        "confirmed": 2,
        "tentative": 1
      },
      "customerStatusIds": [
        {
          "status": "tentative",
          "customers": [
            {
              "href": "/context/5057124/customers/4945398"
            },
            {
              "href": "/context/5057124/customers/4945398"
            }
          ]
        },
        {
          "status": "tentative",
          "customers": [
            {
              "href": "/context/5057124/customers/4945398"
            },
            {
              "href": "/context/5057124/customers/4945398"
            }
          ]
        }
      ],
      "streetAddress1": "street address 1",
      "streetAddress2": "street address 2",
      "phoneNumber": "+66 12312312",
      "postCode": "12345",
      "locationName": "Hotel Hong Ngoc Cochinchine",
      "id": 887124,
      "href": "context/contextid/accommodation/887124",
      "sequence": "202403312359580000"
    },
    {
      "product": {
        "href": "/products/91066"
      },
      "accommodationName": "Hilton hotel",
      "accommodationDisplayName": "Hilton hotel",
      "roomType": "Single",
      "startDate": "2016-12-20",
      "finishDate": "2016-12-22",
      "numberOfNights": 1,
      "suburb": "Southbank",
      "city": "Melbourne",
      "country": "Australia",
      "currency": "AUD",
      "totalPrice": 1250.0,
      "netPrice": 1120.75,
      "customers": {
        "href": "/accommodation/887124/customers"
      },
      "customerStatuses": {
        "confirmed": 2,
        "tentative": 1
      },
      "customerStatusIds": [
        {
          "status": "tentative",
          "customers": [
            {
              "href": "/context/5057124/customers/4945398"
            },
            {
              "href": "/context/5057124/customers/4945398"
            }
          ]
        },
        {
          "status": "tentative",
          "customers": [
            {
              "href": "/context/5057124/customers/4945398"
            },
            {
              "href": "/context/5057124/customers/4945398"
            }
          ]
        }
      ],
      "streetAddress1": "street address 1",
      "streetAddress2": "street address 2",
      "phoneNumber": "+66 12312312",
      "postCode": "12345",
      "locationName": "Hotel Hong Ngoc Cochinchine",
      "id": 887124,
      "href": "context/contextid/accommodation/887124",
      "sequence": "202403312359580000"
    }
  ]
}