---
title: "Performs a complete cleanup of a booking in a single step"
method: POST
path: "/bookings/{bookingId}/cleanup"
tags: ["Bookings"]
---

# Performs a complete cleanup of a booking in a single step

`POST /bookings/{bookingId}/cleanup`

## Request

- Base URL: `https://s3p-osdm.cloud.sqills.com`
- URL: `https://s3p-osdm.cloud.sqills.com/bookings/{bookingId}/cleanup`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://login.microsoftonline.com/tbd`

The booking is cleaned up completely: confirmed items are refunded, and unconfirmed items are deleted.
-- Attention point: refundDate and overruleCode are deprecated request attributes and will be ignored

## Path parameters

- `bookingId` string, required

## Headers

- `Requestor` string
- `traceparent` string
- `tracestate` string
- `Idempotency-Key` string, uuid

## Request body

- BookingCleanupRequest: Request to cleanup a complete booking. Unconfirmed items will be deleted, any confirmed items will be refunded. There is no confirmation required. Attention point: refundDate and overruleCode are deprecated request attributes and will be ignored
  - `overruleCode` string: Reason for and type of an after sale, code list in IRS 90918-10. The PRM_SUPPORT_UNAVAILABLE overrule code shall only be used by the UIC PRM ABT tool. Values from the [Overrule Codes Code List](https://osdm.io/spec/catalog-of-code-lists/#OverruleCode) Listed values here are examples. - 'CONNECTION_BROKEN' - 'DEATH' - 'EQUIPMENT_FAILURE' - 'PAYMENT_FAILURE' - 'PRM_SUPPORT_UNAVAILABLE' - 'SALES_STAFF_ERROR' - 'STOP_NOT_SERVED' - 'STRIKE' - 'TECHNICAL_FAILURE' - 'TICKET_NOT_USED' - 'INABILITY_TO_TRAVEL': Inability to travel due to accident or sickness. - 'EXTERNAL_COMPENSATION': Offer has been compensated outside of the provider system in another way. - 'DISRUPTION': Inability to operate due to disruption. - 'JOURNEY_OBSOLETE': Due to external factors it's senseless to start the trip, thus the travel is obsolete. - 'CERTIFIED_MEDICAL_CONDITION': A medical certificate certifies that the passenger is unable to travel. - 'DELAY_COMPENSATION': Allows to override conditions in context of passenger rights regulation (PRR).
  - `refundDate` string, date-time, nullable: --Deprecated -- Indicates for passes the date taken as reference to compute possible partial refund. It is also the date taken as reference to invalidate the pass partially refunded.

## Response `202`

Cleanup successfully initiated

- WarningCollection: List of warnings. This structure has been deprecated and replaced by the problems array.
  - `warnings` Warning2[], required
    - `code` string, required
    - `type` string, uri, nullable: An absolute URI that identifies the warning type. When dereferenced, it SHOULD provide human-readable documentation for the problem type (e.g., using HTML).
    - `detail` string, nullable: A human readable explanation specific to this occurrence of the warning.
    - `instance` string, uri, nullable: An absolute URI that identifies the specific occurrence of the warning.

## Other responses

- `400`: Bad Request (400)
- `401`: Unauthorized (401)
- `403`: Forbidden (403)
- `404`: Not Found (404)
- `406`: Not Acceptable (406)
- `409`: Conflict (409)
- `415`: Unsupported Media Type (415)
- `500`: Internal Server Error (500)
- `501`: Not Implemented (501)
- `503`: Service Unavailable (503)
- `default`: default error response

## Changes

- **2026-10-22** `4b5d9b1df9c9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/unioninternationalcheminsdefer/apis/uic-90918-10-osdm/changes/bookings/:bookingId/cleanup/post.md)

---

[API](https://skmtc.dev/unioninternationalcheminsdefer/apis/uic-90918-10-osdm.md) - [All operations](https://skmtc.dev/unioninternationalcheminsdefer/apis/uic-90918-10-osdm/llms.txt) - [OpenAPI document](https://skmtc.dev/unioninternationalcheminsdefer/apis/uic-90918-10-osdm/revisions/f2e631e1357c?raw)
