> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chataigne.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Location settings

> Read and update a location's order, opening hours, delivery, acceptance, and AI settings via the Chataigne API.

Each location exposes five independent **settings sub-resources** that control how it
takes orders. They live under a location and are read and updated individually:

| Sub-resource        | `object`              | Path                      | Update verb |
| ------------------- | --------------------- | ------------------------- | ----------- |
| Order settings      | `order_settings`      | `.../order_settings`      | `PATCH`     |
| Opening hours       | `opening_hours`       | `.../opening_hours`       | `PUT`       |
| Delivery settings   | `delivery_settings`   | `.../delivery_settings`   | `PATCH`     |
| Acceptance settings | `acceptance_settings` | `.../acceptance_settings` | `PATCH`     |
| AI instructions     | `ai_instructions`     | `.../ai_instructions`     | `PATCH`     |

All paths are relative to `https://server.chataigne.ai/v1/locations/{location_id}`.

<Note>
  These routes are part of the public **Chataigne API** (`/v1`). Authenticate with an
  organization/location API key (prefix `ch_org_`) sent in the `x-api-key` header. Admin
  keys are rejected with `403`; see [Authentication](/concepts/authentication).
</Note>

<Warning>
  **`PATCH` is a partial update — `PUT` is a full replace.** With `PATCH`, any field you
  omit keeps its current value. With `PUT` (opening hours only), the entire object is
  replaced; omitted days are reset to an empty schedule. There is no `DELETE` for
  settings sub-resources.
</Warning>

## Order settings

Controls auto-acceptance, prep time, and whether a customer may hold multiple concurrent orders.

<ResponseField name="object" type="string">
  Always `order_settings`.
</ResponseField>

<ResponseField name="auto_accept_orders" type="boolean">
  When `true`, incoming orders are accepted automatically without manual confirmation.
</ResponseField>

<ResponseField name="average_preparation_time" type="string">
  Estimated preparation time in `HH:MM` format (e.g. `"00:25"`).
</ResponseField>

<ResponseField name="enable_multiple_order_per_customer" type="boolean">
  When `true`, a single customer can have more than one open order at a time.
</ResponseField>

### Get order settings

<CodeGroup>
  ```bash curl theme={null}
  curl https://server.chataigne.ai/v1/locations/loc_8f2k3j/order_settings \
    -H "x-api-key: ch_org_live_9aQ2..."
  ```

  ```js Node theme={null}
  const res = await fetch(
    "https://server.chataigne.ai/v1/locations/loc_8f2k3j/order_settings",
    { headers: { "x-api-key": process.env.CHATAIGNE_API_KEY } },
  );
  const orderSettings = await res.json();
  ```
</CodeGroup>

```json Response theme={null}
{
  "id": "loc_8f2k3j",
  "object": "order_settings",
  "auto_accept_orders": false,
  "average_preparation_time": "00:25",
  "enable_multiple_order_per_customer": true,
  "created_at": "2025-01-12T09:30:00Z",
  "updated_at": "2025-03-04T14:22:10Z"
}
```

### Update order settings

`PATCH` only the fields you want to change. Here we enable auto-accept and bump prep
time; `enable_multiple_order_per_customer` is omitted and therefore preserved.

<CodeGroup>
  ```bash curl theme={null}
  curl -X PATCH https://server.chataigne.ai/v1/locations/loc_8f2k3j/order_settings \
    -H "x-api-key: ch_org_live_9aQ2..." \
    -H "Content-Type: application/json" \
    -d '{
      "auto_accept_orders": true,
      "average_preparation_time": "00:30"
    }'
  ```

  ```js Node theme={null}
  const res = await fetch(
    "https://server.chataigne.ai/v1/locations/loc_8f2k3j/order_settings",
    {
      method: "PATCH",
      headers: {
        "x-api-key": process.env.CHATAIGNE_API_KEY,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        auto_accept_orders: true,
        average_preparation_time: "00:30",
      }),
    },
  );
  const orderSettings = await res.json();
  ```
</CodeGroup>

```json Response theme={null}
{
  "id": "loc_8f2k3j",
  "object": "order_settings",
  "auto_accept_orders": true,
  "average_preparation_time": "00:30",
  "enable_multiple_order_per_customer": true,
  "created_at": "2025-01-12T09:30:00Z",
  "updated_at": "2025-05-29T11:04:55Z"
}
```

## Opening hours

