---
title: "Update Booking"
method: PUT
path: "/api/v2/resource_management/bookings/{bookingId}"
tags: ["Booking"]
---

# Update Booking

`PUT /api/v2/resource_management/bookings/{bookingId}`

## Request

- Base URL: `https://apiv2.eightfold.ai`
- URL: `https://apiv2.eightfold.ai/api/v2/resource_management/bookings/{bookingId}`
- Auth: none declared. Required headers: `Authorization`
- TypeScript: <https://skmtc.dev/eightfold/apis/api-server-v2-service-service/docs/api/v2/resource_management/bookings/:bookingId/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates a booking given its id.

## Path parameters

- `bookingId` string, required

## Headers

- `Authorization` string, required

## Request body

- BookingSchema
  - `createdAt` integer, nullable: Created timestamp for the booking
  - `updatedBy` string, nullable: User who updated the booking
  - `isArchived` boolean, nullable: A flag indicating if booking is archived
  - `startDateIso` string: Start date of the booking in ISO format (YYYY-MM-DD)
  - `extData` ExtBooking
    - `creatorEmail` string, required: Email of the creator of the booking
    - `createdAt` integer, required: Creation timestamp for the booking
    - `bookingId` integer, nullable: Internal booking ID
    - `startDateIso` string: Start date of the booking in ISO format (YYYY-MM-DD)
    - `endDateIso` string: End date of the booking in ISO format (YYYY-MM-DD)
    - `bookedCapacity` ExtBookingCapacityData
      - `unit` 'hours' | 'percentage' | 'fraction', required: Unit of capacity. Possible values: ['hours', 'percentage', 'fraction']
      - `timeGranularity` 'daily' | 'weekly' | 'monthly', nullable: Time granularity of capacity. Possible values: ['daily', 'weekly', 'monthly']
      - `capacity` number, float, required: Capacity value
    - `lastModifiedAt` integer, nullable: Last modified timestamp for the booking
    - `endDate` integer: [DEPRECATED] End date of the booking in epoch timestamp format. Use endDateIso instead.
    - `lastModifierEmail` string, nullable: Email of the last modifier of the booking
    - `extBookingId` string, required: External booking id
    - `startDate` integer: [DEPRECATED] Start date of the booking in epoch timestamp format. Use startDateIso instead.
    - `extDemandId` string, nullable: External demand id for the demand associated with the booking
    - `employeeId` string, required: Employee id
    - `bookingStatus` 'pending' | 'approved' | 'rejected', required: Status of the booking. Possible values: ['pending', 'approved', 'rejected']
    - `bookingType` 'demand' | 'leave' | 'optional_holiday' | 'blocker', required: Type of the booking. Possible values: ['demand', 'leave', 'optional_holiday', 'blocker']
  - `capacity` number, float, required: Booked capacity of employee
  - `startDate` integer: [DEPRECATED] Start date of the booking. Use startDateIso instead.
  - `archivedAt` integer, nullable: Archived timestamp for the booking
  - `bookingStatus` 'pending' | 'approved' | 'rejected', required: Status of the booking. Possible values: ['pending', 'approved', 'rejected']
  - `bookingId` integer, nullable: Booking id
  - `demandId` integer, nullable: Demand id associated with the booking
  - `endDate` integer: [DEPRECATED] End date of the booking. Use endDateIso instead.
  - `updatedAt` integer, nullable: Updated timestamp for the booking
  - `employeeProfileId` integer, nullable: Profile ID of the employee
  - `bookingType` 'demand' | 'leave' | 'optional_holiday' | 'blocker', required: Type of the booking. Possible values: ['demand', 'leave', 'optional_holiday', 'blocker']
  - `endDateIso` string: End date of the booking in ISO format (YYYY-MM-DD)
  - `createdBy` string, nullable: User who created the booking
  - `employeeEmail` string, required: Email of employee

## Response `200`

OK

- BookingSchema
  - `createdAt` integer, nullable: Created timestamp for the booking
  - `updatedBy` string, nullable: User who updated the booking
  - `isArchived` boolean, nullable: A flag indicating if booking is archived
  - `startDateIso` string: Start date of the booking in ISO format (YYYY-MM-DD)
  - `extData` ExtBooking
    - `creatorEmail` string, required: Email of the creator of the booking
    - `createdAt` integer, required: Creation timestamp for the booking
    - `bookingId` integer, nullable: Internal booking ID
    - `startDateIso` string: Start date of the booking in ISO format (YYYY-MM-DD)
    - `endDateIso` string: End date of the booking in ISO format (YYYY-MM-DD)
    - `bookedCapacity` ExtBookingCapacityData
      - `unit` 'hours' | 'percentage' | 'fraction', required: Unit of capacity. Possible values: ['hours', 'percentage', 'fraction']
      - `timeGranularity` 'daily' | 'weekly' | 'monthly', nullable: Time granularity of capacity. Possible values: ['daily', 'weekly', 'monthly']
      - `capacity` number, float, required: Capacity value
    - `lastModifiedAt` integer, nullable: Last modified timestamp for the booking
    - `endDate` integer: [DEPRECATED] End date of the booking in epoch timestamp format. Use endDateIso instead.
    - `lastModifierEmail` string, nullable: Email of the last modifier of the booking
    - `extBookingId` string, required: External booking id
    - `startDate` integer: [DEPRECATED] Start date of the booking in epoch timestamp format. Use startDateIso instead.
    - `extDemandId` string, nullable: External demand id for the demand associated with the booking
    - `employeeId` string, required: Employee id
    - `bookingStatus` 'pending' | 'approved' | 'rejected', required: Status of the booking. Possible values: ['pending', 'approved', 'rejected']
    - `bookingType` 'demand' | 'leave' | 'optional_holiday' | 'blocker', required: Type of the booking. Possible values: ['demand', 'leave', 'optional_holiday', 'blocker']
  - `capacity` number, float, required: Booked capacity of employee
  - `startDate` integer: [DEPRECATED] Start date of the booking. Use startDateIso instead.
  - `archivedAt` integer, nullable: Archived timestamp for the booking
  - `bookingStatus` 'pending' | 'approved' | 'rejected', required: Status of the booking. Possible values: ['pending', 'approved', 'rejected']
  - `bookingId` integer, nullable: Booking id
  - `demandId` integer, nullable: Demand id associated with the booking
  - `endDate` integer: [DEPRECATED] End date of the booking. Use endDateIso instead.
  - `updatedAt` integer, nullable: Updated timestamp for the booking
  - `employeeProfileId` integer, nullable: Profile ID of the employee
  - `bookingType` 'demand' | 'leave' | 'optional_holiday' | 'blocker', required: Type of the booking. Possible values: ['demand', 'leave', 'optional_holiday', 'blocker']
  - `endDateIso` string: End date of the booking in ISO format (YYYY-MM-DD)
  - `createdBy` string, nullable: User who created the booking
  - `employeeEmail` string, required: Email of employee

---

[API](https://skmtc.dev/eightfold/apis/api-server-v2-service-service.md) - [All operations](https://skmtc.dev/eightfold/apis/api-server-v2-service-service/llms.txt) - [OpenAPI document](https://skmtc.dev/eightfold/apis/api-server-v2-service-service/revisions/9a8b3a927e93?raw)
