---
title: "The nightly rate the pricing rules produce, night by night"
method: GET
path: "/api/v1/short-stay/rates"
tags: ["Short stay"]
---

# The nightly rate the pricing rules produce, night by night

`GET /api/v1/short-stay/rates`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/short-stay/rates`
- Auth: API key in cookie `better-auth.session_token`

Runs the pricing stack over every short-stay unit and every night in the window. Each night carries the rules that moved it and by how much, so a rate can be argued with rather than only read. A night a booking already holds is quoted too, because a re-let has to be priced. Nothing is pushed anywhere.

## Query parameters

- `from` string
- `to` string
- `unitId` string

## Response `200`

Every unit, every night, and what decided the price.

- object
  - `ok` unknown, required
  - `data` object, required
    - `range` object, required
      - `from` string, required: A calendar date, `YYYY-MM-DD`.
      - `to` string, required: A calendar date, `YYYY-MM-DD`.
    - `units` object[], required
      - `unitId` string, required: Stable record id, e.g. `lse_012`.
      - `base` object, required
        - `cents` integer, required: Money, always in integer cents. €1,250.00 is 125000.
        - `source` string, required: Where the base rate came from. There is never a figure here without one.
      - `pace` number, required: On-the-books occupancy over the next 30 nights, which is what an occupancy_pace rule reads.
      - `nights` object[], required
        - `date` string, required: A calendar date, `YYYY-MM-DD`.
        - `price` integer, required: Money, always in integer cents. €1,250.00 is 125000.
        - `appliedRules` object[], required: In the order they applied. An empty list means the base rate stood.
          - `ruleId` string, required: Stable record id, e.g. `lse_012`.
          - `label` string, required
          - `effect` integer, required: Signed: what this rule moved the night by, so "Weekend +€15" can be read straight off it.
        - `minStay` number, nullable, required: The longest minimum stay any matching rule demands, collapsed to the gap length where the night sits in an orphan gap.
        - `available` boolean, required: False when a booking already holds the night. It is still quoted, so a re-let can be priced.
        - `gapNights` number: Set where the night sits inside an orphan gap between two stays.
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

## Other responses

- `400`: `to` is not after `from`, the window is longer than a year, or a date is not a real calendar day.

---

[API](https://skmtc.dev/dardaris/apis/dardaris-api.md) · [All operations](https://skmtc.dev/dardaris/apis/dardaris-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dardaris/apis/dardaris-api/revisions/4aff33835c73?raw)
