Definitions

AmountPerBooking

Name

Description

Schema

@Value
required

Discount amount per booking value. (Between 0.0 - 99999999.0)
Example : 350.0

number (double)

AmountPerNight

Name

Description

Schema

@NightType
required

Required one of night types as follows: EveryNight, SpecificNight, SpecificDOW, FirstNight, and LastNight.
Example : "EveryNight"

enum (EVERY_NIGHT, SPECIFIC_NIGHT, SPECIFIC_DOW, FIRST_NIGHT, LAST_NIGHT)

Value
required

List of discount amount per night value. (Between 0.0 - 99999999.0)
Example : "[350.0]"

< number (double) > array

CancellationPolicy

Name

Description

Schema

@Id
required

Cancellation policy ID

See: Get a list of supported cancel policies
Example : 0

integer (int32)


ChannelType

Name

Description

Schema

@Id
required

Channel ID

See: Get list of supported channels
Example : 0

integer (int64)


Channels

Name

Description

Schema

Channel
required

Channel of a promotion. This specifies that this channel is applicable to the promotion.
Example : [ "ChannelType" ]

ChannelType > array


CustomerSegmentsType

Name

Description

Schema

@Id
required

Customer Segment Group ID

See: Get a list of supported Customer Segment Groups
Example : 0

integer (int64)

CustomerSegments

Name

Description

Schema

CustomerSegment
required

Customer segment of a promotion. This specifies that this customer segment is applicable to the promotion.
Example : [ "CustomerSegmentType" ]

CustomerSegmentType > array

DateRange

Name

Description

Schema

DateRange
optional

This encloses one or more date ranges.
Example : [ "DateRangeMandatory" ]

DateRangeMandatory > array

DateRangeMandatory

Name

Description

Schema

@End
required

End datetime.
Example : "1970-01-01"

string (date-time)

@Start
required

Start datetime.
Example : "1970-01-01"

string (date-time)

DateRangeType

Name

Description

Schema

@End
optional

End datetime. If not passed, there will not be an end date.
Example : "1970-01-01"

string (date-time)

@Start
required

Start datetime.
Example : "1970-01-01"

string (date-time)

DayType

Name

Description

Schema

Day
optional

Day of the week
Example : "Monday"

< string > array

Discount

Name

Description

Schema

AmountPerBooking
optional

AmountPerBooking discount type.
Example : AmountPerBooking

AmountPerBooking

AmountPerNight
optional

AmountPerNight discount type.
Example : AmountPerNight

AmountPerNight

ExpressTonight
optional

ExpressTonight discount type.
Example : ExpressTonight

ExpressTonight

FreeNights
optional

FreeNights discount type.
Example : FreeNights

FreeNights

PercentPerNight
optional

PercentPerNight discount type.
Example : PercentPerNight

PercentPerNight

EarlyBird

Name

Description

Schema

@MinAdvPurchase
required

Minimum advance purchase day.
Minimum value : 0
Maximum value : 365
Example : 0

integer (int32)

ErrorCode

Name

Description

Schema

@Code
required

Code of an Agoda error message.
Example : 321

integer (int32)

@Description
required

Description of an Agoda error message.
Example : "Required field missing"

string

ErrorCodes

Name

Description

Schema

ErrorCode
required

List of error codes
Example : [ "ErrorCode" ]

ErrorCode > array

ErrorResponse

Name

Description

Schema

@CorrelationID
required

Allows end-to-end correlation of log messages with the corresponding Web service message throughout the processing of the Web service message.
Example : "8b417d6a-f3df-4d65-870c-240378b8ad3e"

string

@Endpoint
required

Endpoint name
Example : "RoomAmenities"

string

Errors
required

A collection of errors that occurred during the processing of a message.
Example : ErrorsType

ErrorsType

Warnings
required

A collection of warnings that occurred during the processing of a message.
Example : WarningsType

WarningsType

ErrorType

Name

Description

Schema

@Code
required

This refers to a table of coded values exchanged between applications to identify errors or warnings. Refer to OpenTravel Code List Error Codes (ERR).
Example : "321"

