Skip to content
Developer

Booking substitution

Locations and bookings8 EndpointsEvent / Booking substitution

The log: who did what, when and through which channel.

GET/api/event/booking_substitution_log

Query parameters

idstring
actionstring
channelstring
substitutionstring
bookingstring
eventstring
actorPersonstring
fromPersonstring
toPersonstring
slotstring
createdstring
searchStringstringtext to search for in the list
orderFieldNamestringname of the order field
orderFieldSortstringsorting modeAllowed: DESCASC
pageintegerpage of the list
pageSizeintegernumber of entries for each page
withMaxPageNumberstringreturns the number of pages available as a header if this is set

Responses

200Returns a list of EventBookingSubstitutionLog objects, newest firstarray<EventBookingSubstitutionLog>

Show fields (12)
  • substitution_idinteger
  • booking_idinteger
  • idinteger

    Primary key of the log entry. Internal ID.

  • booking_labelstring

    Label of the booking at the time of the entry.

  • slotinteger

    Slot of the substitution, for example the position in the list.

  • actionstring

    Action that was logged, for example claimed or filled.

  • actor_namestring

    Name of the acting person or user at the time, or the system user.

  • channelstring

    Channel of the action, for example app or e-mail.

  • from_statestring

    State before the change.

  • to_statestring

    State after the change.

  • messagestring

    Message written with the entry.

  • createdstring (date-time)

    Time the entry was logged.

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/event/booking_substitution_log \
  --header 'x-iw-jwt-token: <TOKEN>'
Response 200 application/json
[
  {
    "id": 42,
    "actor_name": "Beispiel",
    "substitution_id": 42,
    "booking_id": 42,
    "booking_label": "string",
    "slot": 1,
    "action": "string",
    "channel": "string",
    "from_state": "string",
    "to_state": "string"
  }
]

All substitutions; default order by appointment start.

GET/api/event/booking_substitution

Query parameters

idstring
statestring
reasonstring
slotstring1 = main trainer (performingPerson), 2 = secondary ... 5 = fifth.
bookingstring
eventstring
originalPersonstring
candidatePersonstringWho requested or took the slot, or whom the office assigned.
bookingStartstringCopy of the appointment start: list ordering and filters without a join, and the history stays readable after the appointment is gone.
filledViastring
qualificationSourcestring
sourceTicketstring
sourceNonWorkTimeRequeststring
createdstring
updatedstring
searchStringstringtext to search for in the list
orderFieldNamestringname of the order field
orderFieldSortstringsorting modeAllowed: DESCASC
pageintegerpage of the list
pageSizeintegernumber of entries for each page
withMaxPageNumberstringreturns the number of pages available as a header if this is set

Responses

200Returns a list of EventBookingSubstitution objectsarray<EventBookingSubstitution>

Show fields (24)
  • booking_idinteger
  • source_ticket_idinteger
  • source_non_work_time_request_idinteger
  • idinteger

    Primary key of the substitution. Internal ID.

  • lock_versioninteger

    Version used to prevent parallel changes to the substitution.

  • booking_startstring (date-time)

    Copy of the appointment start: list ordering and filters without a join, and the history stays readable after the appointment is gone.

  • booking_endstring (date-time)

    End of the booking that needs a substitute.

  • booking_labelstring

    Name and start of the appointment at creation, for the history.

  • slotinteger

    1 = main trainer (performingPerson), 2 = secondary ... 5 = fifth.

  • reasonstring

    Reason for the substitution, for example illness.

  • statestring

    State of the substitution, for example open, claimed or filled.

  • qualification_match_modestring

    How the qualifications of substitutes are matched.

  • qualification_sourcestring

    Source of the qualifications used to find substitutes.

  • filled_viastring

    How the substitution was filled, for example by a trainer or by staff.

  • claimed_atstring (date-time)

    Time the substitution was claimed.

  • filled_atstring (date-time)

    Time the substitution was filled.

  • decided_atstring (date-time)

    Time the substitution was decided.

  • decided_by_usernamestring

    Login name of the person who decided the substitution.

  • decision_notestring

    Note on the decision.

  • closed_atstring (date-time)

    Time the substitution was closed.

  • notified_atstring (date-time)

    Time the possible substitutes were last notified.

  • notified_countinteger

    Number of possible substitutes that were notified.

  • createdstring (date-time)

    Point in time the entity was created.

  • updatedstring (date-time)

    Point in time the entity was last updated.

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/event/booking_substitution \
  --header 'x-iw-jwt-token: <TOKEN>'