The weekly schedule, split into independent **`delivery`** and **`pickup`** calendars.
Each calendar has one key per weekday (`monday` … `sunday`); each day holds an array of
time slots with `from` and `to` in `HH:MM`. An empty array means closed that day.

<ResponseField name="object" type="string">
  Always `opening_hours`.
</ResponseField>

<ResponseField name="delivery" type="object">
  Weekly delivery schedule. Keys `monday`–`sunday`, each an array of `{ from, to }` slots.
</ResponseField>

<ResponseField name="pickup" type="object">
  Weekly pickup schedule, same shape as `delivery`.
</ResponseField>

<Warning>
  Opening hours use **`PUT` (full replace)**, not `PATCH`. The body you send becomes the
  complete schedule. Any weekday you omit is treated as **closed** (empty slot array), so
  always send the full week for each calendar you want to keep.
</Warning>

### Get opening hours

<CodeGroup>
  ```bash curl theme={null}
  curl https://server.chataigne.ai/v1/locations/loc_8f2k3j/opening_hours \
    -H "x-api-key: ch_org_live_9aQ2..."
  ```

  ```js Node theme={null}
  const res = await fetch(
    "https://server.chataigne.ai/v1/locations/loc_8f2k3j/opening_hours",
    { headers: { "x-api-key": process.env.CHATAIGNE_API_KEY } },
  );
  const openingHours = await res.json();
  ```
</CodeGroup>

```json Response theme={null}
{
  "id": "loc_8f2k3j",
  "object": "opening_hours",
  "delivery": {
    "monday": [{ "from": "11:30", "to": "14:00" }, { "from": "18:00", "to": "22:30" }],
    "tuesday": [{ "from": "11:30", "to": "14:00" }, { "from": "18:00", "to": "22:30" }],
    "wednesday": [{ "from": "11:30", "to": "14:00" }, { "from": "18:00", "to": "22:30" }],
    "thursday": [{ "from": "11:30", "to": "14:00" }, { "from": "18:00", "to": "22:30" }],
    "friday": [{ "from": "11:30", "to": "14:00" }, { "from": "18:00", "to": "23:00" }],
    "saturday": [{ "from": "18:00", "to": "23:00" }],
    "sunday": []
  },
  "pickup": {
    "monday": [{ "from": "11:00", "to": "22:30" }],
    "tuesday": [{ "from": "11:00", "to": "22:30" }],
    "wednesday": [{ "from": "11:00", "to": "22:30" }],
    "thursday": [{ "from": "11:00", "to": "22:30" }],
    "friday": [{ "from": "11:00", "to": "23:00" }],
    "saturday": [{ "from": "11:00", "to": "23:00" }],
    "sunday": []
  },
  "created_at": "2025-01-12T09:30:00Z",
  "updated_at": "2025-04-18T08:10:00Z"
}
```

### Replace opening hours

Send the complete `delivery` and `pickup` calendars. Below, Sunday is left closed by
sending an empty array.

<CodeGroup>
  ```bash curl theme={null}
  curl -X PUT https://server.chataigne.ai/v1/locations/loc_8f2k3j/opening_hours \
    -H "x-api-key: ch_org_live_9aQ2..." \
    -H "Content-Type: application/json" \
    -d '{
      "delivery": {
        "monday": [{ "from": "11:30", "to": "14:00" }, { "from": "18:00", "to": "22:30" }],
        "tuesday": [{ "from": "11:30", "to": "14:00" }, { "from": "18:00", "to": "22:30" }],
        "wednesday": [{ "from": "11:30", "to": "14:00" }, { "from": "18:00", "to": "22:30" }],
        "thursday": [{ "from": "11:30", "to": "14:00" }, { "from": "18:00", "to": "22:30" }],
        "friday": [{ "from": "11:30", "to": "14:00" }, { "from": "18:00", "to": "23:00" }],
        "saturday": [{ "from": "18:00", "to": "23:00" }],
        "sunday": []
      },
      "pickup": {
        "monday": [{ "from": "11:00", "to": "22:30" }],
        "tuesday": [{ "from": "11:00", "to": "22:30" }],
        "wednesday": [{ "from": "11:00", "to": "22:30" }],
        "thursday": [{ "from": "11:00", "to": "22:30" }],
        "friday": [{ "from": "11:00", "to": "23:00" }],
        "saturday": [{ "from": "11:00", "to": "23:00" }],
        "sunday": []
      }
    }'
  ```

  ```js Node theme={null}
  const week = (slots) => ({
    monday: slots,
    tuesday: slots,
    wednesday: slots,
    thursday: slots,
    friday: slots,
    saturday: slots,
    sunday: [],
  });

  const res = await fetch(
    "https://server.chataigne.ai/v1/locations/loc_8f2k3j/opening_hours",
    {
      method: "PUT",
      headers: {
        "x-api-key": process.env.CHATAIGNE_API_KEY,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        delivery: week([
          { from: "11:30", to: "14:00" },
          { from: "18:00", to: "22:30" },
        ]),
        pickup: week([{ from: "11:00", to: "22:30" }]),
      }),
    },
  );
  const openingHours = await res.json();
  ```
