---
title: "Create a booking"
method: POST
path: "/bookings"
tags: ["Bookings"]
---

# Create a booking

`POST /bookings`

A booking is a temporary hold on a trip. It is not confirmed until the payment is processed.

## Request body

- Booking — A booking for a train trip.
  - `id` string, uuid — Unique identifier for the booking
  - `trip_id` string, uuid — Identifier of the booked trip
  - `passenger_name` string — Name of the passenger
  - `has_bicycle` boolean — Indicates whether the passenger has a bicycle.
  - `has_dog` boolean — Indicates whether the passenger has a dog.

## Response `201`

Booking successful

- object — A booking for a train trip.
  - `id` string, uuid — Unique identifier for the booking
  - `trip_id` string, uuid — Identifier of the booked trip
  - `passenger_name` string — Name of the passenger
  - `has_bicycle` boolean — Indicates whether the passenger has a bicycle.
  - `has_dog` boolean — Indicates whether the passenger has a dog.
  - `links` LinksSelf — The link to the current resource.
    - `self` string, uri

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `409` — Conflict
- `429` — Too Many Requests
- `500` — Internal Server Error

---

[API](https://skmtc.net/bump-sh-examples/apis/train-travel-api.md) · [All operations](https://skmtc.net/bump-sh-examples/apis/train-travel-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bump-sh-examples/train-travel-api/versions/f98baa492089/schema)