string

@ShortText
required

An abbreviated version of the error in textual format.
Example : "Required field missing"

string

@Status
required

Recommended values are those enumerated in the OTA_ErrorRS, (NotProcessed | Incomplete | Complete | Unknown) however, the data type is designated as string data, recognizing that trading partners may identify additional status conditions not included in the enumeration.
Example : "NotProcessed"

string

ErrorsType

Name

Description

Schema

Error
required

An error that occurred during the processing of a message.
Example : [ "ErrorType" ]

ErrorType > array

ExpressTonight

Name

Description

Schema

@ChannelDiscount
optional

ChannelDiscount flag.
Example : true

boolean

@Value
required

Amount of ExpressTonight discount type value. (Between 0.0 - 99999999.0)
Example : 350.0

number (double)

FreeNights

Name

Description

Schema

@IsRecurring
required

IsRecurring flag.
Example : true

boolean

@Value
required

Free nights value.
Example : 1

integer (int32)

HotelPromotion

Name

Description

Schema

@IsActive
required

Active Status of a promotion.
Example : true

boolean

BlackoutDateRange
optional

Blackout date ranges of a promotion.
Example : DateRange

DateRange

BookOn
optional

Book on days of week condition of a promotion. The day will be applicable if included. By default, every day of the week is applicable.
Example : DayType

DayType

BookingTime
optional

Booking time range condition of a promotion.
Example : TimeRangeType

TimeRangeType

CancellationPolicy
required

Cancellation policy of a promotion.
Example : CancellationPolicy

CancellationPolicy

Channels
optional

Channels of a promotion. By default, the promotion will be applied to all channels.
Example : Channels

Channels

CheckinOn
optional

Check-in on days of week condition of a promotion. The day will be applicable if included. By default, every day of the week is applicable.
Example : DayType

DayType

CustomerSegments
optional

CustomerSegments of a promotion. By default, the promotion will be applied to all customer segments.
Example : CustomerSegments

CustomerSegments

Discount
required

Discount detail of a promotion. (required one of discount type as follows: AmountPerBooking, AmountPerNight, PercentPerNight, FreeNights, and ExpressTonight)
Example : Discount

Discount

EarlyBird
optional

For EarlyBird promotion type only.
Example : EarlyBird

EarlyBird

IsStackable
optional

This specifies if this promotion can be combined with other active promotions. (e.g., if you have an existing active promotion of 20% and load this promotion for 10%, the total discount will be 30%). It will also combine with existing active stackable promotions.
Default : false
Example : true

boolean

LastMinute
optional

For LastMinute promotion type only.
Example : LastMinute

LastMinute

LengthOfStay
optional

Length of stay condition of a promotion.
Example : RangeType

RangeType

MinNoOfRooms
optional

Minimum number of rooms condition of a promotion. (between 1 - 5)
Example : 1

integer (int32)

Promotion
required

Promotion of a hotel.
Example : Promotion

Promotion

PromotionPerformance
required

Promotion’s Performance.
Example : PromotionPerformance

PromotionPerformance

RatePlans
optional

RatePlans of a promotion. By default, the promotion will be applied to all rate plans.
Example : RatePlans

RatePlans

RoomIds
optional

Rooms of a promotion. This specifies that the Agoda Rooms are applicable to the promotion. By default, the promotion will be applied to all rooms.
Example : Rooms

Rooms

SaleDateRange
required

Range of promotion’s sale dates.
Example : DateRangeType

DateRangeType

StayDateRange
required

Range of promotion’s stay dates.
Example : DateRangeType

DateRangeType

StayOn
optional

Stay on days of week condition of a promotion. The day will be applicable if included. By default, every day of the week is applicable.
Example : DayType

DayType

HotelPromotionGet_RQ

Name

Description

Schema

@HotelId
required

Hotel ID of Promotions.
Example : 680674

integer (int32)

@IsActive
optional

Active status of a promotion.
Example : true

boolean

@PromotionId
optional

Promotion’s ID.
Example : 750566

integer (int64)

@Timestamp
required

Request unix timestamp
Example : 1605243776

