FPLOS Pricing API Reference
Authentication
For every request, send Authorization: Bearer <access-token>. See OAuth Authorization.
Set LOS pricing
Each value is the total price for the complete stay represented by los, not a nightly price. For example, a value of 230.00 for los: 2 is the total price for the two-night stay for the specified occupancy range.
LOS must be between 1 and 90, inclusive. A supplier or rate plan can configure a lower maximum. A value above 90 returns HTTP 400 with request-model validation error code 3000.
Price value accepts a JSON number represented as a double-precision floating-point value. Use no more than two decimal places. CMAPI does not validate the number of decimal places or define an automatic rounding rule.
One request can contain multiple offers, check-in date ranges, occupancy ranges, and LOS values. Check-in date ranges are inclusive.
Example request:
{
"propertyId": 123,
"currency": "USD",
"offers": [
{
"roomId": 12301,
"ratePlanId": 12303,
"rates": [
{
"checkIn": {
"start": "2027-01-15",
"end": "2027-01-16"
},
"occupancyPrices": [
{
"occupancy": {
"min": 1,
"max": 2
},
"prices": [
{
"los": 1,
"value": 120.0
},
{
"los": 2,
"value": 230.0
}
]
}
]
}
],
"restrictions": [
{
"startDate": "2027-01-15",
"endDate": "2027-01-16",
"closed": false,
"cta": false,
"ctd": false,
"minStay": 1,
"maxStay": 2,
"minStayThrough": 1,
"minAdvPurchase": 0,
"maxAdvPurchase": 30,
"losRestriction": "11"
}
]
}
]
}Save the JSON as set-los-pricing.json, then send it with OAuth:
curl --request POST "${CMAPI_BASE_URL}/api/rate/fplos" \
--header "Authorization: Bearer ${CMAPI_ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--data-binary @set-los-pricing.jsonSuccessful acceptance:
{
"status": "SUCCESS",
"tuid": "49ecd740-34c9-11e9-bef4-137e7754803f"
}Duplicate and overlapping prices
CMAPI does not reject duplicate or overlapping room, rate plan, check-in date, LOS, and occupancy combinations. Current processing uses overwrite semantics:
- Within one rate block, occupancy ranges are expanded in request order. If ranges overlap for the same LOS, the later price for the duplicated occupancy is returned by Search.
- When multiple rate blocks produce the same room, rate plan, check-in date, and LOS, the later rate block replaces the earlier LOS rate entry, including its occupancy-price set.
Submit each property, room, rate plan, check-in date, LOS, and occupancy combination only once to avoid order-dependent results.
Restrictions
| Field | Meaning |
|---|---|
closed | Closes the rate plan for sale on the applicable check-in date. |
cta | Closes the rate plan to arrival on the applicable date. |
ctd | Closes the rate plan to departure on the applicable date. |
minStay | Minimum LOS allowed for check-in on the applicable date. |
maxStay | Maximum LOS allowed for check-in on the applicable date. |
minStayThrough | Minimum stay-through requirement. |
minAdvPurchase | Minimum number of days before check-in when the rate can be booked. |
maxAdvPurchase | Maximum number of days before check-in when the rate can be booked. |
losRestriction | Binary LOS availability string, starting at LOS 1. 1 allows and 0 closes the LOS. |
Omit restrictions when you want to submit rates without changing rate-plan booking conditions. If you include a restriction, its startDate and endDate are required. In losRestriction, each character represents one LOS starting at LOS 1: 1 allows that LOS and 0 closes it. Its length must equal the maximum LOS used to validate the associated rate block.
Search LOS pricing
Search by one property, room, rate plan, and inclusive check-in date range. The optional los range filters returned prices. When los is omitted, the response contains all available LOS values.
A successful Search response contains the rate data directly. Unlike a Set or error response, it does not contain top-level status or tuid fields.
Example request:
{
"propertyId": 123,
"roomId": 12301,
"ratePlanId": 12303,
"checkInDateRange": {
"start": "2027-01-15",
"end": "2027-01-16"
},
"los": {
"start": 1,
"end": 2
}
}Save the JSON as search-los-pricing.json, then send it with OAuth:
curl --request POST "${CMAPI_BASE_URL}/api/rate/fplos/search" \
--header "Authorization: Bearer ${CMAPI_ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--data-binary @search-los-pricing.jsonExample response:
{
"propertyId": 123,
"roomId": 12301,
"ratePlanId": 12303,
"rates": [
{
"checkInDate": "2027-01-15",
"rate": {
"currency": "USD",
"prices": [
{
"los": 1,
"value": 120.0,
"occupancy": {
"min": 1,
"max": 2
}
},
{
"los": 2,
"value": 230.0,
"occupancy": {
"min": 1,
"max": 2
}
}
]
},
"restriction": {
"closed": false,
"cta": false,
"ctd": false,
"minStay": 1,
"maxStay": 2,
"minStayThrough": 1,
"minAdvPurchase": 0,
"maxAdvPurchase": 30,
"losRestriction": "11"
}
}
]
}No matching rates is a successful result and returns HTTP 200 with an empty
rates array:
{
"propertyId": 123,
"roomId": 12301,
"ratePlanId": 12303,
"rates": []
}Set allotment
The LOS Pricing payload contains no inventory field. Use SetARI V2 to set allotment independently:
Example request:
<?xml version="1.0" encoding="UTF-8"?>
<request type="10">
<criteria property_id="123">
<inventory>
<update room_id="12301">
<date_range from="2027-01-15" to="2027-01-16"/>
<allotment>9</allotment>
</update>
</inventory>
</criteria>
</request>Save the XML as set-allotment.xml, then send it with OAuth:
export CMAPI_BASE_URL="https://sandbox-supply.agoda.com"
export CMAPI_ACCESS_TOKEN="<access-token>"
curl --request POST "${CMAPI_BASE_URL}/api/v2/ari" \
--header "Authorization: Bearer ${CMAPI_ACCESS_TOKEN}" \
--header "Content-Type: application/xml" \
--data-binary @set-allotment.xmlSet enough allotment for every stay date required by the LOS rates.
Updated 12 days ago

