# Bookings fx rate set

`PUT /lodging/fx-rates` · Rivier · bookings

Enter the rate of a display currency (units of it per unit of the property's currency), the day and the source. Guests are shown an approximate price and are still charged in the property's currency.

- Scope: bookings:admin
- Sdk: bookings.fxRate.set
- Cli: bookings fx rate set

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "propertyId": {
      "type": "string",
      "format": "uuid"
    },
    "currency": {
      "type": "string",
      "pattern": "^[A-Za-z]{3}$"
    },
    "rate": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1000000
    },
    "asOf": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "source": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    }
  },
  "required": [
    "propertyId",
    "currency",
    "rate",
    "asOf",
    "source"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X PUT 'https://api.rivier.ai/lodging/fx-rates' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "propertyId": "string",
  "currency": "string",
  "rate": 0,
  "asOf": "string",
  "source": "string"
}'
```
