API Specification

Warning

This documentation is subject to change and further enhancement.

SMX will allow for partner applications to PULL availability and rate data from the SMX platform.

Data will be provided to SMX by the hoteliers property management systems (PMS), referred to in this API as a 'Publisher'.

The request and response will be sent in a application/JSON format, derived from OTA2017A.

Change Log

Availability and Rate API Change Log

Message Samples

Please refer to the Resources section of the documentation.

Security

BearerAuthorization

apiKey API Key
Name Authorization
In Header
Description Must be in format of Bearer <TOKEN>

Tokens can be self-generated through the SMX Subscriber Admin Portal by the 'Account Owner'.

Publishers

Publisher List

Method: GET
Path: /publishers

Description: Get a list of publishers connected to your application.

Responses

Code Description Schema
200 OK Publisher
401 Unauthorized Error
403 Forbidden Error
429 Too Many Requests TooManyRequests
500 Internal Server Error Error

Publisher Hotels

Method: GET
Path: /publishers/{publisherCode}/hotels

Description: Get a list of hotels connected to the selected publisher and your application.

Parameters

Name Located in Description Required Type
publisherCode path Publisher code Yes string

Responses

Code Description Schema
200 OK Hotel
401 Unauthorized Error
403 Forbidden Error
429 Too Many Requests TooManyRequests
500 Internal Server Error Error

RatePlans

RatePlan by Hotel

Method: GET
Path: ​/publisher​s/{publisherCode}​/hotel​s/{hotelCode}​/ratePlans

Description: Lists all the Rate Plans for a specific hotel and publisher.

Parameters

Name Located in Description Required Type
publisherCode path The unique identifier for the data publisher. Please refer to PMS RequestorID/publisherCode list Yes string
hotelCode path The code that uniquely identifies a single hotel property. Yes string

Responses

Code Description Schema
200 OK RatePlan
401 Unauthorized Error
403 Forbidden Error
429 Too Many Requests TooManyRequests
500 Internal Server Error Error

RatePlan by Rate Plan Code

Method: GET
Path:/publisher​s/{publisherCode}​/hotel​s/{hotelCode}​/ratePlans​/{ratePlanCode}

Description: Get a specific rate plan for a hotel and publisher

Parameters

Name Located in Description Required Type
publisherCode path The unique identifier for the data publisher. Please refer to PMS RequestorID/publisherCode list Yes string
hotelCode path The code that uniquely identifies a single hotel property. Yes string
ratePlanCode path The rate plan code. Yes string

Responses

Code Description Schema
200 OK RatePlan
401 Unauthorized Error
403 Forbidden Error
429 Too Many Requests TooManyRequests
500 Internal Server Error Error

Rate by Rate Plan

Method: GET
Path: /publishers/{publisherCode}/hotels/{hotelCode}/ratePlans/{ratePlanCode}/rates

Description: Fetch the rates for a rate plan code based on given date range for a specific hotel and publisher

NOTE If a publisher does not send a ratePlanCode with a rate then use ratePlanCode: NO_RATE_PLAN_PROVIDED_SM in the path for the GET method

Parameters

Name Located in Description Required Type
publisherCode path The unique identifier for the data publisher. Please refer to PMS RequestorID/publisherCode list Yes string
hotelCode path The code that uniquely identifies a single hotel property. Yes string
ratePlanCode path The rate plan code. Note: If a publisher does not send a ratePlanCode with a rate then use ratePlanCode": "NO_RATE_PLAN_PROVIDED_SM" Yes string
startDate query Start date to query for rates. Format like yyyy-MM-dd i.e 2017-07-21. Yes date
range query The number of days to query for. Maximum 30. No number

Responses

Code Description Schema
200 OK Rate
401 Unauthorized Error
403 Forbidden Error
429 Too Many Requests TooManyRequests
500 Internal Server Error Error

Availability by Rate Plan

Method: GET
Path: /publishers/{publisherCode}/hotels/{hotelCode}/ratePlans/{ratePlanCode}/availability

Description: Fetch the availability for a given rate plan, hotel, and publisher.

Parameters

Name Located in Description Required Type
publisherCode path The unique identifier for the data publisher. Please refer to PMS RequestorID/publisherCode list Yes string
hotelCode path The code that uniquely identifies a single hotel property. Yes string
ratePlanCode path The rate plan code. Yes string
startDate query Start date to query for rates. Format like yyyy-MM-dd i.e 2017-07-21. Yes date
range query The number of days to query for. Maximum 30. No number

Responses

Code Description Schema
200 OK Availability
401 Unauthorized Error
403 Forbidden Error
429 Too Many Requests TooManyRequests
500 Internal Server Error Error

Rates

Rates by Rate Plan

Method: GET
Path: /publishers/{publisherCode}/hotels/{hotelCode}/ratePlans/{ratePlanCode}/rates

Description: Fetch the rates for a rate plan code based on given date range, hotel, and publisher.

Parameters

