> ## Documentation Index
> Fetch the complete documentation index at: https://partner.headout.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get booking by ID

Retrieve full details for a single booking attributed to your affiliate account. Returns `404` if the booking does not exist or does not belong to your account.

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl --location 'https://www.headout.com/api/public/v2/affiliate/bookings/<BOOKING_ID>/' \
  --header 'Headout-Auth: <YOUR_API_KEY>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "bookingId": "32435721",
    "status": "PENDING",
    "creationTimestamp": 1782812820,
    "startDateTime": "2026-07-15T10:00:00Z",
    "numberOfGuests": 2,
    "product": {
      "id": "5246",
      "name": "Madame Tussauds London — Advance Purchase",
      "city": "London",
      "country": "United Kingdom",
      "variants": [
        {
          "id": "18432",
          "name": "General Admission"
        }
      ]
    },
    "price": {
      "currencyCode": "GBP",
      "amount": 34.13,
      "amountUSD": 45.20,
      "couponCode": null,
      "couponDiscount": null,
      "couponDiscountUSD": null
    },
    "commission": {
      "partnerEarningsUSD": 4.57
    },
    "attribution": {
      "attributionType": "WEB",
      "utmSource": "newsletter",
      "utmMedium": "email",
      "utmCampaign": "summer-london"
    },
    "user": {
      "language": "en",
      "country": "GB",
      "device": "WEB"
    }
  }
  ```

  ```json 404 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "error": {
      "code": "404",
      "title": "Not Found",
      "message": "Booking not found for this affiliate"
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml specs/openapi-v2-affiliate.yaml GET /api/public/v2/affiliate/bookings/{bookingId}/
openapi: 3.1.0
info:
  title: Headout API Docs - Affiliate v2
  version: 0.0.1
servers:
  - url: https://www.headout.com
    description: Production server
  - url: https://www.sandbox-headout.com
    description: Sandbox server
security: []
paths:
  /api/public/v2/affiliate/bookings/{bookingId}/:
    get:
      tags:
        - Bookings
      summary: Get booking by ID
      operationId: v2AffiliateGetBooking
      parameters:
        - name: bookingId
          in: path
          required: true
          schema:
            type: integer
          description: The booking ID to retrieve.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AffiliateBooking'
        '401':
          description: Missing or invalid API key
        '403':
          description: API key is not an AFFILIATE type partner
        '404':
          description: Booking not found or does not belong to this affiliate
      security:
        - apiKeyAuth: []
components:
  schemas:
    AffiliateBooking:
      type: object
      description: A single booking attributed to the affiliate.
      properties:
        bookingId:
          type: string
          description: >-
            Unique booking identifier. Use this as the `{bookingId}` path
            parameter in the Get Booking endpoint.
        status:
          type: string
          enum:
            - PENDING
            - COMPLETED
            - CANCELLED
          description: >-
            Current status of the booking. `CANCELLED` bookings have
            `commission.partnerEarningsUSD` set to `0`.
        creationTimestamp:
          type: integer
          format: int64
          description: Unix epoch timestamp (seconds) when this booking was first created.
        startDateTime:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Scheduled start date and time of the experience (ISO 8601, UTC).
            Null for open-dated products.
        numberOfGuests:
          type: integer
          description: Total number of guests in the booking.
        product:
          $ref: '#/components/schemas/AffiliateBookingProduct'
        price:
          $ref: '#/components/schemas/AffiliateBookingPrice'
        commission:
          $ref: '#/components/schemas/AffiliateBookingCommission'
        attribution:
          $ref: '#/components/schemas/AffiliateBookingAttribution'
        user:
          $ref: '#/components/schemas/AffiliateBookingUser'
    AffiliateBookingProduct:
      type: object
      description: Product information for the booking.
      properties:
        id:
          type: string
          description: Headout product (tour group) ID.
        name:
          type: string
          description: Product name.
        city:
          type: string
          description: City where the experience takes place.
        country:
          type: string
          description: Country where the experience takes place.
        variants:
          type: array
          description: Variant booked. Contains one entry.
          items:
            $ref: '#/components/schemas/AffiliateBookingVariant'
    AffiliateBookingPrice:
      type: object
      description: Pricing details in the tour's local currency, plus USD equivalents.
      properties:
        currencyCode:
          type: string
          description: >-
            ISO 4217 currency code for `amount` and `couponDiscount` (e.g.,
            `USD`, `GBP`, `EUR`).
        amount:
          type: number
          description: Amount paid by the customer in the tour's local currency.
        amountUSD:
          type: number
          description: >-
            Amount paid by the customer in USD, converted using the exchange
            rate at the time of booking.
        couponCode:
          type:
            - string
            - 'null'
          description: Coupon code applied to this booking, if any.
        couponDiscount:
          type:
            - number
            - 'null'
          description: >-
            Coupon discount amount in the tour's local currency. Null if no
            coupon was applied.
        couponDiscountUSD:
          type:
            - number
            - 'null'
          description: Coupon discount amount in USD. Null if no coupon was applied.
    AffiliateBookingCommission:
      type: object
      description: Earnings for this booking in USD.
      properties:
        partnerEarningsUSD:
          type: number
          description: >
            Your earnings for this booking in USD. Always `0` for `CANCELLED`
            bookings. For `NET_PLUS` commercial model bookings, this is derived
            from `partnerAmount` converted to USD using the exchange rate
            captured at booking time.
    AffiliateBookingAttribution:
      type: object
      description: Attribution details for this booking.
      properties:
        attributionType:
          type: string
          enum:
            - WEB
            - APP
            - COUPON
          description: >
            How the booking was attributed to your account. `WEB` — cookie-based
            web attribution via your deep-link. `APP` — attributed via mobile
            app. `COUPON` — attributed via a coupon code with your affiliate
            prefix.
        utmSource:
          type:
            - string
            - 'null'
          description: >-
            UTM source captured from the affiliate click cookie. Null if not
            set.
        utmMedium:
          type:
            - string
            - 'null'
          description: >-
            UTM medium captured from the affiliate click cookie. Null if not
            set.
        utmCampaign:
          type:
            - string
            - 'null'
          description: >-
            UTM campaign captured from the affiliate click cookie. Null if not
            set.
    AffiliateBookingUser:
      type: object
      description: Basic user information for the booking.
      properties:
        language:
          type:
            - string
            - 'null'
          description: >-
            BCP 47 language code of the user at the time of booking (e.g., `en`,
            `de`, `fr`).
        country:
          type:
            - string
            - 'null'
          description: >-
            ISO 3166-1 alpha-2 country code of the user's home country (e.g.,
            `US`, `GB`, `IN`).
        device:
          type: string
          enum:
            - WEB
            - APP
          description: Platform the user was on when the booking was made.
    AffiliateBookingVariant:
      type: object
      description: Variant details for the booking.
      properties:
        id:
          type: string
          description: Headout variant (tour) ID.
        name:
          type: string
          description: Variant name.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Headout-Auth

````