Skip to content

Replace Booking Time ​

Use this endpoint to change the day and time of a booking that is in the cart. The API makes the same checks as for Add Item to Cart (V2). Use it when a customer must choose a new time because the first time is not available.

Endpoint ​

PATCH /v2/carts/booking/{cartItemId}

Path parameters ​

ParameterTypeDescription
cartItemIdstringID of the booking item in the cart.

Headers ​

Send Authorization (authenticated customer) or X-Session-Id (guest), and X-MerchantApiKey.

Request body ​

ParameterTypeRequiredDescription
bookingDatedate (YYYY-MM-DD)YesNew day of the booking.
bookingStartTimetime (HH:mm)YesNew start time.
bookingResourceIdstringNoID of the resource to book.

Example request ​

javascript
fetch('https://api.shopsynch.com/v2/carts/booking/67a6261a320f3f7368dfec35', {
  method: 'PATCH',
  headers: {
    'X-Session-Id': 'GUEST_SESSION_ID',
    'X-MerchantApiKey': 'MERCHANT_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ bookingDate: '2026-11-03', bookingStartTime: '14:30' })
})
  .then(response => response.json())
  .then(data => console.log(data));

Response 200 ​

The data field is the updated cart item (V2).

Error responses ​

StatusMessage
400Choose the new day. / Choose the new time.
400We could not find that booking in your cart.
400Only a booking can have its time changed.
400That time is too close to another booking in your cart.

Build with joy