Skip to content

Book Appointment

Creates a new service appointment. The customer must first be created or found via the Customers API.

Request

POST /api/oauth/v2/resource/appointments/service

HeaderValue
AuthorizationBearer {access_token}
Content-Typeapplication/json

Required scope: appointments

Request body

json
{
  "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "locationId": "b2c3d4e5-f6a7-8901-bcde-f01234567890",
  "serviceId": "c3d4e5f6-a7b8-9012-cdef-012345678901",
  "customerId": "e5f6a7b8-c9d0-1234-efab-234567890123",
  "status": "active",
  "start": "2026-04-02T09:00:00+02:00",
  "notes": "Bitte nüchtern erscheinen"
}

Request fields

FieldTypeRequiredDescription
userIdstring (UUID)YesID of the user performing the booking
locationIdstring (UUID)YesID of the location
serviceIdstring (UUID)YesID of the service
customerIdstring (UUID)YesID of the customer
statusstringNoAppointment status: active (default) or request (appointment request)
startstring (ISO 8601)YesDesired appointment start time
notesstringNoInternal note for the appointment
availabilityCheckstringNoAvailability check: full (full including opening hours), overlap (default, only double bookings), none (no check)

Response

Success (201 Created)

json
{
  "data": {
    "id": "d4e5f6a7-b8c9-0123-defa-123456789012",
    "title": "Erstordination – Anna Muster",
    "start": "2026-04-02T09:00:00+02:00",
    "end": "2026-04-02T10:00:00+02:00",
    "allDay": false,
    "status": "active",
    "type": "customer",
    "note": "Bitte nüchtern erscheinen",
    "customer": {
      "id": "e5f6a7b8-c9d0-1234-efab-234567890123",
      "firstName": "Anna",
      "lastName": "Muster"
    },
    "service": {
      "id": "c3d4e5f6-a7b8-9012-cdef-012345678901",
      "name": "Erstordination"
    },
    "course": null,
    "source": "oauth",
    "createdAt": "2026-04-01T14:23:00+02:00",
    "updatedAt": "2026-04-01T14:23:00+02:00"
  }
}

Response fields

FieldTypeDescription
data.idstring (UUID)Unique appointment ID
data.titlestringAppointment title
data.startstring (ISO 8601)Actual start time
data.endstring (ISO 8601)Actual end time
data.allDaybooleanAll-day appointment
data.statusstringAppointment status (active or request)
data.typestringAppointment type (e.g. customer)
data.notestring | nullInternal note for the appointment
data.customerobject | nullLinked customer
data.customer.idstring (UUID)Customer ID
data.customer.firstNamestringFirst name
data.customer.lastNamestringLast name
data.serviceobject | nullBooked service
data.service.idstring (UUID)Service ID
data.service.namestringName of the service
data.courseobject | nullLinked course (if appointment is a course appointment)
data.sourcestringBooking source (e.g. oauth)
data.createdAtstring (ISO 8601)Creation time
data.updatedAtstring (ISO 8601)Last modification time
Beispiele
bash
curl -X POST "https://my.offisy.at/api/oauth/v2/resource/appointments/service" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "b2c3d4e5-f6a7-8901-bcde-f01234567890",
    "locationId": "b2c3d4e5-f6a7-8901-bcde-f01234567890",
    "serviceId": "b2c3d4e5-f6a7-8901-bcde-f01234567890",
    "customerId": "b2c3d4e5-f6a7-8901-bcde-f01234567890",
    "start": "beispiel",
    "notes": "Terminnotiz",
    "status": "beispiel",
    "availabilityCheck": "beispiel"
  }'
Parameter
Zuerst Token anfordern

Possible errors

StatusCodeDescription
400validation_errorRequired fields missing or UUID is invalid
401invalid_clientInvalid or missing access token
403insufficient_scopeScope appointments not present
404not_foundUser, location, service, or customer not found
409conflictThe selected time slot is no longer available
422unprocessable_entitystart is in the past
422booking_errorGeneral booking error (e.g. configuration problem)

Offisy GmbH