Response 200 application/json
[
  {
    "id": 42,
    "decided_by_username": "lena.hartmann@example.org",
    "booking_id": 42,
    "source_ticket_id": 42,
    "source_non_work_time_request_id": 42,
    "lock_version": 1,
    "booking_start": "2026-10-15T09:30:00+02:00",
    "booking_end": "2026-10-15T09:30:00+02:00",
    "booking_label": "string",
    "slot": 1
  }
]

Look for a substitute for one slot of an appointment. A person still in the slot is taken out and becomes the original trainer.

POST/api/event/booking_substitution

Request body application/json

  • bookinginteger
  • slotinteger
  • notestring

Responses

200The opened substitutionEventBookingSubstitution

Show fields (24)
  • booking_idinteger
  • source_ticket_idinteger
  • source_non_work_time_request_idinteger
  • idinteger

    Primary key of the substitution. Internal ID.

  • lock_versioninteger

    Version used to prevent parallel changes to the substitution.

  • booking_startstring (date-time)

    Copy of the appointment start: list ordering and filters without a join, and the history stays readable after the appointment is gone.

  • booking_endstring (date-time)

    End of the booking that needs a substitute.

  • booking_labelstring

    Name and start of the appointment at creation, for the history.

  • slotinteger

    1 = main trainer (performingPerson), 2 = secondary ... 5 = fifth.

  • reasonstring

    Reason for the substitution, for example illness.

  • statestring

    State of the substitution, for example open, claimed or filled.

  • qualification_match_modestring

    How the qualifications of substitutes are matched.

  • qualification_sourcestring

    Source of the qualifications used to find substitutes.

  • filled_viastring

    How the substitution was filled, for example by a trainer or by staff.

  • claimed_atstring (date-time)

    Time the substitution was claimed.

  • filled_atstring (date-time)

    Time the substitution was filled.

  • decided_atstring (date-time)

    Time the substitution was decided.

  • decided_by_usernamestring

    Login name of the person who decided the substitution.

  • decision_notestring

    Note on the decision.

  • closed_atstring (date-time)

    Time the substitution was closed.

  • notified_atstring (date-time)

    Time the possible substitutes were last notified.

  • notified_countinteger

    Number of possible substitutes that were notified.

  • createdstring (date-time)

    Point in time the entity was created.

  • updatedstring (date-time)

    Point in time the entity was last updated.

Request
curl --request POST \
  --url https://your-instance.iw-erp.de/api/event/booking_substitution \
  --header 'content-type: application/json' \
  --header 'x-iw-jwt-token: <TOKEN>' \
  --data '
{
  "booking": 1,
  "slot": 1,
  "note": "string"
}
'
Response 200 application/json
{
  "id": 42,
  "decided_by_username": "lena.hartmann@example.org",
  "booking_id": 42,
  "source_ticket_id": 42,
  "source_non_work_time_request_id": 42,
  "lock_version": 1,
  "booking_start": "2026-10-15T09:30:00+02:00",
  "booking_end": "2026-10-15T09:30:00+02:00",
  "booking_label": "string",
  "slot": 1
}

Returns a single event booking substitution entry.

GET/api/event/booking_substitution/{id}

Path parameters

idrequiredstring

Responses

200Returns a single EventBookingSubstitutionEventBookingSubstitution

