# Bookings policy update

`PATCH /bookings/policies/{id}` · Rivier · bookings

Change a cancellation policy (bookings already made keep the terms they were made under).

- Scope: bookings:admin
- Sdk: bookings.policy.update
- Cli: bookings policy update

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "kind": {
      "type": "string",
      "enum": [
        "standard",
        "dated_leisure"
      ],
      "default": "standard"
    },
    "tiers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "hoursBefore": {
            "type": "number",
            "minimum": 0,
            "maximum": 8760
          },
          "refundPercent": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "feeMinor": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "default": 0
          }
        },
        "required": [
          "hoursBefore",
          "refundPercent"
        ],
        "additionalProperties": false
      },
      "maxItems": 10,
      "default": []
    },
    "noShow": {
      "type": "object",
      "properties": {
        "feePercent": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "default": 0
        },
        "feeMinor": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991,
          "default": 0
        }
      },
      "additionalProperties": false,
      "default": {}
    },
    "text": {
      "type": "string",
      "maxLength": 4000,
      "default": ""
    }
  },
  "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 PATCH 'https://api.rivier.ai/bookings/policies/{id}' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "kind": "standard",
  "tiers": [],
  "noShow": {},
  "text": ""
}'
```
