# The Account booking object

> A booking of your agency in the account endpoints, whatever its product: flight, hotel, eSIM or transfer.

Source: https://fx-port.com/docs/api/objects/account-booking

The top level is a camelCase summary shared with the booking history; `record` is the stored booking in snake_case; flights and hotels add the price breakdown and the balance operations.

The amount debited from your agency balance is `netPrice`: `totalPrice` minus `agencyCommission`. Use `id` (a UUID) as your key for a booking: public references are not unique across suppliers.

## Attributes

- `product` (string): The product of the booking. One of `flights`, `hotels`, `esims`, `transfers`.
- `id` (string (uuid)): Internal id of the booking (UUID). Stable and unique: store it as your key.
- `bookingId` (string, deprecated): Legacy name: use `booking_id`. The public reference of the booking: the airline record locator of a flight (not unique across suppliers), the hotel booking id, `FX-` followed by a number for an eSIM, or the transfer reference. The older name of `booking_id`: same value, use `booking_id`.
- `booking_id` (string): The public reference of the booking: the airline record locator of a flight (not unique across suppliers), the hotel booking id, `FX-` followed by a number for an eSIM, or the transfer reference. The snake_case twin of `bookingId`, with the same value: use this name.
- `status` (string): State of the booking. The values depend on the product: for example `confirmed`, `awaiting_payment` (a held flight that is not paid), `cancelled`, `failed`, `refunded`, `partial_refund`.
- `environment` (string): The environment of the key that made the call: `sandbox` for fxp_test_ keys, `live` for fxp_live_ keys. Present in every JSON body. One of `sandbox`, `live`.
- `agencyId` (string (uuid), deprecated): Legacy name: use `agency_id`. The id of your agency. The older name of `agency_id`: same value, use `agency_id`.
- `agency_id` (string (uuid)): The id of your agency. The snake_case twin of `agencyId`, with the same value: use this name.
- `agentId` (string, nullable, deprecated): Legacy name: use `agent_id`. The user of your agency who created the booking, or null when it was created through an API key without a user. The older name of `agent_id`: same value, use `agent_id`.
- `agent_id` (string, nullable): The user of your agency who created the booking, or null when it was created through an API key without a user. The snake_case twin of `agentId`, with the same value: use this name.
- `currency` (string): Currency of the amounts: the settlement currency of your agency.
- `totalPrice` (number, deprecated): Legacy name: use `total_price`. What the traveler pays, in your agency currency. It includes your commission. The older name of `total_price`: same value, use `total_price`.
- `total_price` (number): What the traveler pays, in your agency currency. It includes your commission. The snake_case twin of `totalPrice`, with the same value: use this name.
- `netPrice` (number, deprecated): Legacy name: use `b2b_price`. The amount debited from your agency balance: `totalPrice` minus `agencyCommission`. The older name of `b2b_price`: same value, use `b2b_price`.
- `b2b_price` (number): The amount debited from your agency balance: `totalPrice` minus `agencyCommission`. The snake_case twin of `netPrice`, with the same value: use this name.
- `agencyCommission` (number, deprecated): Legacy name: use `agency_commission`. Your commission as an amount, in your agency currency. `0` when there is none. The older name of `agency_commission`: same value, use `agency_commission`.
- `agency_commission` (number): Your commission as an amount, in your agency currency. `0` when there is none. The snake_case twin of `agencyCommission`, with the same value: use this name.
- `providerName` (string, nullable, deprecated): Legacy name: use `provider_name`. Name of the supplier that fulfilled the booking. The older name of `provider_name`: same value, use `provider_name`.
- `provider_name` (string, nullable): Name of the supplier that fulfilled the booking. The snake_case twin of `providerName`, with the same value: use this name.
- `supplierId` (string, nullable, deprecated): Legacy name: use `supplier_id`. Id of the supplier that fulfilled the booking, as stored on the booking. It can differ from the id the supplier list uses: `ratehawk` and `airalo` here are `worldota_1` and `airalo_1` there. The older name of `supplier_id`: same value, use `supplier_id`.
- `supplier_id` (string, nullable): Id of the supplier that fulfilled the booking, as stored on the booking. It can differ from the id the supplier list uses: `ratehawk` and `airalo` here are `worldota_1` and `airalo_1` there. The snake_case twin of `supplierId`, with the same value: use this name.
- `createdAt` (string, deprecated): Legacy name: use `created_at`. When the booking was created: ISO 8601, UTC. The older name of `created_at`: same value, use `created_at`.
- `created_at` (string): When the booking was created: ISO 8601, UTC. The snake_case twin of `createdAt`, with the same value: use this name.
- `updatedAt` (string, deprecated): Legacy name: use `updated_at`. When the booking last changed: ISO 8601, UTC. The older name of `updated_at`: same value, use `updated_at`.
- `updated_at` (string): When the booking last changed: ISO 8601, UTC. The snake_case twin of `updatedAt`, with the same value: use this name.
- `departureAirport` (string): Flights only. IATA code of the first departure airport.
- `arrivalAirport` (string): Flights only. IATA code of the final arrival airport.
- `departureDate` (string): Flights only. Local departure date and time of the first segment, without a zone.
- `arrivalDate` (string): Flights and transfers. Local arrival date and time, without a zone for flights.
- `ticketNumber` (string, nullable): Flights only. The ticket number once issued, or null.
- `requireAcd` (boolean, nullable, deprecated): Legacy name: use `require_acd`. Flights only. Whether the booking needs ACD documents. The older name of `require_acd`: same value, use `require_acd`.
- `require_acd` (boolean, nullable): Flights only. Whether the booking needs ACD documents. The snake_case twin of `requireAcd`, with the same value: use this name.
- `voucherUrl` (string, nullable): Flights and hotels: the confirmation PDF with prices (same as `voucherUrlWithPrice`), null while it is generated. Transfers: the supplier voucher, null until a driver is assigned.
- `voucherUrlWithPrice` (string, nullable): Flights and hotels. The confirmation PDF with prices.
- `voucherUrlNoPrice` (string, nullable): Flights and hotels. The confirmation PDF without prices, to give to the traveler.
- `hotelId` (string): Hotels only. The id of the hotel.
- `hotelName` (string, nullable): Hotels only. The name of the hotel, or null when the supplier did not give one (a failed booking, for example).
- `checkinDate` (string): Hotels only. Check-in date: `YYYY-MM-DD`.
- `checkoutDate` (string): Hotels only. Check-out date: `YYYY-MM-DD`.
- `bookingMode` (string, nullable): Hotels only. How the booking was made, for example `standard`.
- `orderId` (string, deprecated): Legacy name: use `order_id`. eSIMs only. The supplier's order code. The older name of `order_id`: same value, use `order_id`.
- `order_id` (string): eSIMs only. The supplier's order code. The snake_case twin of `orderId`, with the same value: use this name.
- `type` (string): eSIMs only. `esim` for an order, `topup` for a topup. One of `esim`, `topup`.
- `packageName` (string, deprecated): Legacy name: use `package_name`. eSIMs only. Name of the package. The older name of `package_name`: same value, use `package_name`.
- `package_name` (string): eSIMs only. Name of the package. The snake_case twin of `packageName`, with the same value: use this name.
- `iccid` (string): eSIMs only. The ICCID of the eSIM.
- `customerEmail` (string, deprecated): Legacy name: use `customer_email`. eSIMs only. The traveler's email. The older name of `customer_email`: same value, use `customer_email`.
- `customer_email` (string): eSIMs only. The traveler's email. The snake_case twin of `customerEmail`, with the same value: use this name.
- `customer_first_name` (string): eSIMs only. The traveler's first name.
- `customer_last_name` (string): eSIMs only. The traveler's last name.
- `customer_phone` (string): eSIMs only. The traveler's phone number.
- `flightNumber` (string, nullable): Transfers only. The flight number the transfer was booked for.
- `receiptUrl` (string, nullable): Transfers only. FX-Port's receipt PDF, once the booking is confirmed.
- `record` (object): The stored record of the booking, in snake_case. The keys that exist depend on the product; a key that does not apply is absent.
  - `id` (string (uuid)): Internal id of the booking (UUID).
  - `booking_id` (string): The public reference of the booking.
  - `order_id` (string): eSIMs only. The supplier's order code.
  - `status` (string): State of the booking.
  - `currency` (string): Currency of the amounts.
  - `total_price` (number): What the traveler pays, in your agency currency.
  - `agency_commission` (number): Your commission as an amount.
  - `departure_airport` (string): Flights only. IATA code of the first departure airport.
  - `arrival_airport` (string): Flights only. IATA code of the final arrival airport.
  - `departure_date` (string): Flights only. Local departure date and time of the first segment.
  - `arrival_date` (string): Flights and transfers. Local arrival date and time.
  - `return_departure_date` (string, nullable): Flights only. Departure of the return trip, or null.
  - `return_arrival_date` (string, nullable): Flights only. Arrival of the return trip, or null.
  - `included_checked_bags` (string, nullable): Flights only. Checked bags included in the fare.
  - `ticket_number` (string, nullable): Flights only. The ticket number once issued, or null.
  - `require_acd` (boolean, nullable): Flights only. Whether the booking needs ACD documents.
  - `hotel_id` (string): Hotels only. The id of the hotel.
  - `hotel_name` (string): Hotels only. The name of the hotel.
  - `checkin_date` (string): Hotels only. Check-in date: `YYYY-MM-DD`.
  - `checkout_date` (string): Hotels only. Check-out date: `YYYY-MM-DD`.
  - `booking_mode` (string, nullable): Hotels only. How the booking was made.
  - `free_cancellation_deadline_at` (string, nullable): Hotels only. Until when the booking can be cancelled free of charge, or null.
  - `type` (string): eSIMs only. `esim` or `topup`. One of `esim`, `topup`.
  - `package_name` (string): eSIMs only. Name of the package.
  - `iccid` (string): eSIMs only. The ICCID of the eSIM.
  - `customer_email` (string): eSIMs only. The traveler's email.
  - `customer_first_name` (string): eSIMs only. The traveler's first name.
  - `customer_last_name` (string): eSIMs only. The traveler's last name.
  - `customer_phone` (string): eSIMs only. The traveler's phone number.
  - `provider_name` (string): eSIMs and transfers. Name of the supplier.
  - `supplier_id` (string): Hotels and eSIMs. Id of the supplier, as stored on the booking.
  - `flight_number` (string, nullable): Transfers only. The flight number.
  - `bucket_link` (string, nullable): Flights, hotels and transfers. The confirmation PDF with prices; for a transfer, FX-Port's receipt.
  - `bucket_link_no_price` (string, nullable): Flights and hotels. The confirmation PDF without prices.
  - `voucher_link` (string, nullable): Transfers only. The supplier voucher, once a driver is assigned.
  - `refund_amount` (number, nullable): Flights and hotels. The amount refunded, or null.
  - `refund_currency` (string, nullable): Flights and hotels. The currency of the refund, or null.
  - `refund_method` (string, nullable): Flights only. How the refund was made, or null.
  - `refunded_amount` (number, nullable): Transfers only. The amount refunded, or null.
  - `refunded_currency` (string, nullable): Transfers only. The currency of the refund, or null.
  - `paid_at` (string, nullable): Flights and hotels. When the booking was paid, or null.
  - `voided_at` (string, nullable): Flights only. When the ticket was voided, or null.
  - `created_at` (string): When the booking was created: ISO 8601, UTC.
  - `updated_at` (string): When the booking last changed: ISO 8601, UTC.
  - `environment` (string): The environment of the key that made the call: `sandbox` for fxp_test_ keys, `live` for fxp_live_ keys. Present in every JSON body. One of `sandbox`, `live`.