</CodeGroup>

<Note>
  Opening hours are interpreted in the location's `timezone`. For one-off date overrides
  (holidays, private events), use [Special closings](/location-organization-management/special-closings)
  instead of editing the weekly schedule.
</Note>

## Delivery settings

Controls pickup/delivery availability, fulfillment provider selection, delivery fee strategy, and the provider-specific options used by runtime delivery checks and order confirmation.

The same resource is available on both API surfaces:

| Surface      | Route                                                               | Key type                                      |
| ------------ | ------------------------------------------------------------------- | --------------------------------------------- |
| Location API | `GET` / `PATCH /v1/locations/{location_id}/delivery_settings`       | `ch_org_…` with `deliverySettings` permission |
| Admin API    | `GET` / `PATCH /admin/v1/locations/{location_id}/delivery_settings` | `ch_admin_…`                                  |

### Delivery provider values

| Value            | Meaning                                    | Provider-specific fields                                                                                              |
| ---------------- | ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |
| `handledByStore` | The restaurant handles fulfillment itself. | Standard availability, fee, radius, postal-code, zone, or distance-range fields.                                      |
| `uberDirect`     | Chataigne requests Uber Direct delivery.   | `delivery_verification_mode`, `uber_direct_pickup_notes_enabled`, `uber_direct_pickup_notes`, `uber_direct_auto_dmc`. |
| `chaskis`        | Chaskis handles delivery.                  | `chaskis_flat_fee`, `chaskis_per_km_fee`.                                                                             |
| `dood`           | Dood handles delivery/pricing validation.  | Standard fee/radius caps.                                                                                             |

### Fee strategy values

| Value               | Required/associated fields           |
| ------------------- | ------------------------------------ |
| `postalCode`        | `postal_codes`                       |
| `deliveryZone`      | `delivery_zones`                     |
| `percentage`        | `fee_percentage` between `0` and `1` |
| `customerPaysAll`   | No extra strategy fields             |
| `restaurantPaysAll` | No extra strategy fields             |
| `smart`             | `smart_parameters`                   |
| `distanceRange`     | `distance_ranges`                    |

<ResponseField name="object" type="string">
  Always `delivery_settings`.
</ResponseField>

<ResponseField name="location_id" type="string">
  The location this settings object belongs to.
</ResponseField>

<ResponseField name="delivery_enabled" type="boolean">
  Whether delivery orders are accepted.
</ResponseField>

<ResponseField name="pickup_enabled" type="boolean">
  Whether pickup orders are accepted.
</ResponseField>

<ResponseField name="provider" type="string">
  One of `handledByStore`, `uberDirect`, `chaskis`, or `dood`.
</ResponseField>

<ResponseField name="fee_strategy" type="string">
  One of `postalCode`, `deliveryZone`, `percentage`, `customerPaysAll`, `restaurantPaysAll`, `smart`, or `distanceRange`.
</ResponseField>

<ResponseField name="postal_codes" type="array">
  Postal-code pricing rules: `postal_code`, `minimum_order_amount`, and `delivery_fee`.
</ResponseField>

<ResponseField name="delivery_zones" type="array">
  Polygon delivery zones with `id`, `name`, `polygon`, `minimum_order_amount`, and `delivery_fee`.
</ResponseField>

<ResponseField name="fee_percentage" type="number | null">
  Percentage applied when `fee_strategy` is `percentage`, expressed as a decimal (`0.7` = 70%).
</ResponseField>

<ResponseField name="smart_parameters" type="object | null">
  Smart-pricing inputs: `menu_uplift`, `uber_commission`, `target_lift`, and `coverage_fraction`.
</ResponseField>

<ResponseField name="distance_ranges" type="array">
  Distance brackets with `up_to_km`, `displayed_fee`, and optional `minimum_order_amount`.
</ResponseField>

<ResponseField name="chaskis_flat_fee" type="object">
  Chaskis base fee as `{ amount, currency }`.
