API docs

zpe booking API

mount /booking · base https://zpe.vc/booking · v1.0.0 · 7 operations · 2 write · 0 need no account · beta

the document this app serves now. Contract: https://zpe.vc/booking/_/api/v1/openapi.json · sha256 9d5931e8be43

GET /_/api/v1/bookings List the account's bookings listBookings

List the account's bookings

Parameters

nameinrequiredtypenotes
cursorquerynostringThe `x-next-cursor` value from the previous page. The walk is a keyset, so a row written mid-walk cannot make it repeat or skip a row.
limitquerynointegerRows to return, 1–100. Defaults to 25.
statusqueryno"confirmed" | "cancelled"Narrow the walk to one status. Page on the same key either way.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200One page, soonest first. The next cursor is in `x-next-cursor`.array of object
400The cursor is not one this listing issued, or `status` is not a known status.object
401No credential, or one the door will not honour: no session cookie and no key, or a key that is malformed, unknown, revoked or expired.object
403The credential verified and may not do this: a read-scoped key on a write, or a key not granted this app.object
429This key has spent its window's ceiling. `Retry-After` says when the next call may be made.object
503The door did not answer, so no account could be named. Nothing was read and nothing was written.object

Example

List the account's bookings, with a token from the door.

GET /_/api/v1/bookings
curl -X GET 'https://zpe.vc/booking/_/api/v1/bookings?cursor=string&limit=25&status=confirmed' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
[
  {
    "id": "string",
    "eventTypeId": "string",
    "guestName": "string",
    "guestEmail": "string",
    "guestTimezone": "string",
    "startUtc": 0,
    "endUtc": 0,
    "localDate": "string",
    "status": "confirmed",
    "answers": {},
    "cancelledAt": null,
    "createdAt": 0
  }
]

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

GET /_/api/v1/bookings/{id} Read one booking getBooking

Read one booking

Parameters

nameinrequiredtypenotes
idpathyesstringThe row's id.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200The booking.object
401No credential, or one the door will not honour: no session cookie and no key, or a key that is malformed, unknown, revoked or expired.object
403The credential verified and may not do this: a read-scoped key on a write, or a key not granted this app.object
404This account has no booking with that id.object
429This key has spent its window's ceiling. `Retry-After` says when the next call may be made.object
503The door did not answer, so no account could be named. Nothing was read and nothing was written.object

Example

Read one booking, with a token from the door.

