FPLOS Pricing Error Codes

Most LOS Pricing decoding, validation, authentication, and handled processing errors use a common JSON envelope:

{
  "status": "ERROR",
  "tuid": "49ecd740-34c9-11e9-bef4-137e7754803f",
  "errors": [
    {
      "code": 4012,
      "description": "LOS Pricing is not supported for property id 123 because its pricing model is set to 1"
    }
  ]
}

Retain the tuid when contacting Agoda support. It identifies the request in Agoda's systems.

Message templates below contain %s where CMAPI inserts request or property data. The returned response contains the resolved value, not %s.

HTTP statuses

HTTP statusMeaning
200 OKThe Set request was accepted, or the Search request completed. Search can return an empty rates array.
400 Bad RequestJSON decoding, request validation, business validation, or handled downstream processing failed. A handled downstream failure can use code 3001.
401 UnauthorizedAuthentication credentials are missing, invalid, or inactive.
403 ForbiddenThe request is not allowed, for example because the source IP is not authorized.
413 Payload Too LargeThe Set request exceeds the 1 MB payload limit.
429 Too Many RequestsA partner or global request limit was exceeded.
500 Internal Server ErrorCMAPI encountered an unexpected error. Route errors can use JSON code 3001; uncaught actor failures can return XML code 99101.
504 Gateway TimeoutCMAPI did not receive an actor response before the request timeout and returns XML code 99101.

Request, authentication, and system errors

CodeRuntime message templateDescription
1201API key is not authorised for Property id: %sThe authenticated integration is not authorized for the requested property.
1301Invalid Property id: %sThe property does not exist or cannot be loaded for validation.
1503Authentication failed: %sCredentials are missing, invalid, expired, or inactive.
1504Rate limit has been exceeed: %sThe applicable request limit was exceeded. Retry with backoff after the limiting window allows requests again.
1508The request payload is too large: %sThe Set request exceeds the configured 1 MB payload limit. Split the update into smaller requests.
1509The request is invalid, Invalid IP address. %sThe source IP is not authorized for the integration.
1601The requested property (%s) has incorrect rate modelThe property's rate model is not valid for this operation.
3000%sRequest-model validation failed. The message identifies the invalid field and constraint. LOS must be from 1 through 90, inclusive.
3001There was an internal server error: %sCMAPI or a downstream dependency failed while processing the request. A handled actor/downstream failure can return this code with HTTP 400; a route exception can return it with HTTP 500.
3002Bad Request: %sThe request could not be handled as valid JSON input.
3002Decoding Failures: %sJSON decoding failed because a field is missing, has the wrong type, or has an unsupported shape.
6101Property id: %s has failed migrationThe property's required rate-model migration failed.
6102Property id: %s has not been migrated yetThe property has not completed the required rate-model migration.
99101There was an internal server error: %sAn uncaught per-request actor failure or actor timeout occurred. This compatibility response is XML rather than the JSON envelope.

LOS above the API maximum

Set and Search accept LOS values from 1 through 90, inclusive. A supplier or rate plan can impose a lower maximum. For example, Set returns HTTP 400 when los is 91:

{
  "status": "ERROR",
  "tuid": "49ecd740-34c9-11e9-bef4-137e7754803f",
  "errors": [
    {
      "code": 3000,
      "description": "los with value \"91\" got 91, expected between 1 and 90"
    }
  ]
}

Set LOS Pricing validation errors

The following business errors apply to POST /api/rate/fplos.