</ResponseField>

<ResponseField name="chaskis_per_km_fee" type="object">
  Chaskis per-kilometre fee as `{ amount, currency }`.
</ResponseField>

<ResponseField name="max_delivery_radius_in_km" type="number | null">
  Maximum delivery distance from the location, in kilometres.
</ResponseField>

<ResponseField name="max_delivery_fee" type="object | null">
  Cap on the delivery fee as `{ amount, currency }`, or `null` for no cap.
</ResponseField>

<ResponseField name="min_order_amount" type="number | null">
  Minimum order subtotal required to place a delivery order.
</ResponseField>

<ResponseField name="max_order_amount" type="number | null">
  Maximum order subtotal permitted.
</ResponseField>

<ResponseField name="max_items_number" type="number | null">
  Maximum number of items allowed per order.
</ResponseField>

<ResponseField name="delivery_verification_mode" type="string | null">
  Uber Direct proof-of-delivery mode: `picture` or `pincode`.
</ResponseField>

<ResponseField name="uber_direct_pickup_notes_enabled" type="boolean">
  Whether custom Uber Direct pickup notes are sent to the courier.
</ResponseField>

<ResponseField name="uber_direct_pickup_notes" type="string | null">
  Custom pickup notes for the Uber Direct courier. Maximum 280 characters.
</ResponseField>

<ResponseField name="uber_direct_ums_enabled" type="boolean">
  Whether Uber Managed Support is enabled for this Uber Direct location. Defaults to `false`.
</ResponseField>

<ResponseField name="uber_direct_auto_dmc" type="object | null">
  Uber Direct AutoDMC configuration: `enabled`, `split_mode`, `price_tiers`, and `volume_multipliers`.
</ResponseField>

### Get delivery settings

<CodeGroup>
  ```bash curl theme={null}
  curl https://server.chataigne.ai/v1/locations/loc_8f2k3j/delivery_settings \
    -H "x-api-key: ch_org_live_9aQ2..."
  ```

  ```bash Admin curl theme={null}
  curl https://server.chataigne.ai/admin/v1/locations/loc_8f2k3j/delivery_settings \
    -H "x-api-key: ch_admin_live_9aQ2..."
  ```

  ```js Node theme={null}
  const res = await fetch(
    "https://server.chataigne.ai/v1/locations/loc_8f2k3j/delivery_settings",
    { headers: { "x-api-key": process.env.CHATAIGNE_API_KEY } },
  );
  const deliverySettings = await res.json();
  ```
</CodeGroup>

```json Response theme={null}
{
  "object": "delivery_settings",
  "location_id": "loc_8f2k3j",
  "delivery_enabled": true,
  "pickup_enabled": true,
  "provider": "uberDirect",
  "fee_strategy": "smart",
  "postal_codes": [],
  "delivery_zones": [],
  "fee_percentage": null,
  "smart_parameters": {
    "menu_uplift": 0.15,
    "uber_commission": 0.3,
    "target_lift": 0.03,
    "coverage_fraction": 0.8
  },
  "distance_ranges": [],
  "chaskis_flat_fee": { "amount": 8, "currency": "CHF" },
  "chaskis_per_km_fee": { "amount": 4, "currency": "CHF" },
  "max_delivery_radius_in_km": 8,
  "max_delivery_fee": { "amount": 12, "currency": "CHF" },
  "min_order_amount": 25,
  "max_order_amount": 150,
  "max_items_number": 30,
  "delivery_verification_mode": "picture",
  "uber_direct_pickup_notes_enabled": true,
  "uber_direct_pickup_notes": "Ask for the order at the main counter.",
  "uber_direct_ums_enabled": false,
  "uber_direct_auto_dmc": {
    "enabled": true,
    "split_mode": "price",
    "price_tiers": [
      { "up_to_order_amount": 80, "courier_count": 1, "delivery_fee_multiplier": 1 },
      { "up_to_order_amount": null, "courier_count": 2, "delivery_fee_multiplier": 1.5 }
    ],
    "volume_multipliers": [
      { "courier_count": 1, "delivery_fee_multiplier": 1 },
      { "courier_count": 2, "delivery_fee_multiplier": 1.5 }
    ]
  }
}
```

### Update delivery settings

`PATCH` only the fields you want to change. Omitted fields are preserved. Send `null` for nullable fields and collections when you want to clear/reset them (`max_delivery_fee`, `delivery_zones`, `distance_ranges`, `smart_parameters`, `uber_direct_pickup_notes`, and `uber_direct_auto_dmc`).