integer (int64)

HotelPromotionGet_RS

Name

Description

Schema

@Tuid
optional

TUID of a promotion.
Example : "string"

string

Errors
optional

A collection of errors that occurred during the processing of a message.
Example : ErrorsType

ErrorsType

HotelPromotion
optional

Promotions of a hotel.
Example : [ "HotelPromotion" ]

HotelPromotion > array

Success
optional

Returning an empty element of this type indicates the successful processing of a message.
Example : SuccessType

SuccessType

HotelPromotionToggle_RQ

Name

Description

Schema

@HotelId
required

Hotel ID of Promotions.
Example : 680674

integer (int32)

@IsActive
required

Active Status of a promotion.
Example : true

boolean

@PromotionId
required

Promotion’s ID.
Example : 750566

integer (int64)

@Timestamp
required

Request unix timestamp
Example : 1605243776

integer (int64)

HotelPromotionToggle_RS

Name

Description

Schema

@PromotionId
optional

ID of toggled promotion.
Example : 2762320

integer (int32)

@Tuid
optional

TUID of toggled promotion.
Example : "string"

string

Errors
optional

A collection of errors that occurred during the processing of a message.
Example : ErrorsType

ErrorsType

Success
optional

Returning an empty element of this type indicates the successful processing of a message.
Example : SuccessType

SuccessType

HotelPromotion_RQ

Name

Description

Schema

@Timestamp
required

Request unix timestamp
Example : 1605243776

integer (int64)

BlackoutDateRange
optional

Blackout date ranges of a promotion.
Example : DateRange

DateRange

BookOn
optional

Book on days of week condition of a promotion. The day will be applicable if included. By default, every day of the week is applicable.
Example : DayType

DayType

BookingTime
optional

Booking time range condition of a promotion.
Example : TimeRangeType

TimeRangeType

CancellationPolicy
required

Cancellation policy of a promotion.
Example : CancellationPolicy

CancellationPolicy

Channels
optional

Channels of a promotion. By default, the promotion will be applied to all channels.
Example : Channels

Channels

CheckinOn
optional

Check-in on days of week condition of a promotion. The day will be applicable if included. By default, every day of the week is applicable.
Example : DayType

DayType

CustomerSegments
optional

CustomerSegments of a promotion. By default, the promotion will be applied to all customer segments.
Example : CustomerSegments

CustomerSegments

Discount
required

Discount detail of a promotion. (required one of discount type as follows: AmountPerBooking, AmountPerNight, PercentPerNight, FreeNights, and ExpressTonight)
Example : Discount

Discount

EarlyBird
optional

Required for EarlyBird promotion type only.
Example : EarlyBird

EarlyBird

IsStackable
optional

This specifies if this promotion can be combined with other active promotions. (e.g., if you have an existing active promotion of 20% and load this promotion for 10%, the total discount will be 30%). It will also combine with existing active stackable promotions. (not applicable for Express Tonight Promotion)
Default : false
Example : true

boolean

LastMinute
optional

Required for LastMinute promotion type only.
Example : LastMinute

LastMinute

LengthOfStay
optional

Length of stay condition of a promotion.
Example : RangeType

RangeType

MinNoOfRooms
optional

Minimum number of rooms condition of a promotion. (between 1 - 5)
Example : 1

integer (int32)

Promotion
required

Promotion of a hotel.
Example : Promotion

Promotion

RatePlans
optional

RatePlans of a promotion. By default, the promotion will be applied to all rate plans.
Example : RatePlans

RatePlans

RoomIds
optional

Rooms of a promotion. This specifies that the Agoda Rooms are applicable to the promotion. By default, the promotion will be applied to all rooms.
Example : Rooms

Rooms

SaleDateRange
required

Range of promotion’s sale dates.
Example : DateRangeType

DateRangeType

StayDateRange
required

Range of promotion’s stay dates.
Example : DateRangeType

DateRangeType

StayOn
optional

Stay on days of week condition of a promotion. The day will be applicable if included. By default, every day of the week is applicable.
Example : DayType

DayType

HotelPromotion_RS