Show fields (24)
  • booking_idinteger
  • source_ticket_idinteger
  • source_non_work_time_request_idinteger
  • idinteger

    Primary key of the substitution. Internal ID.

  • lock_versioninteger

    Version used to prevent parallel changes to the substitution.

  • booking_startstring (date-time)

    Copy of the appointment start: list ordering and filters without a join, and the history stays readable after the appointment is gone.

  • booking_endstring (date-time)

    End of the booking that needs a substitute.

  • booking_labelstring

    Name and start of the appointment at creation, for the history.

  • slotinteger

    1 = main trainer (performingPerson), 2 = secondary ... 5 = fifth.

  • reasonstring

    Reason for the substitution, for example illness.

  • statestring

    State of the substitution, for example open, claimed or filled.

  • qualification_match_modestring

    How the qualifications of substitutes are matched.

  • qualification_sourcestring

    Source of the qualifications used to find substitutes.

  • filled_viastring

    How the substitution was filled, for example by a trainer or by staff.

  • claimed_atstring (date-time)

    Time the substitution was claimed.

  • filled_atstring (date-time)

    Time the substitution was filled.

  • decided_atstring (date-time)

    Time the substitution was decided.

  • decided_by_usernamestring

    Login name of the person who decided the substitution.

  • decision_notestring

    Note on the decision.

  • closed_atstring (date-time)

    Time the substitution was closed.

  • notified_atstring (date-time)

    Time the possible substitutes were last notified.

  • notified_countinteger

    Number of possible substitutes that were notified.

  • createdstring (date-time)

    Point in time the entity was created.

  • updatedstring (date-time)

    Point in time the entity was last updated.

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/event/booking_substitution/42 \
  --header 'x-iw-jwt-token: <TOKEN>'
Response 200 application/json
{
  "id": 42,
  "decided_by_username": "lena.hartmann@example.org",
  "booking_id": 42,
  "source_ticket_id": 42,
  "source_non_work_time_request_id": 42,
  "lock_version": 1,
  "booking_start": "2026-10-15T09:30:00+02:00",
  "booking_end": "2026-10-15T09:30:00+02:00",
  "booking_label": "string",
  "slot": 1
}

Every pool member with the reasons that would block them, eligible ones first. The office may assign people with reasons, too, with a note.

GET/api/event/booking_substitution/{id}/candidates

Path parameters

idrequiredstring

Query parameters

onlyEligibleboolean

Responses

200List of {person, eligible, reasons}

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/event/booking_substitution/42/candidates \
  --header 'x-iw-jwt-token: <TOKEN>'

Eligibility of one person (e.g. before assigning somebody outside the pool).

GET/api/event/booking_substitution/{id}/test_person

Path parameters

idrequiredstring

Query parameters

personrequiredinteger

Responses

200eligible and reason codes

Request
curl --request GET \
  --url 'https://your-instance.iw-erp.de/api/event/booking_substitution/42/test_person?person=1' \
  --header 'x-iw-jwt-token: <TOKEN>'

approve, decline (note), assign (person, note), cancel (note), reopen (note), notify (push to the matching trainers again).

PUT/api/event/booking_substitution/{id}/{action}

Path parameters

idrequiredstring
actionrequiredstring

Query parameters

lock_versioninteger

Request body application/json

  • personinteger
  • notestring

Responses

200The substitution after the actionEventBookingSubstitution

Show fields (24)
  • booking_idinteger
  • source_ticket_idinteger
  • source_non_work_time_request_idinteger
  • idinteger

    Primary key of the substitution. Internal ID.

  • lock_versioninteger

    Version used to prevent parallel changes to the substitution.

  • booking_startstring (date-time)

    Copy of the appointment start: list ordering and filters without a join, and the history stays readable after the appointment is gone.

  • booking_endstring (date-time)

    End of the booking that needs a substitute.

  • booking_labelstring

    Name and start of the appointment at creation, for the history.

  • slotinteger

    1 = main trainer (performingPerson), 2 = secondary ... 5 = fifth.

  • reasonstring

    Reason for the substitution, for example illness.

  • statestring

    State of the substitution, for example open, claimed or filled.

  • qualification_match_modestring

    How the qualifications of substitutes are matched.

  • qualification_sourcestring

    Source of the qualifications used to find substitutes.

  • filled_viastring

    How the substitution was filled, for example by a trainer or by staff.

  • claimed_atstring (date-time)

    Time the substitution was claimed.

  • filled_atstring (date-time)

    Time the substitution was filled.

  • decided_atstring (date-time)

    Time the substitution was decided.

  • decided_by_usernamestring

    Login name of the person who decided the substitution.

  • decision_notestring

    Note on the decision.

  • closed_atstring (date-time)

    Time the substitution was closed.

  • notified_atstring (date-time)

    Time the possible substitutes were last notified.

  • notified_countinteger

    Number of possible substitutes that were notified.

  • createdstring (date-time)

    Point in time the entity was created.

  • updatedstring (date-time)

    Point in time the entity was last updated.