Name Located in Description Required Type
publisherCode path The unique identifier for the data publisher. Please refer to PMS RequestorID/publisherCode list Yes string
hotelCode path The code that uniquely identifies a single hotel property. Yes string
ratePlanCode path The rate plan code. Yes string
startDate query Start date to query for rates. Format like yyyy-MM-dd i.e 2017-07-21. Yes date
range query The number of days to query for. Maximum 30. No number

Responses

Code Description Schema
200 OK Rate
401 Unauthorized Error
403 Forbidden Error
429 Too Many Requests TooManyRequests
500 Internal Server Error Error

Hotel Availability

Availability by Rate Plan

Method: GET
Path: /publishers/{publisherCode}/hotels/{hotelCode}/ratePlans/{ratePlanCode}/availability

Description: Fetch the availability for a given rate plan, hotel, and publisher.

Parameters

Name Located in Description Required Type
publisherCode path The unique identifier for the data publisher. Please refer to PMS RequestorID/publisherCode list Yes string
hotelCode path The code that uniquely identifies a single hotel property. Yes string
ratePlanCode path The rate plan code. Yes string
startDate query Start date to query for rates. Format like yyyy-MM-dd i.e 2017-07-21. Yes date
range query The number of days to query for. Maximum 30. No number

Responses

Code Description Schema
200 OK Availability
401 Unauthorized Error
403 Forbidden Error
429 Too Many Requests TooManyRequests
500 Internal Server Error Error

Availability by Room Type

Method: GET
Path: /publishers/{publisherCode}/hotels/{hotelCode}/roomTypes/{roomTypeCode}/availability

Description: Get all availability for a room type, date range, hotel, and publisher.

Parameters

Name Located in Description Required Type
publisherCode path The unique identifier for the data publisher. Please refer to PMS RequestorID/publisherCode list Yes string
hotelCode path The code that uniquely identifies a single hotel property. Yes string
roomTypeCode path The code that identifies a Room Type. Yes string
startDate query Start date to query for availability. Format like yyyy-MM-dd i.e 2017-07-21. Yes date
range query The number of days to query for. Maximum 30. No number

Responses

Code Description Schema
200 OK Availability
401 Unauthorized Error
403 Forbidden Error
429 Too Many Requests TooManyRequests
500 Internal Server Error Error

Availability by Hotel

Method: GET
Path: /publishers/{publisherCode}/hotels/{hotelCode}/availability

Description: Get all availability for a specific hotel, publisher and date range

Parameters

Name Located in Description Required Type
publisherCode path The unique identifier for the data publisher. Please refer to PMS RequestorID/publisherCode list Yes string
hotelCode path The code that uniquely identifies a single hotel property. Yes string
startDate query Start date to query for availability. Format like yyyy-MM-dd i.e 2017-07-21. Yes date
range query The number of days to query for availability. Maximum 30. No number

Responses

Code Description Schema
200 OK Availability
401 Unauthorized Error
403 Forbidden Error
429 Too Many Requests TooManyRequests
500 Internal Server Error Error

RoomTypes

RoomType by Hotel

Method: GET
Path: /publisher​s/{publisherCode}​/hotel​s/{hotelCode}​/roomTypes

Description: Lists all the Room Types for a specific hotel and publisher.

Parameters

Name Located in Description Required Type
publisherCode path The unique identifier for the data publisher. Please refer to PMS RequestorID/publisherCode list Yes string
hotelCode path The code that uniquely identifies a single hotel property. Yes string

Responses

Code Description Schema
200 OK RoomType
401 Unauthorized Error
403 Forbidden Error
429 Too Many Requests TooManyRequests
500 Internal Server Error Error

RoomType by Room Type

Method: GET
Path: ​/publisher​s/{publisherCode}​/hotel​s/{hotelCode}​/roomTypes​/{roomTypeCode}

Description: Get a specific room type for a specific hotel and publisher.

Parameters

Name Located in Description Required Type
publisherCode path The unique identifier for the data publisher. Please refer to PMS RequestorID/publisherCode list Yes string
hotelCode path The code that uniquely identifies a single hotel property. Yes string
roomTypeCode path The code that identifies a Room Type. Yes string

Responses

Code Description Schema
200 OK RoomType
401 Unauthorized Error
403 Forbidden Error
429 Too Many Requests TooManyRequests
500 Internal Server Error Error

Availability by Room Type

Method: GET
Path: ​/publisher​s/{publisherCode}​/hotel​s/{hotelCode}​/roomTypes​/{roomTypeCode}​/availability

Description: Get all availability for a specific room type, date range, hotel and publisher.

Parameters

Name Located in Description Required Type
publisherCode path The unique identifier for the data publisher. Please refer to PMS RequestorID/publisherCode list Yes string
hotelCode path The code that uniquely identifies a single hotel property. Yes string
roomTypeCode path The code that identifies a Room Type. Yes string
startDate query Start date to query for availability. Format like yyyy-MM-dd i.e 2017-07-21. Yes date
range query The number of days to query for. Maximum 30. No number

Responses

Code Description Schema
200 OK Availability
401 Unauthorized Error
403 Forbidden Error
429 Too Many Requests TooManyRequests
500 Internal Server Error Error

