> For the complete Lynkow documentation index in agent-friendly format, see [llms.txt](/llms.txt).

# Book a product reservation slot

**Published**: 2026-11-30
**Category**: Commerce

## `POST /products/:idOrSlug/bookings`

**Book a product reservation slot**

Creates a booking for a published bookable product.

Send `startsAt`, `partySize`, the guest contact and `acceptsTerms: true`, plus
`offeringId` when the product lists offerings.
The server computes the end time and the price. A signed-in customer books with their
account details.

With a deposit paid online, the booking is `pending` and `deposit` carries the checkout
URL. Otherwise it is `confirmed`. Fires the `reservation.booked` webhook and sends the
booking emails the site has enabled.

Errors (422): `TERMS_PAGE_NOT_CONFIGURED`, `TERMS_NOT_ACCEPTED`, `OFFERING_NOT_FOUND`,
`OFFERING_REQUIRED`, `PARTY_SIZE_OUT_OF_RANGE`, `RESOURCE_NOT_IN_POOL`,
`SLOT_UNAVAILABLE`, `CAPACITY_EXCEEDED`, `BOOKING_TAX_DISABLED`, `TAX_RATE_UNAVAILABLE`.
403 `ACCOUNT_REQUIRED` for a guest when accounts are required. 404 for an unknown product.

> **Note:** Available only on sites with e-commerce enabled.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `idOrSlug` | path | string | Yes | Product identifier (prod_ prefixed id) or product slug. Only a product published on the site resolves |
| `locale` | query | string | No | Buyer language, as the body `locale`. When both are sent, this one wins. |


### Request Body

Content-Type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `startsAt` | string | Yes | Required. Start datetime (ISO 8601) |
| `partySize` | integer (1 to 50) | Yes | Required. Number of guests included in the reservation |
| `guestName` | string | Yes | Required. Guest name captured for the reservation. 1-200 characters |
| `guestEmail` | string | Yes | Required. Guest email captured for the reservation. Valid email address. Max 320 characters |
| `guestPhone` | string | No | Optional guest phone captured for the reservation. 3-40 characters |
| `resourceId` | string | No | Reservation calendar identifier (bres_ prefixed id); omit it to let the server assign a free calendar. 1-200 characters |
| `offeringId` | string | No | Reservation offering identifier (roff_ prefixed id). 1-200 characters |
| `acceptsTerms` | boolean | No | Must be `true`, else 422 `TERMS_NOT_ACCEPTED`. A site without a terms page refuses every request with 422 `TERMS_PAGE_NOT_CONFIGURED` |
| `locale` | any | No | Buyer language, never rejected, for the booking emails, terms and deposit payment page. Default: the site's default locale. Unsupported email languages fall back to the base language (`pt-BR` to `pt`), then English. |
| `recaptchaToken` | string | No | Verification token, required when the site uses CAPTCHA. A v3 token needs this operation's action. |
| `_hp` | string | No | Spam-trap field that must remain empty when the site uses honeypot protection. |
| `_ts` | integer | No | Form-load Unix timestamp in milliseconds when the site uses honeypot protection. |


### Responses

| Status | Description |
| --- | --- |
| `201` | Successful response |
| `400` | Spam protection failed: the `_ts` timestamp is too old, or the verification token is missing or invalid. |
| `401` | Missing or invalid storefront publishable key |
| `402` | The site subscription does not currently permit this operation |
| `403` | The storefront key origin is not allowed |
| `404` | Not found |
| `422` | Validation error |
| `429` | Rate limit exceeded, or the `_ts` timestamp is missing, malformed or too recent. |


> **Notes:** In honeypot mode, send an empty `_hp` and `_ts` (form display time, Unix
> milliseconds). reCAPTCHA v3 needs action `booking_create`. Limit: 10 per
> 15 minutes per site and client.

### SDK

```typescript
import { createClient } from 'lynkow'

const lynkow = createClient({
  siteId: process.env.LYNKOW_SITE_ID!,
  publishableKey: process.env.LYNKOW_PK,
})

const result = await lynkow.reservations.book('chef-table', {
  startsAt: '2026-07-10T18:00:00.000Z',
  partySize: 2,
  guestName: 'Alice Martin',
  guestEmail: 'alice@example.com',
  acceptsTerms: true, // ticked on this page, by this buyer
})

if (result.deposit) {
  window.location.assign(result.deposit.checkoutUrl)
}
```

```typescript
import { createClient } from 'lynkow'

const lynkow = createClient({
  siteId: process.env.LYNKOW_SITE_ID!,
  publishableKey: process.env.LYNKOW_PK,
})

const booking = await lynkow.reservations.bookings.create('haircut', {
  startsAt: '2026-07-10T09:00:00.000Z',
  partySize: 1,
  guestName: 'Alice Martin',
  guestEmail: 'alice@example.com',
  acceptsTerms: true,
})
// booking.status === 'confirmed'
```

---