LE-KO Bookings API (v1.0.3)

Download OpenAPI specification:

LE-KO Bookings API

Bookings

Bookings APIs

Send booking notifications

✨ Sends booking notifications according to the defined notification rules. This endpoint is intended to be called periodically (cron-like) to trigger the sending of notifications as part of the booking flow.

Authorizations:
bearerHttpAuthentication
header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Responses

Response samples

Content type
application/json
{
  • "errors": [
    • {
      • "code": "validation",
      • "message": "string",
      • "endpoint": "string",
      • "requestId": "string"
      }
    ]
}

Mark a booking as completed

✨ Mark a specific booking as completed. The booking must have already happened.

Authorizations:
bearerHttpAuthentication
path Parameters
bookingId
required
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...
Example: 4b72d209-debd-45e1-93cc-7640bf7d39bf

The booking ID

header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Request Body schema: application/json
required
completed
required
boolean

Responses

Response Schema: application/json
bookingId
required
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Database entity primary key uuid

orderId
required
string <uuid>
userId
required
string <uuid> (UserId)

User ID

coachId
required
string <uuid>
eventId
required
string <uuid> (CoachEventId) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Event UUID

startAt
required
string <date-time>
endAt
required
string <date-time>
bookingStatus
required
string (BookingStatus)
Enum: "Accepted" "Rejected" "Pending" "Canceled" "InDispute" "DisputeDone"
eventStatus
required
string or null
completed
required
boolean
note
required
string or null
canceledAt
string or null <date-time>
canceledByRole
string or null
Enum: "Athlete" "Coach" "System"

Who canceled the booking

cancellationReasonCode
string or null
Enum: "NotFeelingWell" "NoTime" "Other"

Reason code for booking cancellation

cancellationReasonText
string or null
sportId
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Database entity primary key uuid

serviceCardinality
integer or null

The cardinality of the service (1st, 2nd, 3rd service) for this coach, or null if unavailable

required
object (TimeSlot)
timeSlotId
required
string <uuid> (TimeSlotId) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Time Slot UUID

startTime
required
string <time> (Time)

time in RFC-3339

endTime
required
string <time> (Time)

time in RFC-3339

numberOfParticipants
required
integer >= 1
slotType
required
string
Enum: "Online" "Offline"
ageFrom
required
integer [ 18 .. 99 ]
ageTo
required
integer [ 18 .. 99 ]
duration
required
integer >= 15
price
required
integer
priceCurrency
required
string (Currency)
Value: "RUB"
paymentMethod
required
string
Value: "Cash"
addressId
string <uuid> (AddressId) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Address UUID

public
boolean
level
string
Enum: "Any" "Beginner" "Medium" "Pro"
eligibility
string
Enum: "All" "Men" "Women"

Request samples

Content type
application/json
{
  • "completed": true
}

Response samples

Content type
application/json
{
  • "bookingId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
  • "orderId": "b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5",
  • "userId": "00000000-0000-1000-9000-55f01dda9dd0",
  • "coachId": "32b8fa03-4065-4b2f-b4b6-8ce1e570e87e",
  • "eventId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
  • "startAt": "2019-08-24T14:15:22Z",
  • "endAt": "2019-08-24T14:15:22Z",
  • "bookingStatus": "Accepted",
  • "eventStatus": "string",
  • "completed": true,
  • "note": "string",
  • "canceledAt": "2019-08-24T14:15:22Z",
  • "canceledByRole": "Athlete",
  • "cancellationReasonCode": "NotFeelingWell",
  • "cancellationReasonText": "string",
  • "sportId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
  • "serviceCardinality": 0,
  • "timeslot": {
    • "timeSlotId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
    • "startTime": "12:09:53+00:00",
    • "endTime": "12:09:53+00:00",
    • "numberOfParticipants": 1,
    • "slotType": "Online",
    • "ageFrom": 18,
    • "ageTo": 18,
    • "duration": 15,
    • "price": 0,
    • "priceCurrency": "RUB",
    • "paymentMethod": "Cash",
    • "addressId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
    • "public": true,
    • "level": "Any",
    • "eligibility": "All"
    }
}

Add a note to a booking

