---
title: "Set when a call can be booked"
description: "Give a calendar product its weekly hours, the dates that differ, its length, the time kept free around it, how soon and how far ahead people can book, and how late they can change a call."
---

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

# Set when a call can be booked

A calendar product sells a call. Its availability says when one can be booked: weekly hours in the host's time zone, dates whose hours differ (or that are days off), how long a call lasts, the time kept free before and after it, the notice it needs, how far ahead people can book, and how late a customer can move or cancel a call. A product books calls on its availability, one per purchase, and without one it can't be booked or bought: its open slots answer `409` `conflict` on `category`, and freezing a cart holding it `409` `conflict` on `items`, until you set it. [Read and move call bookings](/merchant-api/guides/call-bookings) covers the slots and bookings it makes. This guide uses the `sherpo` helper from [your first call](/merchant-api/first-call) and a token with `product:write`.

## Set it

A calendar product takes `settings.calendar.availability` on <a href="/merchant-api/reference/create-product/">`POST /products`</a> and <a href="/merchant-api/reference/update-product/">`PATCH /products/{product}`</a>. Any other category answers `invalid` at `settings.calendar.availability`:

```bash
curl -X PATCH 'https://api.sherpo.io/merchant/v1/stores/STORE_ID/products/2c7e9a4b-5d1f-4b8a-9e3c-6a0d2f4b8c1e' \
  -H "Authorization: Bearer $SHERPO_TOKEN" \
  -H 'Idempotency-Key: availability-intro-call' \
  -H 'Content-Type: application/json' \
  -d '{
  "settings": {
    "calendar": {
      "availability": {
        "time_zone": "Europe/Rome",
        "weekly": {
          "monday": [
            {
              "start": "09:00",
              "end": "12:00"
            },
            {
              "start": "14:00",
              "end": "18:00"
            }
          ],
          "wednesday": [
            {
              "start": "14:00",
              "end": "18:00"
            }
          ]
        },
        "overrides": [
          {
            "date": "2026-12-24",
            "hours": [
              {
                "start": "09:00",
                "end": "12:00"
              }
            ]
          },
          {
            "date": "2026-12-25",
            "hours": []
          }
        ],
        "duration_minutes": 30,
        "buffer_after_minutes": 10,
        "min_notice_minutes": 1440,
        "max_advance_days": 30
      }
    }
  }
}'
```

```js
const answer = await sherpo('PATCH', '/v1/stores/STORE_ID/products/2c7e9a4b-5d1f-4b8a-9e3c-6a0d2f4b8c1e', {
  body: {
    "settings": {
      "calendar": {
        "availability": {
          "time_zone": "Europe/Rome",
          "weekly": {
            "monday": [
              {
                "start": "09:00",
                "end": "12:00"
              },
              {
                "start": "14:00",
                "end": "18:00"
              }
            ],
            "wednesday": [
              {
                "start": "14:00",
                "end": "18:00"
              }
            ]
          },
          "overrides": [
            {
              "date": "2026-12-24",
              "hours": [
                {
                  "start": "09:00",
                  "end": "12:00"
                }
              ]
            },
            {
              "date": "2026-12-25",
              "hours": []
            }
          ],
          "duration_minutes": 30,
          "buffer_after_minutes": 10,
          "min_notice_minutes": 1440,
          "max_advance_days": 30
        }
      }
    }
  },
  key: 'availability-intro-call',
});
```

Answers `200`, abridged:

```json
{
  "id": "2c7e9a4b-5d1f-4b8a-9e3c-6a0d2f4b8c1e",
  "category": "calendar",
  "settings": {
    "calendar": {
      "availability": {
        "time_zone": "Europe/Rome",
        "weekly": {
          "monday": [
            {
              "start": "09:00",
              "end": "12:00"
            },
            {
              "start": "14:00",
              "end": "18:00"
            }
          ],
          "wednesday": [
            {
              "start": "14:00",
              "end": "18:00"
            }
          ]
        },
        "overrides": [
          {
            "date": "2026-12-24",
            "hours": [
              {
                "start": "09:00",
                "end": "12:00"
              }
            ]
          },
          {
            "date": "2026-12-25",
            "hours": []
          }
        ],
        "duration_minutes": 30,
        "buffer_after_minutes": 10,
        "min_notice_minutes": 1440,
        "max_advance_days": 30
      }
    }
  }
}
```

- **`time_zone`** is the IANA time zone the hours are in, such as `Europe/Rome`, stored in its canonical spelling. It's required while the product has an availability: a numeric offset such as `+01:00` answers `invalid`.
- **`weekly`** holds each weekday's windows, `monday` to `sunday`, as `HH:MM` wall clock times. A window starts before it ends, never crosses midnight (`24:00` ends one at midnight, and starts none), and touches but never overlaps another. A day holds up to 6 windows, stored in order; a day missing or empty is closed.
- **`overrides`** are dates, `YYYY-MM-DD` in the same time zone and within the years the reference gives, whose `hours` replace their weekday's: an empty `hours` is a day off. Each date is listed once, up to 200 dates, stored in date order. A date that has passed still counts toward the limit, so drop it when you next write the list.
- **`duration_minutes`** is how long a call lasts, **`buffer_before_minutes`** and **`buffer_after_minutes`** the time kept free around it, **`min_notice_minutes`** how long before its start a call can still be booked, and **`max_advance_days`** how many whole days ahead, in its time zone, it can be booked. The [reference](/merchant-api/reference/update-product) lists each one's bounds and the value it reads as when unset. A notice longer than how far ahead people can book could never book, so it answers `invalid` at `min_notice_minutes`, or at `max_advance_days` when a write changes it but not `min_notice_minutes`.
- **`change_notice_minutes`** is how long before its start a customer can still reschedule or cancel a call they booked, and **`reschedules_max`** how many times they may move one, `0` for never. Neither binds you when you move a call.

Hours are wall clock times in the time zone, so they stay put when the clocks change. A window's calls run back to back in real time from its opening and end by its close: on the night the clocks go forward it holds less by the time skipped, and a window opening or closing in that time opens or closes when the clock reads again; on the night they go back, a window opening or closing in the time repeated does so at its first reading, and one that spans it holds the repeated time too, so it offers one more call where it has room.

## Change it

A patch merges onto what's stored, like the rest of the settings: it changes only the keys it names, and `null` removes a rule, back to its default. The `time_zone` can be replaced but not removed on its own. A weekday you name is replaced whole, so send all of its windows; `overrides` is replaced whole too. `"availability": null` removes the availability, so the call takes no new bookings until it has one again.

Each window that can't be stored answers `invalid` at its own path, such as `settings.calendar.availability.weekly.monday.1.start` for one that overlaps another, or `settings.calendar.availability.overrides.0.date` for a date that isn't one.

Customers never read a product's availability itself: they read the open slots it gives, and changing it never moves a call already booked.

Source: https://docs.sherpo.io/merchant-api/guides/call-availability/index.mdx