Request
curl --request PUT \
  --url https://your-instance.iw-erp.de/api/event/booking_substitution/42/42 \
  --header 'content-type: application/json' \
  --header 'x-iw-jwt-token: <TOKEN>' \
  --data '
{
  "person": 1,
  "note": "string"
}
'
Response 200 application/json
{
  "id": 42,
  "decided_by_username": "lena.hartmann@example.org",
  "booking_id": 42,
  "source_ticket_id": 42,
  "source_non_work_time_request_id": 42,
  "lock_version": 1,
  "booking_start": "2026-10-15T09:30:00+02:00",
  "booking_end": "2026-10-15T09:30:00+02:00",
  "booking_label": "string",
  "slot": 1
}

approve, decline (note), assign (person, note), cancel (note), reopen (note), notify (push to the matching trainers again).

PATCH/api/event/booking_substitution/{id}/{action}

Path parameters

idrequiredstring
actionrequiredstring

Query parameters

lock_versioninteger

Request body application/json

  • personinteger
  • notestring

Responses

200The substitution after the actionEventBookingSubstitution

Show fields (24)
  • booking_idinteger
  • source_ticket_idinteger
  • source_non_work_time_request_idinteger
  • idinteger

    Primary key of the substitution. Internal ID.

  • lock_versioninteger

    Version used to prevent parallel changes to the substitution.

  • booking_startstring (date-time)

    Copy of the appointment start: list ordering and filters without a join, and the history stays readable after the appointment is gone.

  • booking_endstring (date-time)

    End of the booking that needs a substitute.

  • booking_labelstring

    Name and start of the appointment at creation, for the history.

  • slotinteger

    1 = main trainer (performingPerson), 2 = secondary ... 5 = fifth.

  • reasonstring

    Reason for the substitution, for example illness.

  • statestring

    State of the substitution, for example open, claimed or filled.

  • qualification_match_modestring

    How the qualifications of substitutes are matched.

  • qualification_sourcestring

    Source of the qualifications used to find substitutes.

  • filled_viastring

    How the substitution was filled, for example by a trainer or by staff.

  • claimed_atstring (date-time)

    Time the substitution was claimed.

  • filled_atstring (date-time)

    Time the substitution was filled.

  • decided_atstring (date-time)

    Time the substitution was decided.

  • decided_by_usernamestring

    Login name of the person who decided the substitution.

  • decision_notestring

    Note on the decision.

  • closed_atstring (date-time)

    Time the substitution was closed.

  • notified_atstring (date-time)

    Time the possible substitutes were last notified.

  • notified_countinteger

    Number of possible substitutes that were notified.

  • createdstring (date-time)

    Point in time the entity was created.

  • updatedstring (date-time)

    Point in time the entity was last updated.

Request
curl --request PATCH \
  --url https://your-instance.iw-erp.de/api/event/booking_substitution/42/42 \
  --header 'content-type: application/json' \
  --header 'x-iw-jwt-token: <TOKEN>' \
  --data '
{
  "person": 1,
  "note": "string"
}
'
Response 200 application/json
{
  "id": 42,
  "decided_by_username": "lena.hartmann@example.org",
  "booking_id": 42,
  "source_ticket_id": 42,
  "source_non_work_time_request_id": 42,
  "lock_version": 1,
  "booking_start": "2026-10-15T09:30:00+02:00",
  "booking_end": "2026-10-15T09:30:00+02:00",
  "booking_label": "string",
  "slot": 1
}