Models

200 Response Headers

Name Type Description
X-SM-REFERENCE-ID string The reference ID used for the request
X-SM-ELAPSED-TIME number (integer) The elapsed time on the server side for the response to be written in milliseconds

Publisher

Name Type Description Required
name string Publisher name Yes
code string Publisher code Yes
messageTypes MessageTypes Message types supported by the publisher Yes

Hotel

Name Type Description Required
name string Hotel name Yes
code string Hotel code Yes
currency string ISO 4217 currency code for the hotel currency Yes
messageTypes MessageTypes Message types supported by the publisher Yes

RatePlan

Name Type Description Required
code string The code of the rate plan Yes
category string This is the segment/category to which the rate plan belongs to No
yieldable boolean Boolean attribute to indicate whether the rate is yieldable or not. Only one Yieldable indicator is acceptable for RatePlan code; therefore, the Yieldable indicator must be the same for all seasons passed. No
marketCode string String attribute to indicate the market code for the rate. Only one MarketCode is acceptable for RatePlan code; therefore, the MarketCode must be the same for all seasons passed. No
confidential boolean This attribute is a boolean to indicate if the rate is to be considered “Confidential.” No
start date Start date. Format yyyy-MM-dd i.e 2017-07-21. No
end date End date. The rate plan date range is not inclusive of the end date. Format yyyy-MM-dd i.e 2017-07-21. No
commissionable boolean This indicates whether the rate season is commissionable or not. If the Boolean is sent as False, the rate season is not commissionable. If the Boolean is set to True, but NO commission is sent in the commission element, then the commission to be applied is the default one for the property. If the Boolean is set to True and a commission is passed in the field then the commission sent is the one applied to the rate season. No
description string Description of the rate plan No
commissionPercentage double Commission percentage No
commissionAmount double Commission amount. No
minimumAdvancedBookingOffset number (integer) This is the minimum amount of days prior to arrival that the rate can be booked. No
maximumAdvancedBookingOffset number (integer) This is the maximum amount of days prior to arrival that the rate can be booked. No
minLOS number (integer) This is the minimum length of stay requirement associated No
maxLOS number (integer) This is the maximum length of stay requirement associated to the rate No
arrivalWeekDays WeekDays Set of days of the week that arrival is allowed No
availableWeekDays WeekDays Set of days of the week which the rate plan is available and therefore could be used to reflect when STAY is possible No
lastModifiedAt date The last time when this rate plan was modified. No

Rate

Name Type Description Required
date date Date of the rate. Format yyyy-MM-dd i.e 2017-07-21. No
currencyCode string ISO 4217 currency code for the rate No
roomTypeCode string The code that identifies a Room Type. Yes
ratePlanCode string The code that identifies a Rate Plan Yes
status string Indicates for each room code passed for the rate whether it is opened or closed Yes
minLOS integer This is the minimum length of stay requirement associated with the rate plan. No
maxLOS integer This is the maximum length of stay requirement associated to the rate plan. No
baseGuestAmount BaseGuestAmount Base charge for a given number of guests for a given age qualifying code. Yes
additionalGuestAmounts AdditionalGuestAmount Charges related to additional guests. No
lastModifiedAt date The last time when this rate was modified. No

RoomType

Name Type Description Required
code string The ID of the room type Yes
name string Room type name No
description string Description of the room type No

Availability

Name Type Description Required
bookingLimit integer The number of rooms available. Yes
date date Date of the availability. Format yyyy-MM-dd i.e 2017-07-21. Yes
ratePlanCode string The code that identifies a Rate Plan No
roomTypeCode string The code that identifies a Room Type. No
minLOS integer This is the minimum length of stay requirement associated with the rate plan. No
maxLOS integer This is the maximum length of stay requirement associated with the rate plan. No
restriction string The type of restriction
Master
Arrival
Departure
NonGuarantee
TravelAgent
No
status string The status of the restriction
Open
Close
OnRequest
No

MessageTypes

Name Type Description Required
MessageType string Message types supported by the publisher:
Reservations
ARI
Yes

AgeQualifier

Name Type Description Required
AgeQualifier string Declares the type of guest:
child
adult

BaseGuestAmount

Name Type Description Required
ageQualifier AgeQualifier Declares the type of guest:
child
adult
Yes
guestCount integer Number of guests included in the rate amount. Yes
amountBeforeTax number Rate amount exclusive of tax. No
amountAfterTax number Rate amount inclusive of tax. No

AdditionalGuestAmount

Name Type Description Required
ageQualifier AgeQualifier Declares the type of guest:
child
adult
No
amount number This is the tax exclusive rate amount of additional guests No

WeekDays

Name Type Description Required
WeekDays string Days of the week.
Mon
Tues
Wed
Thurs
Fri
Sat
Sun

TooManyRequests

Name Type Description Required
message string Error message Yes
code string Error code No
retryAfter integer The time in seconds to retry after Yes

Error

Name Type Description Required
message string Error message No
code string Error code No
Last Updated: 5/20/2020, 2:56:28 PM