> ## Documentation Index
> Fetch the complete documentation index at: https://docs.elivaas.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Rate Plans - List

## Overview

Retrieves all rate plans accessible to your distribution channel. Rate plans define the pricing structure for a property — including the base rate, extra guest surcharges, and optional date-specific rate restrictions.

***

## Request

```
GET /v1/ratePlans
```

### Headers

| Header       | Type   | Required | Description                           |
| ------------ | ------ | -------- | ------------------------------------- |
| `Api-Key`    | string | Yes      | Your API key for authentication.      |
| `Channel-Id` | string | Yes      | Your distribution channel identifier. |

### Query Parameters

| Parameter    | Type          | Required | Description                                                                                                            |
| ------------ | ------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- |
| `propertyId` | string        | No       | Filter rate plans to a specific property.                                                                              |
| `fromDate`   | string (date) | No       | Start date in `YYYY-MM-DD` format. When provided with `toDate`, the response includes date-specific rate restrictions. |
| `toDate`     | string (date) | No       | End date in `YYYY-MM-DD` format. Must be provided together with `fromDate`.                                            |

### Example Request

```bash theme={null}
curl -X GET "https://sandbox.elivaas.com/v1/ratePlans?propertyId=prop_456&fromDate=2025-08-01&toDate=2025-08-07" \
  -H "Api-Key: YOUR_API_KEY" \
  -H "Channel-Id: YOUR_CHANNEL_ID"
```

***

## Response — `200 OK`

Returns an array of [RatePlan](#rate-plan-object) objects.

### Rate Plan Object

| Field             | Type                                                 | Description                                                                                                                                  |
| ----------------- | ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`              | string                                               | Unique identifier of the rate plan.                                                                                                          |
| `propertyId`      | string                                               | Identifier of the property this rate plan belongs to.                                                                                        |
| `name`            | string                                               | Display name of the rate plan (e.g., "Standard Room Rate").                                                                                  |
| `code`            | string                                               | Code identifier used in API calls (e.g., `european-plan`, `all-inclusive`). This is the value passed as `ratePlanCode` in the Discovery API. |
| `description`     | string                                               | Description of what the rate plan includes (e.g., "Room only - no meals included").                                                          |
| `rate`            | integer                                              | Base rate per night in the property's currency.                                                                                              |
| `minimumRate`     | integer                                              | Minimum rate that can be applied to this rate plan (floor price).                                                                            |
| `extraAdultRate`  | integer                                              | Additional charge per night for each adult beyond `applicableAdult`.                                                                         |
| `extraChildRate`  | integer                                              | Additional charge per night for each child beyond `applicableChild`.                                                                         |
| `applicableGuest` | integer                                              | Total number of guests included in the base rate.                                                                                            |
| `applicableAdult` | integer                                              | Number of adults included in the base rate. Guests beyond this count incur `extraAdultRate`.                                                 |
| `applicableChild` | integer                                              | Number of children included in the base rate. Children beyond this count incur `extraChildRate`.                                             |
| `restrictions`    | array of [DateRestriction](#date-restriction-object) | Date-specific rate overrides and availability flags. Only populated when `fromDate` and `toDate` are provided.                               |

### Date Restriction Object

| Field      | Type          | Description                                                             |
| ---------- | ------------- | ----------------------------------------------------------------------- |
| `date`     | string (date) | The date this restriction applies to.                                   |
| `rate`     | number        | The rate for this specific date. Overrides the rate plan's base `rate`. |
| `stopSell` | boolean       | `true` if the rate plan is unavailable on this date.                    |

### Example Response

```json theme={null}
[
  {
    "id": "rp_123",
    "propertyId": "prop_456",
    "name": "Standard Room Rate",
    "code": "european-plan",
    "description": "Room only - no meals included",
    "rate": 1500,
    "minimumRate": 1200,
    "extraAdultRate": 300,
    "extraChildRate": 150,
    "applicableGuest": 2,
    "applicableAdult": 2,
    "applicableChild": 1,
    "restrictions": [
      {
        "date": "2025-08-01",
        "rate": 1500,
        "stopSell": false
      },
      {
        "date": "2025-08-02",
        "rate": 1800,
        "stopSell": false
      },
      {
        "date": "2025-08-03",
        "rate": 1800,
        "stopSell": false
      }
    ]
  },
  {
    "id": "rp_124",
    "propertyId": "prop_456",
    "name": "All-Inclusive",
    "code": "all-inclusive",
    "description": "All meals and activities included",
    "rate": 3000,
    "minimumRate": 2500,
    "extraAdultRate": 500,
    "extraChildRate": 250,
    "applicableGuest": 2,
    "applicableAdult": 2,
    "applicableChild": 1,
    "restrictions": []
  }
]
```

### Pricing Calculation

When the number of guests exceeds the included count:

```
Total per night = base rate
  + (extra adults x extraAdultRate)
  + (extra children x extraChildRate)
```

For example, with `applicableAdult = 2`, `extraAdultRate = 300`, and 3 adults:

```
1500 + (1 x 300) = 1800 per night
```

***

## Error Handling

| Status | Meaning               | Description                                   |
| ------ | --------------------- | --------------------------------------------- |
| `200`  | Success               | Rate plans returned.                          |
| `401`  | Unauthorized          | Missing or invalid `Api-Key` or `Channel-Id`. |
| `500`  | Internal Server Error | Unexpected error.                             |
