---
title: "Set or Update LOS Pricing"
method: POST
path: "/api/rate/fplos"
---

# Set or Update LOS Pricing

`POST /api/rate/fplos`

## Request body

- PostRateLosRequest — The setup/update price offer 's request
  - `propertyId` integer, required — Valid Agoda Property ID that partner has access to
  - `currency` string, required — Rate plan's rate currency (must be the same currency as set up in property level)
  - `offers` Offer[], required
    - `roomId` integer, required — Agoda Room ID related to the property inventory element. <br/> <i>Agoda active Room IDs can be returned with Getproduct request.</i>
    - `ratePlanId` integer, required — Agoda Rateplan ID related to a particular offer active on a room. <br/> Agoda active Rate Type IDs can be returned with Getproduct request.
    - `rates` OfferRate[], required
      - `checkIn` CheckInDateRange, required — Date range of interested check-in date
        - `start` string, YYYY-MM-DD, required — Start of check-in date range to get rate in the format YYYY-MM-DD
        - `end` string, YYYY-MM-DD, required — End of check-in date range to get rate in the format YYYY-MM-DD
      - `occupancyPrices` OccupancyPrice[], required
        - `occupancy` Occupancy, required
          - `min` integer, required — minimum occupancy
          - `max` integer, required — maximum occupancy
        - `prices` LOSPrice[], required
          - `los` integer, required — Length of Stay
          - `value` number, required — Price Value (with the currrency described in property level)
    - `restrictions` SetRateRestriction[]
      - `startDate` string, YYYY-MM-DD, required — Start date when this restrcition will be applied
      - `endDate` string, YYYY-MM-DD, required — End date when this restrcition will be applied
      - `closed` boolean — Controls if rate type is open for sale or closed to sale. Close will stop room type regular inventory being sold even if inventory is available.
      - `cta` boolean — Close to arrival: Make a room unavailable to book if the guest check-in on a certain date. <br/> Set to make rate type open or closed for arrival on this date. Customer can still stay through this date if they arrive on past date.
      - `ctd` boolean — Close to departure: Make a room unavailable to book if the guest check-out on a certain date. Set to make rate type open or closed for departure on this date. Customer can still stay through this date if they depart on future date.
      - `minStay` integer — Minimum length of stay that is required to search and book this room type. minStay cannot be greater than maxStay.
      - `maxStay` integer — Maximum length of stay that is required to search and book this room type. maxStay cannot be less than minStay.<br> -1 stands for infinity, or no maxStay defined
      - `minStayThrough` integer — Minimum stay through - Minimum length of stay that is required to search and book this room type for stay through.
      - `minAdvPurchase` integer — Minimum Days in advance that rate must be booked to be eligible for a specific rateplan.
      - `maxAdvPurchase` integer — Maximum Days in advance that rate must be booked to be eligible for a specific rateplan.
      - `losRestriction` string — Restriction per los, only valid if closed flag is false. Length of this field is equal to max LOS sent in the request. Example, date: 2021-12-01 and losRestriction: 1110111101, this means user won't see the allotment for 4 and 9 los, if he wants to checkin on this date.

## Response `200`

Price Rule already setted up

- PostRateLosResponse
  - `status` string — Response status
  - `tuid` string — A Track Unique Identifier (TUID) is an identifier which is guaranteed to be unique and it has a specific tracking purpose.

## Other responses

- `403` — Failing request

## Changes

> 33 revisions in range; 1 could not be searched.

- **2022-07-24** `211ffd6822eb` — 1 warning, 1 info
  - removed the request property `offers/items/restrictinos`
  - added the new optional request property `offers/items/restrictions`
- **2022-07-20** `b3641ed634c7` — 1 warning, 2 info
  - removed the optional property `error` from the response with the `200` status
  - removed the `ERROR` enum value from the `status` response property for the response status `200`
  - removed the `SUCCESS` enum value from the `status` response property for the response status `200`
- **2022-07-19** `5221e83c79ff` — 2 info
  - added the new optional request property `currency`
  - added the new optional request property `propertyId`
- **2022-07-19** `ee0e87c99fb6` — 1 breaking
  - the `offers/items/restrictinos/items/losRestriction` request property type/format changed from `integer`/`int32` to `string`/``
- **2022-07-19** `481356f576e5` — 1 warning, 1 info
  - removed the request property `restricion`
  - added the new optional request property `offers/items/restrictinos`

[Full history](https://skmtc.dev/agoda-com/apis/los-pricing-api/changes/api/rate/fplos/post.md)

---

[API](https://skmtc.dev/agoda-com/apis/los-pricing-api.md) · [All operations](https://skmtc.dev/agoda-com/apis/los-pricing-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agoda-com/los-pricing-api/revisions/29dd979133e4/schema)