✨ Add a note to a specific booking that has already happened.

Authorizations:
bearerHttpAuthentication
path Parameters
bookingId
required
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...
Example: 4b72d209-debd-45e1-93cc-7640bf7d39bf

The booking ID

header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Request Body schema: application/json
required
note
required
string

Responses

Response Schema: application/json
bookingId
required
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Database entity primary key uuid

orderId
required
string <uuid>
userId
required
string <uuid> (UserId)

User ID

coachId
required
string <uuid>
eventId
required
string <uuid> (CoachEventId) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Event UUID

startAt
required
string <date-time>
endAt
required
string <date-time>
bookingStatus
required
string (BookingStatus)
Enum: "Accepted" "Rejected" "Pending" "Canceled" "InDispute" "DisputeDone"
eventStatus
required
string or null
completed
required
boolean
note
required
string or null
canceledAt
string or null <date-time>
canceledByRole
string or null
Enum: "Athlete" "Coach" "System"

Who canceled the booking

cancellationReasonCode
string or null
Enum: "NotFeelingWell" "NoTime" "Other"

Reason code for booking cancellation

cancellationReasonText
string or null
sportId
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Database entity primary key uuid

serviceCardinality
integer or null

The cardinality of the service (1st, 2nd, 3rd service) for this coach, or null if unavailable

required
object (TimeSlot)
timeSlotId
required
string <uuid> (TimeSlotId) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Time Slot UUID

startTime
required
string <time> (Time)

time in RFC-3339

endTime
required
string <time> (Time)

time in RFC-3339

numberOfParticipants
required
integer >= 1
slotType
required
string
Enum: "Online" "Offline"
ageFrom
required
integer [ 18 .. 99 ]
ageTo
required
integer [ 18 .. 99 ]
duration
required
integer >= 15
price
required
integer
priceCurrency
required
string (Currency)
Value: "RUB"
paymentMethod
required
string
Value: "Cash"
addressId
string <uuid> (AddressId) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Address UUID

public
boolean
level
string
Enum: "Any" "Beginner" "Medium" "Pro"
eligibility
string
Enum: "All" "Men" "Women"

Request samples

Content type
application/json
{
  • "note": "string"
}

Response samples

Content type
application/json
{
  • "bookingId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
  • "orderId": "b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5",
  • "userId": "00000000-0000-1000-9000-55f01dda9dd0",
  • "coachId": "32b8fa03-4065-4b2f-b4b6-8ce1e570e87e",
  • "eventId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
  • "startAt": "2019-08-24T14:15:22Z",
  • "endAt": "2019-08-24T14:15:22Z",
  • "bookingStatus": "Accepted",
  • "eventStatus": "string",
  • "completed": true,
  • "note": "string",
  • "canceledAt": "2019-08-24T14:15:22Z",
  • "canceledByRole": "Athlete",
  • "cancellationReasonCode": "NotFeelingWell",
  • "cancellationReasonText": "string",
  • "sportId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
  • "serviceCardinality": 0,
  • "timeslot": {
    • "timeSlotId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
    • "startTime": "12:09:53+00:00",
    • "endTime": "12:09:53+00:00",
    • "numberOfParticipants": 1,
    • "slotType": "Online",
    • "ageFrom": 18,
    • "ageTo": 18,
    • "duration": 15,
    • "price": 0,
    • "priceCurrency": "RUB",
    • "paymentMethod": "Cash",
    • "addressId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
    • "public": true,
    • "level": "Any",
    • "eligibility": "All"
    }
}

Dismiss a canceled booking

✨ Dismiss a canceled booking from the user's calendar view. Only the booking owner can dismiss their own bookings, and only canceled bookings can be dismissed. This action is permanent and helps keep the calendar UI clean.

Authorizations:
bearerHttpAuthentication
path Parameters
bookingId
required
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...
Example: 4b72d209-debd-45e1-93cc-7640bf7d39bf

The booking ID to dismiss

query Parameters
userId
required
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...
Example: userId=4b72d209-debd-45e1-93cc-7640bf7d39bf

The user ID (must match the booking owner)

header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Responses

Response samples

