---
title: "Adopt Entry Rate"
method: POST
path: "/api/v1/rates/adopt"
tags: ["rates", "rates"]
---

# Adopt Entry Rate

`POST /api/v1/rates/adopt`

## Request

- Base URL: `https://api.peil.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.peil.app/api/v1/rates/adopt`
- Auth: OAuth 2 (password, token URL `/api/v1/auth/jwt/login`)

The timesheet's inline rate edit: make it the client's rate from that
entry's date on (or report why not). See RateService.adopt_entry_rate.

## Request body

- RateAdoptRequest: A rate typed into the timesheet, to become the client's rate from the entry's date onwards (RateService.adopt_entry_rate).
  - `client_id` integer, required
  - `rate_per_hour` union, required
    - number
    - string
  - `from_date` string, date, required

## Response `200`

Successful Response

- RateAdoptResult: What adopting did, and what an undo has to put back. action: "created" (a new history row from from_date), "updated" (a row already started that day; its rate changed), "unchanged" (that rate was already in force), or "past" (the entry predates the client's latest rate change: a correction to that entry, history untouched).
  - `action` string, required
  - `rate_id` integer, nullable
  - `previous_rate` string, nullable
  - `restore` RateRestore[]
    - `id` integer, required
    - `valid_until` string, date, nullable

## Other responses

- `422`: Validation Error

---

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