GET /_/api/v1/bookings/{id}
curl -X GET 'https://zpe.vc/booking/_/api/v1/bookings/string' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{
  "id": "string",
  "eventTypeId": "string",
  "guestName": "string",
  "guestEmail": "string",
  "guestTimezone": "string",
  "startUtc": 0,
  "endUtc": 0,
  "localDate": "string",
  "status": "confirmed",
  "answers": {},
  "cancelledAt": null,
  "createdAt": 0
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

POST /_/api/v1/bookings/{id}/cancel Cancel a booking cancelBooking

Cancel a booking

Parameters

nameinrequiredtypenotes
idpathyesstringThe row's id.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200Cancelled. The row's status moved and its slot locks are gone.object
401No credential, or one the door will not honour: no session cookie and no key, or a key that is malformed, unknown, revoked or expired.object
403The credential verified and may not do this: a read-scoped key on a write, or a key not granted this app.object
404This account has no booking with that id.object
409That booking is already cancelled.object
429This key has spent its window's ceiling. `Retry-After` says when the next call may be made.object
503The door did not answer, so no account could be named. Nothing was read and nothing was written.object

Example

Cancel a booking, with a token from the door.

POST /_/api/v1/bookings/{id}/cancel
curl -X POST 'https://zpe.vc/booking/_/api/v1/bookings/string/cancel' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{
  "id": "string",
  "eventTypeId": "string",
  "guestName": "string",
  "guestEmail": "string",
  "guestTimezone": "string",
  "startUtc": 0,
  "endUtc": 0,
  "localDate": "string",
  "status": "confirmed",
  "answers": {},
  "cancelledAt": null,
  "createdAt": 0
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

GET /_/api/v1/event-types List the account's meeting types listEventTypes

List the account's meeting types

Parameters

nameinrequiredtypenotes
cursorquerynostringThe `x-next-cursor` value from the previous page. The walk is a keyset, so a row written mid-walk cannot make it repeat or skip a row.
limitquerynointegerRows to return, 1–100. Defaults to 25.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200One page, newest first. The next cursor is in `x-next-cursor`.array of object
400The cursor is not one this listing issued.object
401No credential, or one the door will not honour: no session cookie and no key, or a key that is malformed, unknown, revoked or expired.object
403The credential verified and may not do this: a read-scoped key on a write, or a key not granted this app.object
429This key has spent its window's ceiling. `Retry-After` says when the next call may be made.object
503The door did not answer, so no account could be named. Nothing was read and nothing was written.object

Example

List the account's meeting types, with a token from the door.

GET /_/api/v1/event-types
curl -X GET 'https://zpe.vc/booking/_/api/v1/event-types?cursor=string&limit=25' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
[
  {
    "id": "string",
    "slug": "string",
    "title": "string",
    "description": "string",
    "durationMinutes": 0,
    "bufferBeforeMinutes": 0,
    "bufferAfterMinutes": 0,
    "minNoticeMinutes": 0,
    "maxHorizonDays": 0,
    "locationType": "google_meet",
    "locationValue": null,
    "active": false,
    "createdAt": 0
  }
]

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

POST /_/api/v1/event-types Create a meeting type createEventType

Create a meeting type

Parameters

nameinrequiredtypenotes
Idempotency-KeyheadernostringNames ONE create intent. A retry with the same key replays the first answer instead of making a second row; the same key on another operation is a 409.

Request body application/json · required

fieldtyperequirednotes
titlestringyesWhat the meeting is called on the guest's page.
slugstringyesThe second half of the booking link. Unique per host.
descriptionstringno
durationMinutesintegerno5–720, in steps of 5: the slot grid is five minutes.
bufferBeforeMinutesintegerno
bufferAfterMinutesintegerno
minNoticeMinutesintegerno
maxHorizonDaysintegerno
locationType"google_meet" | "custom_link" | "phone" | "in_person"no
locationValuestringno

Responses

statusmeaningbody
201Created. The row the store wrote, read back.object
400The body is not a JSON object, or `locationType` is not one of the four.object
401No credential, or one the door will not honour: no session cookie and no key, or a key that is malformed, unknown, revoked or expired.object
403The credential verified and may not do this: a read-scoped key on a write, or a key not granted this app.object
409That `Idempotency-Key` was already used for a different operation.object
422The row was read and could not be created: a missing title or link, or a duration off the five-minute grid.object
429This key has spent its window's ceiling. `Retry-After` says when the next call may be made.object
503The door did not answer, so no account could be named. Nothing was read and nothing was written.object

Example

Create a meeting type, with a token from the door.

POST /_/api/v1/event-types
curl -X POST 'https://zpe.vc/booking/_/api/v1/event-types' \
  -H 'Authorization: Bearer $ZPE_TOKEN' \
  -H 'content-type: application/json' \
  -d '{
  "title": "string",
  "slug": "string",
  "description": "string",
  "durationMinutes": 30,
  "bufferBeforeMinutes": 0,
  "bufferAfterMinutes": 0,
  "minNoticeMinutes": 0,
  "maxHorizonDays": 60,
  "locationType": "custom_link",
  "locationValue": "string"
}'
201 application/json
{
  "id": "string",
  "slug": "string",
  "title": "string",
  "description": "string",
  "durationMinutes": 0,
  "bufferBeforeMinutes": 0,
  "bufferAfterMinutes": 0,
  "minNoticeMinutes": 0,
  "maxHorizonDays": 0,
  "locationType": "google_meet",
  "locationValue": null,
  "active": false,
  "createdAt": 0
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

GET /_/api/v1/event-types/{id} Read one meeting type getEventType

Read one meeting type

Parameters

nameinrequiredtypenotes
idpathyesstringThe row's id.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200The meeting.object
401No credential, or one the door will not honour: no session cookie and no key, or a key that is malformed, unknown, revoked or expired.object
403The credential verified and may not do this: a read-scoped key on a write, or a key not granted this app.object
404This account has no meeting type with that id.object
429This key has spent its window's ceiling. `Retry-After` says when the next call may be made.object
503The door did not answer, so no account could be named. Nothing was read and nothing was written.object

Example

Read one meeting type, with a token from the door.

GET /_/api/v1/event-types/{id}
curl -X GET 'https://zpe.vc/booking/_/api/v1/event-types/string' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{
  "id": "string",
  "slug": "string",
  "title": "string",
  "description": "string",
  "durationMinutes": 0,
  "bufferBeforeMinutes": 0,
  "bufferAfterMinutes": 0,
  "minNoticeMinutes": 0,
  "maxHorizonDays": 0,
  "locationType": "google_meet",
  "locationValue": null,
  "active": false,
  "createdAt": 0
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

GET /_/api/v1/me Read the caller's profile and availability getMe

Read the caller's profile and availability

Parameters

No parameters.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200The profile and the hours a guest would be offered.object
401No credential, or one the door will not honour: no session cookie and no key, or a key that is malformed, unknown, revoked or expired.object
403The credential verified and may not do this: a read-scoped key on a write, or a key not granted this app.object
404This account has no profile row yet: the console creates the first one.object
429This key has spent its window's ceiling. `Retry-After` says when the next call may be made.object
503The door did not answer, so no account could be named. Nothing was read and nothing was written.object

Example

Read the caller's profile and availability, with a token from the door.

GET /_/api/v1/me
curl -X GET 'https://zpe.vc/booking/_/api/v1/me' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{
  "profile": {
    "id": "string",
    "name": "string",
    "email": "string",
    "tz": "string",
    "slug": "string",
    "createdAt": 0
  },
  "availability": {
    "timezone": "string",
    "weekly": [
      [
        {
          "startMinute": 0,
          "endMinute": 0
        }
      ]
    ],
    "overrides": [
      {
        "date": "string",
        "windows": [
          {
            "startMinute": 0,
            "endMinute": 0
          }
        ]
      }
    ]
  }
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.