<CodeGroup>
  ```bash curl theme={null}
  curl -X PATCH https://server.chataigne.ai/v1/locations/loc_8f2k3j/delivery_settings \
    -H "x-api-key: ch_org_live_9aQ2..." \
    -H "Content-Type: application/json" \
    -d '{
      "delivery_enabled": true,
      "provider": "uberDirect",
      "fee_strategy": "smart",
      "smart_parameters": {
        "menu_uplift": 0.15,
        "uber_commission": 0.3,
        "target_lift": 0.03,
        "coverage_fraction": 0.8
      },
      "max_delivery_fee": { "amount": 12, "currency": "CHF" },
      "delivery_verification_mode": "picture",
      "uber_direct_pickup_notes_enabled": true,
      "uber_direct_pickup_notes": "Ask for the order at the main counter.",
      "uber_direct_ums_enabled": false
    }'
  ```

  ```bash Admin curl theme={null}
  curl -X PATCH https://server.chataigne.ai/admin/v1/locations/loc_8f2k3j/delivery_settings \
    -H "x-api-key: ch_admin_live_9aQ2..." \
    -H "Content-Type: application/json" \
    -d '{
      "provider": "chaskis",
      "chaskis_flat_fee": { "amount": 8, "currency": "CHF" },
      "chaskis_per_km_fee": { "amount": 4, "currency": "CHF" }
    }'
  ```

  ```js Node theme={null}
  const res = await fetch(
    "https://server.chataigne.ai/v1/locations/loc_8f2k3j/delivery_settings",
    {
      method: "PATCH",
      headers: {
        "x-api-key": process.env.CHATAIGNE_API_KEY,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        provider: "uberDirect",
        fee_strategy: "distanceRange",
        distance_ranges: [
          { up_to_km: 2, displayed_fee: 3.5, minimum_order_amount: 20 },
          { up_to_km: 5, displayed_fee: 6 }
        ],
        max_delivery_radius_in_km: 5
      }),
    },
  );
  const deliverySettings = await res.json();
  ```
</CodeGroup>

<Note>
  Money fields use `{ amount, currency }`. The `currency` should match the location's `currency`; `amount` uses the same decimal convention as the dashboard delivery settings.
</Note>

## Acceptance settings

The location's live order-acceptance state — used to pause incoming orders or signal a
temporary rush.

<ResponseField name="object" type="string">
  Always `acceptance_settings`.
</ResponseField>

<ResponseField name="mode" type="string">
  One of `online`, `busy`, or `paused`.
</ResponseField>

<ResponseField name="extra_preparation_time" type="string">
  Additional preparation time applied while in `busy` mode (e.g. `"00:15"`).
</ResponseField>

<ResponseField name="reason" type="string">
  Human-readable reason for the current state.
</ResponseField>

### Get acceptance settings

<CodeGroup>
  ```bash curl theme={null}
  curl https://server.chataigne.ai/v1/locations/loc_8f2k3j/acceptance_settings \
    -H "x-api-key: ch_org_live_9aQ2..."
  ```

  ```js Node theme={null}
  const res = await fetch(
    "https://server.chataigne.ai/v1/locations/loc_8f2k3j/acceptance_settings",
    { headers: { "x-api-key": process.env.CHATAIGNE_API_KEY } },
  );
  const acceptanceSettings = await res.json();
  ```
</CodeGroup>

```json Response theme={null}
{
  "id": "loc_8f2k3j",
  "object": "acceptance_settings",
  "mode": "online",
  "extra_preparation_time": "00:00",
  "reason": null,
  "created_at": "2025-01-12T09:30:00Z",
  "updated_at": "2025-05-29T10:00:00Z"
}
```

### Update acceptance settings

Pause incoming orders with a reason. Omitted fields keep their current value.

<CodeGroup>
  ```bash curl theme={null}
  curl -X PATCH https://server.chataigne.ai/v1/locations/loc_8f2k3j/acceptance_settings \
    -H "x-api-key: ch_org_live_9aQ2..." \
    -H "Content-Type: application/json" \
    -d '{
      "mode": "busy",
      "extra_preparation_time": "00:20",
      "reason": "High volume during lunch rush"
    }'
  ```

  ```js Node theme={null}
  const res = await fetch(
    "https://server.chataigne.ai/v1/locations/loc_8f2k3j/acceptance_settings",
    {
      method: "PATCH",
      headers: {
        "x-api-key": process.env.CHATAIGNE_API_KEY,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        mode: "busy",
        extra_preparation_time: "00:20",
        reason: "High volume during lunch rush",
      }),
    },
  );
  const acceptanceSettings = await res.json();
  ```