- `pricing` (array of object): Flights and hotels only. The price breakdown.
  - `id` (string (uuid)): Hotels only. Id of the pricing row.
  - `supplier_currency` (string): Flights only. The currency the supplier prices in.
  - `agency_currency` (string): The currency of your agency.
  - `base_price` (number): Flights only. The fare before taxes.
  - `taxes_and_fees` (number): Flights only. Taxes and fees, without your commission.
  - `total_price` (number): Hotels only. What the traveler pays.
  - `agency_commission` (number): Your commission as an amount.
  - `final_price` (number): Flights only. What the traveler pays: `base_price` plus `taxes_and_fees` plus `agency_commission`.
  - `b2b_price` (number): The amount debited from your agency balance: the total minus `agency_commission`.
  - `created_at` (string): When the row was written: ISO 8601, UTC.
  - `environment` (string): The environment of the key that made the call: `sandbox` for fxp_test_ keys, `live` for fxp_live_ keys. Present in every JSON body. One of `sandbox`, `live`.
- `travelerPricing` (array of object, deprecated): Legacy name: use `traveler_pricing`. Flights only. The price per traveler. The older name of `traveler_pricing`: same value, use `traveler_pricing`.
  - `traveler_id` (string): The traveler the row is for: the id of the traveler in the booking.
  - `traveler_type` (string): `ADULT`, `CHILD`, `INFANT` and so on.
  - `fare_option` (string): The fare option, for example `STANDARD`.
  - `supplier_currency` (string): The currency the supplier prices in.
  - `agency_currency` (string): The currency of your agency.
  - `base` (number): The fare of this traveler before taxes.
  - `total` (number): What this traveler's ticket costs the traveler.
  - `b2b_price` (number): The amount debited from your agency balance for this traveler.
  - `created_at` (string): When the row was written: ISO 8601, UTC.
  - `environment` (string): The environment of the key that made the call: `sandbox` for fxp_test_ keys, `live` for fxp_live_ keys. Present in every JSON body. One of `sandbox`, `live`.