Content type
application/json
{
  • "errors": [
    • {
      • "code": "validation",
      • "message": "string",
      • "endpoint": "string",
      • "requestId": "string"
      }
    ]
}

Get all booking orders for a user

✨ Get all booking orders of a specific user.

Authorizations:
bearerHttpAuthentication
query Parameters
userId
required
string <uuid> (UserId)
Example: userId=00000000-0000-1000-9000-55f01dda9dd0

The user ID

startAt
string <date-time>

The start date time to filter

endAt
string <date-time>

The end date time to filter

header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Responses

Response Schema: application/json
Array
orderId
required
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Database entity primary key uuid

userId
required
string <uuid> (UserId)

User ID

paymentStatus
required
string (BookingOrderPaymentStatus)
Enum: "Pending" "Paid" "Failed" "Cash"
createdAt
required
string <date-time>
required
Array of objects (Booking)
Array
bookingId
required
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Database entity primary key uuid

orderId
required
string <uuid>
userId
required
string <uuid> (UserId)

User ID

coachId
required
string <uuid>
eventId
required
string <uuid> (CoachEventId) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Event UUID

startAt
required
string <date-time>
endAt
required
string <date-time>
bookingStatus
required
string (BookingStatus)
Enum: "Accepted" "Rejected" "Pending" "Canceled" "InDispute" "DisputeDone"
eventStatus
required
string or null
completed
required
boolean
note
required
string or null
canceledAt
string or null <date-time>
canceledByRole
string or null
Enum: "Athlete" "Coach" "System"

Who canceled the booking

cancellationReasonCode
string or null
Enum: "NotFeelingWell" "NoTime" "Other"

Reason code for booking cancellation

cancellationReasonText
string or null
sportId
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Database entity primary key uuid

serviceCardinality
integer or null

The cardinality of the service (1st, 2nd, 3rd service) for this coach, or null if unavailable

required
object (TimeSlot)

Response samples

Content type
application/json
[
  • {
    • "orderId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
    • "userId": "00000000-0000-1000-9000-55f01dda9dd0",
    • "paymentStatus": "Pending",
    • "createdAt": "2019-08-24T14:15:22Z",
    • "bookings": [
      • {
        }
      ]
    }
]

Get a specific booking

✨ Get details of a specific booking by its ID.

Authorizations:
bearerHttpAuthentication
path Parameters
bookingId
required
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...
Example: 4b72d209-debd-45e1-93cc-7640bf7d39bf

The booking ID

header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Responses

Response Schema: application/json
bookingId
required
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Database entity primary key uuid

orderId
required
string <uuid>
userId
required
string <uuid> (UserId)

User ID

coachId
required
string <uuid>
eventId
required
string <uuid> (CoachEventId) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Event UUID

startAt
required
string <date-time>
endAt
required
string <date-time>
bookingStatus
required
string (BookingStatus)
Enum: "Accepted" "Rejected" "Pending" "Canceled" "InDispute" "DisputeDone"
eventStatus
required
string or null
completed
required
boolean
note
required
string or null
canceledAt
string or null <date-time>
canceledByRole
string or null
Enum: "Athlete" "Coach" "System"

Who canceled the booking

cancellationReasonCode
string or null
Enum: "NotFeelingWell" "NoTime" "Other"

Reason code for booking cancellation

cancellationReasonText
string or null
sportId
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Database entity primary key uuid

serviceCardinality
integer or null

The cardinality of the service (1st, 2nd, 3rd service) for this coach, or null if unavailable

required
object (TimeSlot)
timeSlotId
required
string <uuid> (TimeSlotId) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Time Slot UUID

startTime
required
string <time> (Time)

time in RFC-3339

endTime
required
string <time> (Time)

time in RFC-3339

numberOfParticipants
required
integer >= 1
slotType
required
string
Enum: "Online" "Offline"
ageFrom
required
integer [ 18 .. 99 ]
ageTo
required
integer [ 18 .. 99 ]
duration
required
integer >= 15
price
required
integer
priceCurrency
required
string (Currency)
Value: "RUB"
paymentMethod
required
string
Value: "Cash"
addressId
string <uuid> (AddressId) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Address UUID

public
boolean
level
string
Enum: "Any" "Beginner" "Medium" "Pro"
eligibility
string
Enum: "All" "Men" "Women"