CodeRuntime message templateDescription
4001Invalid input for currency: %sThe currency is not a supported ISO currency.
4002Requested currency: %s does not match with Property currency: %sThe request currency differs from the property's configured currency.
4003Room: %s does not exist for Property id: %sThe room does not belong to the property or is unavailable to the integration.
4004Cannot set %s because max occupancy is %sThe submitted occupancy exceeds the applicable room or rate-plan occupancy.
4005Rate plan: %s does not exist for Property id: %sThe rate plan does not belong to the property or is unavailable to the integration.
4006Max los %s in request must not exceeds max los %s of rateplan for Property id: %sThe largest submitted LOS exceeds the rate plan's maximum LOS.
4007Invalid checkIn date %s corresponding to rateplan stay range between %s and %s of property id %sA submitted check-in date falls outside the rate plan's stay period.
4008Invalid checkIn date %s with max-los %s corresponding to rateplan stay range between %s and %s of property id %sThe stay implied by the check-in date and maximum LOS extends beyond the rate plan's stay period.
4009Min los %s in request must be greater than or equal to min los %s of rateplan for Property id: %sThe smallest submitted LOS is below the rate plan's minimum LOS.
4010Min Rates %s of room id %s are not valid for Property id: %s. Expected min rate should be greater or equal to %s * losA submitted whole-stay price is below the room's minimum rate multiplied by LOS.
4011Max Rates %s of room id %s are not valid for Property id: %s. Expected max rate should be less than or equal to %s * losA submitted whole-stay price is above the room's maximum rate multiplied by LOS.
4012LOS Pricing is not supported for property id %s because its pricing model is set to %sThe property is not configured for the FPLOS occupancy/pricing model.
4013Value of losRestriction %s should have same length as max los %s in request for property id %sThe binary LOS restriction length differs from the maximum LOS submitted for the offer.
4014Value of minStayThrough %s should greater or equal to min los %s in rateplan for property id %sminStayThrough is below the rate plan's minimum LOS.
4015Value of minStayThrough %s should less or equal to max los %s in rateplan for property id %sminStayThrough exceeds the rate plan's maximum LOS.
4016CheckInDate %s plus minStay %s should be between stay range %s and %s for property id %sThe stay implied by minStay falls outside the rate plan's stay period.
4017CheckInDate %s plus maxStay %s should be between stay range %s and %s for property id %sThe stay implied by maxStay falls outside the rate plan's stay period.
4018Value of minStay %s should greater or equal to min los %s in rateplan for property id %sminStay is below the rate plan's minimum LOS.
4019Value of minStay %s should less or equal to max los %s in rateplan for property id %sminStay exceeds the rate plan's maximum LOS.
4020Value of maxStay %s should greater or equal to min los %s in rateplan for property id %smaxStay is below the rate plan's minimum LOS.
4021Value of maxStay %s should less or equal to max los %s in rateplan for property id %smaxStay exceeds the rate plan's maximum LOS.
4022CheckInDate %s minus minAdvPurchase %s should be between sell-date range %s and %s for property id %sThe minimum advance-purchase date falls outside the rate plan's sell period.
4023CheckInDate %s minus maxAdvPurchase %s should be between sell-date range %s and %s for property id %sThe maximum advance-purchase date falls outside the rate plan's sell period.
4024minStay %s must be less than or equal to maxStay %s in restriction of the request for Property id: %sminStay is greater than maxStay.
4025minAdvPurchase %s must be less than or equal to maxAdvPurchase %s in restriction of the request for Property id: %sminAdvPurchase is greater than maxAdvPurchase.
4026checkInDateRange start/end %s must be in date-range between %s and %s for Property id: %s room id: %s rate plan id: %sA Set check-in date is earlier than today or is not before the date 730 days from today.
4027start %s must be before or same day as end %s in checkInDateRange for Property id: %s room id: %s rate plan id: %sA rate check-in range starts after it ends.
4028Max los %s in request must not exceeds max los %s configured for Property id: %sThe largest submitted LOS exceeds the maximum configured for the authenticated integration or property.

Search LOS Pricing errors

POST /api/rate/fplos/search validates the JSON field constraints and property authorization. It can return the generic errors above, including 1201, 1503, 1504, 1509, 3000, 3001, and 3002.

No matching rates is not an error. Search returns HTTP 200 with the requested identifiers and an empty rates array.


Did this page help you?