---
search:
  tags:
    - Currency
    - POST
seo:
  description: >-
    Any signed in user. Guards an offline sale that arrives with a locally…
    Reference for the POST /api/v1/currency/rates/check endpoint in the
    PharmaFlow API.
sidebar:
  label: Check a sale rate against tolerance
  badge: POST
title: Check a sale rate against tolerance
type: openapi-operation
---
Any signed in user. Guards an offline sale that arrives with a locally cached rate. A deviation beyond tolerance_percent is refused with 409, so the till flags the sale for review.

`POST /api/v1/currency/rates/check`

**Request body** (`application/json`, required)

- `sale_rate` (number, required)
- `server_rate` (number, required)
- `tolerance_percent` (number)

Request body example:

```json
{
  "sale_rate": 0,
  "server_rate": 0,
  "tolerance_percent": 0
}
```

**Responses**

- `200` — The rate is within tolerance
- `400` — The sale rate is not a positive number
- `401` — Not authenticated
- `409` — The rate moved beyond tolerance, so the sale has to be marked for review

Response example, 200:

```json
{
  "ok": true
}
```