Response samples

Content type
application/json
{
  • "bookingId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
  • "orderId": "b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5",
  • "userId": "00000000-0000-1000-9000-55f01dda9dd0",
  • "coachId": "32b8fa03-4065-4b2f-b4b6-8ce1e570e87e",
  • "eventId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
  • "startAt": "2019-08-24T14:15:22Z",
  • "endAt": "2019-08-24T14:15:22Z",
  • "bookingStatus": "Accepted",
  • "eventStatus": "string",
  • "completed": true,
  • "note": "string",
  • "canceledAt": "2019-08-24T14:15:22Z",
  • "canceledByRole": "Athlete",
  • "cancellationReasonCode": "NotFeelingWell",
  • "cancellationReasonText": "string",
  • "sportId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
  • "serviceCardinality": 0,
  • "timeslot": {
    • "timeSlotId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
    • "startTime": "12:09:53+00:00",
    • "endTime": "12:09:53+00:00",
    • "numberOfParticipants": 1,
    • "slotType": "Online",
    • "ageFrom": 18,
    • "ageTo": 18,
    • "duration": 15,
    • "price": 0,
    • "priceCurrency": "RUB",
    • "paymentMethod": "Cash",
    • "addressId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
    • "public": true,
    • "level": "Any",
    • "eligibility": "All"
    }
}

Get all bookings for a user or event

✨ Get all bookings of a specific user or event. The user must provide either eventId or userId. If userId is provided, startAt and endAt can be used to filter the results.

Authorizations:
bearerHttpAuthentication
query Parameters
userId
string <uuid> (UserId)
Example: userId=00000000-0000-1000-9000-55f01dda9dd0

The user ID. Either userId or eventId must be provided.

eventId
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...
Example: eventId=4b72d209-debd-45e1-93cc-7640bf7d39bf

The event ID. Either userId or eventId must be provided.

startAt
string <date-time>

The start date time to filter. Only applicable when userId is provided.

endAt
string <date-time>

The end date time to filter. Only applicable when userId is provided.

header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Responses

Response Schema: application/json
Array
bookingId
required
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Database entity primary key uuid

orderId
required
string <uuid>
userId
required
string <uuid> (UserId)

User ID

coachId
required
string <uuid>
eventId
required
string <uuid> (CoachEventId) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Event UUID

startAt
required
string <date-time>
endAt
required
string <date-time>
bookingStatus
required
string (BookingStatus)
Enum: "Accepted" "Rejected" "Pending" "Canceled" "InDispute" "DisputeDone"
eventStatus
required
string or null
completed
required
boolean
note
required
string or null
canceledAt
string or null <date-time>
canceledByRole
string or null
Enum: "Athlete" "Coach" "System"

Who canceled the booking

cancellationReasonCode
string or null
Enum: "NotFeelingWell" "NoTime" "Other"

Reason code for booking cancellation

cancellationReasonText
string or null
sportId
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Database entity primary key uuid

serviceCardinality
integer or null

The cardinality of the service (1st, 2nd, 3rd service) for this coach, or null if unavailable

required
object (TimeSlot)
timeSlotId
required
string <uuid> (TimeSlotId) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Time Slot UUID

startTime
required
string <time> (Time)

time in RFC-3339

endTime
required
string <time> (Time)

time in RFC-3339

numberOfParticipants
required
integer >= 1
slotType
required
string
Enum: "Online" "Offline"
ageFrom
required
integer [ 18 .. 99 ]
ageTo
required
integer [ 18 .. 99 ]
duration
required
integer >= 15
price
required
integer
priceCurrency
required
string (Currency)
Value: "RUB"
paymentMethod
required
string
Value: "Cash"
addressId
string <uuid> (AddressId) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Address UUID

public
boolean
level
string
Enum: "Any" "Beginner" "Medium" "Pro"
eligibility
string
Enum: "All" "Men" "Women"

Response samples

