---
title: "Request sub-out for a booking"
method: POST
path: "/api/v1/bookings/{id}/sub-out"
tags: ["sub-out"]
---

# Request sub-out for a booking

`POST /api/v1/bookings/{id}/sub-out`

## Request

- Base URL: `http://localhost:3002`
- URL: `http://localhost:3002/api/v1/bookings/{id}/sub-out`
- Auth: HTTP bearer

Originating captain requests to sub out a booking they own. Creates a Referral in REQUESTED state.

## Path parameters

- `id` string, required

## Headers

- `Idempotency-Key` string, uuid: Client-supplied UUID v4. Repeat requests with the same key return the cached response.

## Request body

- SubOutRequestBody
  - `reason` string

## Response `201`

Referral created

- object
  - `data` SubOutReferral, required
    - `id` string, required
    - `sourceType` string, required
    - `sourceId` string, required
    - `bookingId` string, nullable, required
    - `subOutState` string, nullable, required
    - `subOutReason` string, nullable, required
    - `status` string, required
    - `targetType` string, required
    - `targetId` string, required
    - `currentOfferId` string, nullable
    - `offerExpiresAt` string, date-time, nullable
    - `ownerApproval` string, nullable

## Other responses

- `400`: Request body or query parameters failed validation.
- `401`: Authentication required, or the bearer token is missing or invalid.
- `403`: Authenticated but not permitted to access this resource.
- `404`: The requested resource does not exist (existence is not leaked).
- `409`: Idempotency-Key was reused with a different request body

---

[API](https://skmtc.dev/chartercaptain/apis/charter-captain-api.md) · [All operations](https://skmtc.dev/chartercaptain/apis/charter-captain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chartercaptain/apis/charter-captain-api/revisions/1ffea1113adb?raw)
