PUT api/resource/{id}/booking/{year}

Replaces a user's resource bookings for a set of projects within a given year.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

The ID of the user whose bookings are being replaced.

integer

Required

year

The calendar year the replacement applies to.

integer

Required

Body Parameters

The project IDs whose existing bookings for the year should be cleared, and the new bookings to create in their place.

ReplaceUserBookings
NameDescriptionTypeAdditional information
userID

integer

None.

eventIds

Collection of integer

None.

replacementBookings

Collection of EventBooking

None.

Request Formats

application/json, text/json, application/scim+json

Sample:
{
  "userID": 1,
  "eventIds": [
    1,
    2
  ],
  "replacementBookings": [
    {
      "userID": 1,
      "resourceEventName": "sample string 2",
      "startTime": "2026-08-13T06:38:18.9622602+00:00",
      "endTime": "2026-08-13T06:38:18.9622602+00:00"
    },
    {
      "userID": 1,
      "resourceEventName": "sample string 2",
      "startTime": "2026-08-13T06:38:18.9622602+00:00",
      "endTime": "2026-08-13T06:38:18.9622602+00:00"
    }
  ]
}

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'ReplaceUserBookings'.

Response Information

Resource Description

On success: HTTP 200 OK. On failure: HTTP 400 Bad Request if the input is invalid or the existing bookings could not be deleted.

BookingCTO
NameDescriptionTypeAdditional information
taskID

integer

None.

bookingID

integer

None.

Response Formats

application/json, text/json, application/scim+json

Sample:
{
  "taskID": 1,
  "bookingID": 2
}