Content type
application/json
[
  • {
    • "bookingId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
    • "orderId": "b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5",
    • "userId": "00000000-0000-1000-9000-55f01dda9dd0",
    • "coachId": "32b8fa03-4065-4b2f-b4b6-8ce1e570e87e",
    • "eventId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
    • "startAt": "2019-08-24T14:15:22Z",
    • "endAt": "2019-08-24T14:15:22Z",
    • "bookingStatus": "Accepted",
    • "eventStatus": "string",
    • "completed": true,
    • "note": "string",
    • "canceledAt": "2019-08-24T14:15:22Z",
    • "canceledByRole": "Athlete",
    • "cancellationReasonCode": "NotFeelingWell",
    • "cancellationReasonText": "string",
    • "sportId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
    • "serviceCardinality": 0,
    • "timeslot": {
      • "timeSlotId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
      • "startTime": "12:09:53+00:00",
      • "endTime": "12:09:53+00:00",
      • "numberOfParticipants": 1,
      • "slotType": "Online",
      • "ageFrom": 18,
      • "ageTo": 18,
      • "duration": 15,
      • "price": 0,
      • "priceCurrency": "RUB",
      • "paymentMethod": "Cash",
      • "addressId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
      • "public": true,
      • "level": "Any",
      • "eligibility": "All"
      }
    }
]

Create an order for booking events

✨ Create an order for booking events.

Authorizations:
bearerHttpAuthentication
header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Request Body schema: application/json
required
userId
required
string <uuid> (UserId)

User ID

eventIds
required
Array of strings <uuid> (Id) [ items <uuid > = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}... ]
required
object (BookEventPaymentMethod)

Specifies the payment method for booking one or more events. For the project's MVP, only Cash will be accepted. Once Card payments are enabled, the methodId field must be provided when the payment type is Card.

type
required
string
Enum: "Cash" "Card"
methodId
string <uuid> (PaymentMethodId) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Payment Method uuid

Responses

Request samples

Content type
application/json
{
  • "userId": "00000000-0000-1000-9000-55f01dda9dd0",
  • "eventIds": [
    • "4b72d209-debd-45e1-93cc-7640bf7d39bf"
    ],
  • "paymentMethod": {
    • "type": "Cash",
    • "methodId": "4b72d209-debd-45e1-93cc-7640bf7d39bf"
    }
}

Response samples

Content type
application/json
{
  • "orderId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
  • "userId": "00000000-0000-1000-9000-55f01dda9dd0",
  • "paymentStatus": "Pending",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "bookings": [
    • {
      • "bookingId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
      • "orderId": "b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5",
      • "userId": "00000000-0000-1000-9000-55f01dda9dd0",
      • "coachId": "32b8fa03-4065-4b2f-b4b6-8ce1e570e87e",
      • "eventId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
      • "startAt": "2019-08-24T14:15:22Z",
      • "endAt": "2019-08-24T14:15:22Z",
      • "bookingStatus": "Accepted",
      • "eventStatus": "string",
      • "completed": true,
      • "note": "string",
      • "canceledAt": "2019-08-24T14:15:22Z",
      • "canceledByRole": "Athlete",
      • "cancellationReasonCode": "NotFeelingWell",
      • "cancellationReasonText": "string",
      • "sportId": "4b72d209-debd-45e1-93cc-7640bf7d39bf",
      • "serviceCardinality": 0,
      • "timeslot": {
        }
      }
    ]
}

Delete user data from bookings

✨ Deletes all user-related data from the bookings system including:

  • User's booking history (as athlete or coach)
  • User's booking orders and payment records
  • User's booking notes and interactions
  • User's dispute records

If userId parameter is provided, deletes the specified user (admin only). If userId is not provided, deletes the current user (from x-current-user-id header).

Authorizations:
bearerHttpAuthentication
query Parameters
userId
string <uuid>
Example: userId=4b72d209-debd-45e1-93cc-7640bf7d39bf

User ID to delete. If not provided, deletes the current user (from x-current-user-id header). Only admins can delete other users.

header Parameters
x-current-user-id
required
string <uuid>
Example: 4b72d209-debd-45e1-93cc-7640bf7d39bf

Current user ID for authentication and authorization

Responses

Response samples

Content type
application/json
{
  • "errors": [
    • {
      • "code": "validation",
      • "message": "string",
      • "endpoint": "string",
      • "requestId": "string"
      }
    ]
}