Skip to content

Create Event Appointment

Request

Create an Appointment in an Event. The literal client wire object is required for both an existing and a new Booking User.

Security
BearerPartnerUser
Path
location_idinteger, >= 1required

Location ID

event_idinteger, >= 1required

Event ID

Query
includeArray of strings, unique(Appointment Includes)

Related resources to include in the created Appointment

Items Enum:"client""client.custom_field_values""staff""services""goods""resource_instances""labels""attendance_service_items""attendance_good_items""attendance_document"
Headers
Acceptstringrequired

Required B2B v2 response media type. Use application/vnd.api.v2+json. A charset parameter is also accepted.

Default:"application/vnd.api.v2+json"
Example:application/vnd.api.v2+json
Content-Typestringrequired

Request media type

Value:"application/json"
Authorizationstringrequired

Bearer {partner_token}, User {user_token}

Bodyapplication/jsonrequired
clientobjectrequired
clients_countinteger, >= 1required

Number of places reserved by the Appointment

client_idinteger or null, >= 1

Deprecated wire field for an existing Booking User ID; use client.id

comer_idinteger or null, >= 1

Walk-in visitor ID

comerobject
is_trial_serviceboolean

Whether this is a trial Service Appointment

curl -i -X POST \
  'https://developer.alteg.io/_mock/en/b2b-v2/openapi/locations/{location_id}/events/{event_id}/appointments?include=client' \
  -H 'Accept: application/vnd.api.v2+json' \
  -H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "client_id": 123456,
    "client": {
      "id": 123456,
      "name": "John",
      "phone": "13155550175",
      "email": "john@example.com",
      "surname": "Smith",
      "patronymic": null,
      "gender": 1,
      "birthday": "1990-01-01",
      "custom_field_values": null,
      "agreements": null
    },
    "comer_id": null,
    "clients_count": 1
  }'

Responses

Event Appointment created successfully

Bodyapplication/json
dataobject(Appointment Resource)required
metaArray of any, <= 0 itemsrequired

Empty JSON array returned for an Event Appointment item

includedArray of objects(includedResource)

Resources requested through include, when available

Response
{ "data": { "type": "record", "id": "string", "attributes": { … }, "relationships": { … } }, "included": [ { … } ], "meta": [] }