- `traveler_pricing` (array of object): Flights only. The price per traveler. The snake_case twin of `travelerPricing`, with the same value: use this name.
  - `traveler_id` (string): The traveler the row is for: the id of the traveler in the booking.
  - `traveler_type` (string): `ADULT`, `CHILD`, `INFANT` and so on.
  - `fare_option` (string): The fare option, for example `STANDARD`.
  - `supplier_currency` (string): The currency the supplier prices in.
  - `agency_currency` (string): The currency of your agency.
  - `base` (number): The fare of this traveler before taxes.
  - `total` (number): What this traveler's ticket costs the traveler.
  - `b2b_price` (number): The amount debited from your agency balance for this traveler.
  - `created_at` (string): When the row was written: ISO 8601, UTC.
  - `environment` (string): The environment of the key that made the call: `sandbox` for fxp_test_ keys, `live` for fxp_live_ keys. Present in every JSON body. One of `sandbox`, `live`.
- `balanceOperations` (array of object, deprecated): Legacy name: use `balance_operations`. Flights and hotels only. The balance operations of the booking: empty in the sandbox. The older name of `balance_operations`: same value, use `balance_operations`.
  - `id` (string (uuid)): Id of the operation.
  - `type` (string): `debit`, `credit` or `refund`, in lower case.
  - `amount` (number): The amount, always positive.
  - `currency` (string): The currency of the operation.
  - `description` (string, nullable): A label of the operation.
  - `createdAt` (string, deprecated): Legacy name: use `created_at`. When the operation was recorded: ISO 8601, UTC. The older name of `created_at`: same value, use `created_at`.
  - `created_at` (string): When the operation was recorded: ISO 8601, UTC. The snake_case twin of `createdAt`, with the same value: use this name.
- `balance_operations` (array of object): Flights and hotels only. The balance operations of the booking: empty in the sandbox. The snake_case twin of `balanceOperations`, with the same value: use this name.
  - `id` (string (uuid)): Id of the operation.
  - `type` (string): `debit`, `credit` or `refund`, in lower case.
  - `amount` (number): The amount, always positive.
  - `currency` (string): The currency of the operation.
  - `description` (string, nullable): A label of the operation.
  - `createdAt` (string, deprecated): Legacy name: use `created_at`. When the operation was recorded: ISO 8601, UTC. The older name of `created_at`: same value, use `created_at`.
  - `created_at` (string): When the operation was recorded: ISO 8601, UTC. The snake_case twin of `createdAt`, with the same value: use this name.