Name

Description

Schema

@PromotionId
optional

ID of created/updated promotion.
Example : 2434021

integer (int32)

@Tuid
optional

TUID of created/updated promotion.
Example : "string"

string

Errors
optional

A collection of errors that occurred during the processing of a message.
Example : ErrorsType

ErrorsType

Success
optional

Returning an empty element of this type indicates the successful processing of a message.
Example : SuccessType

SuccessType

LastMinute

Name

Description

Schema

@MaxAdvPurchase
optional

Maximum advance purchase day.
Minimum value : 0
Maximum value : 365
Example : 180

integer (int32)

PercentPerNight

Name

Description

Schema

@NightType
required

Required one of night types as follows: EveryNight, SpecificNight, SpecificDOW, FirstNight, and LastNight.
Example : "EVERY_NIGHT"

enum (EVERY_NIGHT, SPECIFIC_NIGHT, SPECIFIC_DOW, FIRST_NIGHT, LAST_NIGHT)

Value
required

List of percent per night value. (Between 0.0 - 90.0)
Example : [ 0.0 ]

< number (double) > array

Promotion

Name

Description

Schema

@HotelId
required

Hotel’s ID.
Example : 989173

integer (int32)

@PromotionExternalId
optional

Promotion’s external ID.
Example : "EXTPROMO-001"

string

@PromotionId
optional

Internal Agoda promotion’s ID. (required for update only)
Example : 672301

integer (int32)

@PromotionName
optional

Promotion’s name.
Example : "11.11 mega sale promotion."

string

@PromotionType
required

Promotion’s type. (required one of promotion types as follows: Customized, EarlyBird, LastMinute, SeventyTwoHours, ExpressTonight, LongStay, and SpecialOffer)
Example : "EarlyBird"

enum (CUSTOMIZED, EARLY_BIRD, LAST_MINUTE, SEVENTY_TWO_HOURS, EXPRESS_TONIGHT, LONG_STAY, SPECIAL_OFFER)

PromotionPerformance

Name

Description

Schema

@Bookings
optional

Number of bookings via this promotion.
Example : 999

integer (int32)

@NightsAvgPerBooking
optional

Nights average per booking of this promotion.
Example : 3

integer (int32)

@Revenue
optional

Revenue of this promotion.
Example : 10000.0

number (double)

RangeType

Name

Description

Schema

@Max
optional

Maximum value.
Example : 30

integer (int32)

@Min
optional

Minimum value.
Example : 1

integer (int32)

RatePlanType

Name

Description

Schema

@Id
required

Rate Plan ID

See: Get list of rate plans
Example : 0

integer (int64)

RatePlans

Name

Description

Schema

RatePlan
required

Rate plan of a promotion. This specifies that this rate plan is applicable to the promotion.
Example : [ "RatePlanType" ]

RatePlanType > array

RoomType

Name

Description

Schema

@Id
required

Room ID

See: Get list of rooms
Example : 0

integer (int64)

Rooms

Name

Description

Schema

Room
required

Room of a promotion. This specifies that this room is applicable to the promotion.
Example : [ "RoomType" ]

RoomType > array

SuccessType

Type : object

TimeRangeType

Name

Description

Schema

@From
optional

Time from.
Example : "12:00"

string

@To
optional

Time to.
Example : "22:00"

string

WarningType

Name

Description

Schema

@Code
required

This refers to a table of coded values exchanged between applications to identify errors or warnings. Refer to OpenTravel Code List Error Codes (ERR).
Example : "123"

string

@ShortText
required

An abbreviated version of the warning in textual format.
Example : "Please try again in a few minutes"

string

@Status
required

Recommended values are those enumerated in the OTA_ErrorRS, (NotProcessed | Incomplete | Complete | Unknown) however, the data type is designated as string data, recognizing that trading partners may identify additional status conditions not included in the enumeration.
Example : "Incomplete"

string

WarningsType

Name

Description

Schema

Warning
required

Optionally used to indicate that the recipient of the request message identified one or more business-level warnings.
Example : [ "WarningType" ]

WarningType > array