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

# Push Updates to Seyaha

> Call Seyaha's inbound webhooks to push real-time sync and availability changes.

Rather than waiting for the next scheduled nightly sync, your platform can push updates
to Seyaha the moment your catalog or availability changes. Seyaha exposes two inbound
webhook endpoints for this purpose.

Both endpoints authenticate via the `x-webhook-secret` header — the secret is generated
when you register your integration.

## Trigger a catalog sync

Call this when products are added, removed, or have pricing/metadata changes:

```http theme={null}
POST https://api.seyaha.net/api/v1/partner-integrations/{integrationId}/sync/trigger
x-webhook-secret: <your-webhook-secret>
```

Seyaha will call your `GET /products` endpoint immediately and process any changes.

**Response:**

```json theme={null}
{ "success": 1, "data": { "synced": 12, "skipped": false } }
```

`skipped: true` means the response hash matched the previous sync — no changes written.

***

## Push an availability change

Call this when a single slot's status, capacity, or vacancies change. This is faster
than a full sync and avoids re-fetching the entire catalog.

```http theme={null}
POST https://api.seyaha.net/api/v1/partner-integrations/{integrationId}/availability/notify
x-webhook-secret: <your-webhook-secret>
Content-Type: application/json

{
  "productId": "product_abc",
  "optionId": "option_xyz",
  "availabilityId": "avail_001",
  "localDateTimeStart": "2026-07-15T10:00:00+03:00",
  "status": "LIMITED",
  "vacancies": 3,
  "capacity": 20
}
```

**Response:**

```json theme={null}
{ "success": 1, "data": { "updated": true } }
```

If `updated` is `false`, Seyaha could not match the `productId`/`optionId` to an existing
activity in its database and will trigger a full background sync automatically.

***

## Choosing sync vs. notify

| Change type                         | Use                   |
| ----------------------------------- | --------------------- |
| Product added or removed            | `sync/trigger`        |
| Pricing or option metadata changed  | `sync/trigger`        |
| Single slot capacity/status changed | `availability/notify` |
| Many slots changed at once          | `sync/trigger`        |

<Note>
  Your `webhook_secret` is shown once at registration. Store it in a secrets manager.
  If lost, you need to delete and recreate the integration to get a new secret.
</Note>
