---
title: "Connects one of the caller's iCalendar feeds, read at once and then every 15 minutes; a call names it in `settings.calendar.sync.busy` to be blocked by its events."
---

> 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.

Path: Sherpo merchant API › product

`POST /v1/stores/{store}/calendar_connections/feeds`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `product:write`

## Path parameters

- `store` (`addCalendarFeed.path.store`; string, required) — The store's id.

## Header parameters

- `Idempotency-Key` (`addCalendarFeed.header.Idempotency-Key`; string, optional) — Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.
  - minLength 1; maxLength 255; pattern `^[\x21-\x7E]+$`

## Request body

_Required._

- `url` (`addCalendarFeed.url`; string, required) — An iCalendar feed's https or webcal URL, its events blocking the calls that name it; never answered back.
  - minLength 1; maxLength 2048

## Example request

```json
{
  "url": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/calendar_connections/feeds' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/calendar_connections/feeds';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({url: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/merchant/v1/stores/<store>/calendar_connections/feeds"

payload = { "url": "string" }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Connects one of the caller's iCalendar feeds, read at once and then every 15 minutes; a call names it in `settings.calendar.sync.busy` to be blocked by its events.

#### Example

```json
{
  "id": "string",
  "kind": "string",
  "user_id": "string",
  "account": "string",
  "feed_host": "string",
  "can_write": true,
  "status": "string",
  "error": "string",
  "synced_at": "string",
  "created_at": "string"
}
```

- `id` (`addCalendarFeed.response.200.id`; string, required)
- `kind` (`addCalendarFeed.response.200.kind`; string, required) — `google` (busy times, and bookings when `can_write`) or `ics` (a feed's busy times).
- `user_id` (`addCalendarFeed.response.200.user_id`; string, required) — The member who connected it; it reads only while they sit on the business.
- `account` (`addCalendarFeed.response.200.account`; any of, required) — The Google account's address.
  - any of: `string`, `null`
- `feed_host` (`addCalendarFeed.response.200.feed_host`; any of, required) — The feed's host.
  - any of: `string`, `null`
- `can_write` (`addCalendarFeed.response.200.can_write`; boolean, required) — Whether bookings can be written into it.
- `status` (`addCalendarFeed.response.200.status`; string, required) — `syncing` until the first read, `ok`, `failing` or `revoked` by Google (its last busy times still block either way), or `unseated` once its member left.
- `error` (`addCalendarFeed.response.200.error`; any of, required) — Why the last read failed.
  - any of: `string`, `null`
- `synced_at` (`addCalendarFeed.response.200.synced_at`; any of, required)
  - any of: `string`, `null`
- `created_at` (`addCalendarFeed.response.200.created_at`; string, required)

### default

A problem; see https://api.sherpo.io/merchant/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`addCalendarFeed.response.default.type`; string, required)
  - format `uri`
- `title` (`addCalendarFeed.response.default.title`; string, required)
- `status` (`addCalendarFeed.response.default.status`; integer, required)
- `detail` (`addCalendarFeed.response.default.detail`; string, required)
- `code` (`addCalendarFeed.response.default.code`; string, optional)
- `context` (`addCalendarFeed.response.default.context`; object, optional)
- `reached_core` (`addCalendarFeed.response.default.reached_core`; boolean, optional)
- `core_answer` (`addCalendarFeed.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/add-calendar-feed/index.md