</CodeGroup>

```json Response theme={null}
{
  "id": "loc_8f2k3j",
  "object": "acceptance_settings",
  "mode": "busy",
  "extra_preparation_time": "00:20",
  "reason": "High volume during lunch rush",
  "created_at": "2025-01-12T09:30:00Z",
  "updated_at": "2025-05-29T12:31:07Z"
}
```

<Note>
  Set `mode` to `paused` to stop accepting new orders entirely, or back to `online` to
  resume. `extra_preparation_time` is most relevant in `busy` mode.
</Note>

## AI instructions

Free-form guidance for the AI clerk that handles conversations for this location.

<ResponseField name="object" type="string">
  Always `ai_instructions`.
</ResponseField>

<ResponseField name="chatbot_instructions" type="string">
  Natural-language instructions appended to the AI clerk's behaviour for this location.
</ResponseField>

### Get AI instructions

<CodeGroup>
  ```bash curl theme={null}
  curl https://server.chataigne.ai/v1/locations/loc_8f2k3j/ai_instructions \
    -H "x-api-key: ch_org_live_9aQ2..."
  ```

  ```js Node theme={null}
  const res = await fetch(
    "https://server.chataigne.ai/v1/locations/loc_8f2k3j/ai_instructions",
    { headers: { "x-api-key": process.env.CHATAIGNE_API_KEY } },
  );
  const aiInstructions = await res.json();
  ```
</CodeGroup>

```json Response theme={null}
{
  "id": "loc_8f2k3j",
  "object": "ai_instructions",
  "chatbot_instructions": "Always suggest the daily special. Confirm allergies before finalizing any order.",
  "created_at": "2025-01-12T09:30:00Z",
  "updated_at": "2025-05-20T09:00:00Z"
}
```

### Update AI instructions

<CodeGroup>
  ```bash curl theme={null}
  curl -X PATCH https://server.chataigne.ai/v1/locations/loc_8f2k3j/ai_instructions \
    -H "x-api-key: ch_org_live_9aQ2..." \
    -H "Content-Type: application/json" \
    -d '{
      "chatbot_instructions": "Greet customers in French by default. Upsell desserts on orders over 40 CHF."
    }'
  ```

  ```js Node theme={null}
  const res = await fetch(
    "https://server.chataigne.ai/v1/locations/loc_8f2k3j/ai_instructions",
    {
      method: "PATCH",
      headers: {
        "x-api-key": process.env.CHATAIGNE_API_KEY,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        chatbot_instructions:
          "Greet customers in French by default. Upsell desserts on orders over 40 CHF.",
      }),
    },
  );
  const aiInstructions = await res.json();
  ```
</CodeGroup>

```json Response theme={null}
{
  "id": "loc_8f2k3j",
  "object": "ai_instructions",
  "chatbot_instructions": "Greet customers in French by default. Upsell desserts on orders over 40 CHF.",
  "created_at": "2025-01-12T09:30:00Z",
  "updated_at": "2025-05-29T13:02:44Z"
}
```

## Errors

Settings requests use the standard error envelope. Common cases:

| Status | `error.type`            | When                                                                                                    |
| ------ | ----------------------- | ------------------------------------------------------------------------------------------------------- |
| `401`  | `authentication_error`  | Missing `x-api-key`.                                                                                    |
| `403`  | `authorization_error`   | An admin key (`ch_admin_`) was used on `/v1`, or a dashboard session was used.                          |
| `404`  | `not_found_error`       | The `location_id` does not exist or is not accessible by your key.                                      |
| `400`  | `invalid_request_error` | Malformed body — e.g. an invalid `mode`, a bad `HH:MM` value, or a `from`/`to` slot that doesn't parse. |

Every response includes an `X-Request-Id`; error bodies mirror it as `error.request_id`.
See [Errors](/concepts/errors) for the full envelope and [Request IDs](/concepts/request-ids).

## Related

<Card title="Locations" icon="store" href="/location-organization-management/locations">
  Read and manage the parent location, including `currency`, `country`, and `timezone`.
</Card>

<Card title="Special closings" icon="calendar-xmark" href="/location-organization-management/special-closings">
  Schedule one-off date-range closures on top of the weekly opening hours.
</Card>
