---
title: "Booking"
method: POST
path: "/book"
---

# Booking

`POST /book`

## Request

- Base URL: `https://api.cargoai.co/solutions`
- URL: `https://api.cargoai.co/solutions/book`
- Auth: API key in header `x-api-key`

This document outlines the process for booking with CargoCONNECT API.

## Headers

- `x-api-key` string, required

## Request body

- object
  - `user` object, required: User details. `iata`, `cass` and `country` must match one of the authorized offices of your API key. Otherwise the booking fails with HTTP 403 and the error `user information does not match between search and booking`.
    - `email` string, required: Freight Forwarder's email address
    - `companyName` string: Freight Forwarder's company name
    - `lastName` string, required: Freight Forwarder's last name
    - `firstName` string, required: Freight Forwarder's first name
    - `iata` string, required: Freight Forwarder's IATA code
    - `cass` string, required: Freight Forwarder's Cass code
    - `country` string, required: Freight Forwarder's country code
  - `flightUUID` string: Flight UUID selected from search (required for Classic Booking)
  - `rateId` string: Rate ID selected from search (required for Classic Booking)
  - `itinerary` object: Flight information to perform search/flight selection before booking (required for Direct Booking)
    - `origin` string, required: Origin airport code
    - `destination` string, required: Destination airport code
    - `airlineCode` string: AirlineCode for results filtering
    - `departureDates` string[], required: List of wanted departure dates
    - `flightNumbers` string[]: List of wanted flight numbers
    - `allotmentCode` string: Identifier of your allotment in the airline's system (can be used in Direct booking) (to be deprecated — put "allotmentCode" at the root level)
  - `shipment` object: Shipment details (required for Direct Booking)
    - `pieces` integer, required: Total number of pieces of your shipment
    - `weight` number, float, required: Total gross weight of your shipment (kg)
    - `volume` number, float, required: Total volume of your shipment (cbm)
    - `dimensions` object[]: Detailed description of the piece groups of your shipment (fake dimensions are calculated if not provided)
      - `pieces` integer, required: number of piece of the piece group
      - `length` number, float, required: indicates length of piece group (cm)
      - `width` number, float, required: indicates width of piece group (cm)
      - `height` number, float, required: indicates height of piece group (cm)
      - `weight` number, float, required: indicates piece group weight (per piece or total, based on weightType field value) (kg)
      - `loadType` 'DIMENSIONS' | 'TOTAL' | 'BUP', required: indicates if the shipment information are totals only or with dimensions breakdown
      - `weightType` 'PER_ITEM' | 'TOTAL', required: indicates if piece group weight is total or per piece
      - `stackable` boolean: indicates if shipment can be stack during loading in aircraft. when no dimensions are provided, will be set true to maximize search results
      - `tiltable` boolean: indicates if shipment is turnable during loading in aircraft
      - `toploadable` boolean: indicates if shipment can be loaded on top during loading in aircraft
      - `volume` number, float: volume of the piece group
      - `uldType` '"AKE"' | '"LDP"' | '"MDP"': ULD type of the piece group (can be used in Direct booking) (required if the SHC/the LoadType is "BUP")
    - `chargeableWeight` number, float: Total chargeable weight of your shipment (calculated if not provided) (kg)
    - `measurementUnit` string: Measurement Unit ("METRIC" or "IMPERIAL")
    - `product` string: Product name
    - `globalHS` string[]: Global Harmonized System Codes
    - `europeanHS` string[]: European Harmonized System Codes
    - `scrs` string[]: Special Commodity Rate Codes
    - `specialHandlingCodes` string[]: Special handling codes three letter codes to provide additionnal details about shipment handling
  - `awb` string: Air waybill prefix and number (required if "awbOptional" of associated flight is false)
  - `comment` string: Remark about your booking or additional details about handling
  - `handlingCodes` string[]: List of special handling codes for your booking
  - `id` string: Direct Booking Request Id to add to params before repeating request to get updated results
  - `allotmentCode` string: Identifier of your allotment in the airline's system (can be used in Direct booking)

## Response `200`

200

- object
  - `flightUUID` string
  - `bookingStatus` string
  - `awb` string
  - `handlingCodes` string[]

## Other responses

- `202`: 202
- `400`: 400
- `403`: 403
- `502`: 502
- `5XX`: 5XX

## Changes

- **2026-11-03** `dfd7950d43d7`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cargoai/apis/solutions/changes/book/post.md)

---

[API](https://skmtc.dev/cargoai/apis/solutions.md) - [All operations](https://skmtc.dev/cargoai/apis/solutions/llms.txt) - [OpenAPI document](https://skmtc.dev/cargoai/apis/solutions/revisions/dfd7950d43d7?raw)
