> ## 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 inventory details by ID

> **Don't worry!** Existing integrations using input fields from the [Get Product](/api-partner/v2/products/get) response will continue to work for booking submissions—no changes are required in the interim. This endpoint is designed to handle the small number (~5%) of inventories where suppliers define inventory-specific input fields that differ from the variant definition, removing the need for manual intervention.

Fetch the exact customer input fields required for a specific inventory before creating a booking. While the fields returned by [Get Product](/api-partner/v2/products/get) are sufficient for most bookings, some inventories may require additional or overridden fields based on supplier configuration. Common examples include pickup location, drop-off address, nationality, passport number, meal preference, age, weight, or hotel name.

Use the returned field `id` (numeric string) as the key when submitting `inputFields` in the [Create booking](/api-partner/v2/bookings/create) request.

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

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "inventoryId": "520436588",
    "inputFields": [
      {
        "id": "8616",
        "type": "Phone",
        "name": "Phone",
        "description": null,
        "dataType": "STRING",
        "validation": {
          "regex": null,
          "minLength": null,
          "maxLength": 40,
          "minValue": null,
          "maxValue": null,
          "required": true
        },
        "level": "PRIMARY_CUSTOMER"
      },
      {
        "id": "227242",
        "type": "Custom",
        "name": "Pick-up details",
        "description": "Select your preferred pick-up point",
        "dataType": "ENUM",
        "validation": {
          "regex": null,
          "minLength": null,
          "maxLength": null,
          "minValue": null,
          "maxValue": null,
          "required": true,
          "values": {
            "type": "TEXT",
            "value": ["Ahern Hotel", "Airbnb (Residential Rentals)", "Alexis Park Resort"]
          }
        },
        "level": "ALL_CUSTOMER"
      },
      {
        "id": "340287",
        "type": "Custom",
        "name": "Pickup Location",
        "description": "Choose your pickup point",
        "dataType": "LOCATION",
        "validation": {
          "regex": null,
          "minLength": null,
          "maxLength": null,
          "minValue": null,
          "maxValue": null,
          "required": true,
          "values": {
            "type": "PREDEFINED_LOCATION",
            "value": [
              {
                "id": 480318,
                "latitude": 44.426767,
                "longitude": 26.102538,
                "address": "Bucharest, Romania",
                "displayName": "Z Executive Boutique Hotel",
                "timingConfig": {
                  "startTime": null,
                  "endTime": null,
                  "minPeriod": null,
                  "maxPeriod": null
                },
                "note": {
                  "content": "",
                  "language": "EN"
                }
              }
            ]
          }
        },
        "level": "PRIMARY_CUSTOMER"
      },
      {
        "id": "412051",
        "type": "Custom",
        "name": "Drop-off Address",
        "description": null,
        "dataType": "LOCATION",
        "validation": {
          "regex": null,
          "minLength": null,
          "maxLength": 200,
          "minValue": null,
          "maxValue": null,
          "required": false
        },
        "level": "PRIMARY_CUSTOMER"
      }
    ]
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /api/public/v2/inventories/{inventoryId}/
openapi: 3.1.0
info:
  title: Headout API Docs - API Partner 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/inventories/{inventoryId}/:
    get:
      tags:
        - Inventory
      summary: Get inventory details by ID
      operationId: v2GetInventoryDetails
      parameters:
        - name: inventoryId
          in: path
          required: true
          schema:
            type: integer
            format: int64
          description: >-
            The inventory ID to fetch booking fields for. Obtain this from the
            `id` field in the inventory listing response.
        - name: languageCode
          in: query
          required: false
          schema:
            type: string
            default: EN
          description: >-
            Language code for field names and predefined option labels (e.g.,
            `EN`, `ES`). Defaults to `EN`.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventorySlotDetails'
        '401':
          description: Missing or invalid `Headout-Auth`
        '403':
          description: Partner not authorised, or partner type is Affiliate
        '404':
          description: No inventory found for the given ID
      security:
        - apiKeyAuth: []
components:
  schemas:
    InventorySlotDetails:
      type: object
      description: Booking fields required for a specific inventory.
      properties:
        inventoryId:
          type: string
          description: The inventory ID as a string.
        inputFields:
          type: array
          items:
            $ref: '#/components/schemas/PartnerInputField'
          description: >-
            Fields to collect from customers before creating a booking for this
            inventory. Use the field `id` (numeric string) as the key when
            submitting in the booking request.
    PartnerInputField:
      type: object
      description: >-
        A field to collect from the customer before creating a booking for this
        inventory.
      properties:
        id:
          type: string
          description: >-
            Numeric field identifier (e.g., `"224713"`). Use this as the field
            key when submitting `inputFields` in the booking request.
        type:
          type: string
          description: >-
            Internal field type name (e.g., `"Full Name"`, `"Phone"`,
            `"Custom"`). For display reference only — use `name` for user-facing
            labels.
        name:
          type: string
          description: >-
            Human-readable label to display to the customer (e.g., `"Pick-up
            details"`, `"Passport Number"`).
        description:
          type: string
          nullable: true
          description: >-
            Optional helper text describing the field, shown to guide the
            customer (e.g., `"Choose your pickup point"`). Populated for
            supplier-defined `Custom` fields and localized to the request
            language (with an English fallback). `null` for standard fields
            (e.g., `Name`, `Email`, `Phone`) and for `Custom` fields with no
            description configured.
        dataType:
          type: string
          enum:
            - STRING
            - ENUM
            - BOOL
            - INT
            - FLOAT
            - LOCATION
          description: >-
            Expected data type for this field's value.

            - `STRING`: free-form text — apply `regex`, `minLength`, `maxLength`
            from `validation`.

            - `ENUM`: one of the values in `validation.values.value` — submitted
            value must exactly match one of the strings.

            - `BOOL`: boolean — submit as the string `"true"` or `"false"`.

            - `INT`: whole number — apply `minValue`, `maxValue` from
            `validation`.

            - `FLOAT`: decimal number — apply `minValue`, `maxValue` from
            `validation`.

            - `LOCATION`: pickup/drop-off location. If `validation.values` is
            present with `type: "PREDEFINED_LOCATION"`, render as a dropdown and
            submit the selected location's `id` or `displayName`. If
            `validation.values` is absent, accept a free-form address string.
        validation:
          $ref: '#/components/schemas/PartnerInputFieldValidation'
          description: >-
            Constraints that must be satisfied when submitting a value for this
            field.
        level:
          type: string
          enum:
            - PRIMARY_CUSTOMER
            - ALL_CUSTOMER
            - BOOKING
          description: >
            Who this field should be collected from.


            - `PRIMARY_CUSTOMER`: collect once from the lead guest only. Submit
            inside the `isPrimary: true` customer's `inputFields`.

            - `ALL_CUSTOMER`: collect from every guest in the booking. Submit
            inside every customer's `inputFields`.

            - `BOOKING`: collect once for the whole booking. Submit in the
            booking-level `variantInputFields` array.
    PartnerInputFieldValidation:
      type: object
      description: >-
        Constraints for a `PartnerInputField`. `values` is present only for
        `ENUM` and predefined-`LOCATION` fields; it is omitted for all other
        types.
      properties:
        regex:
          type:
            - string
            - 'null'
          description: >-
            Regular expression the submitted value must match. Null when not
            applicable.
        minLength:
          type:
            - integer
            - 'null'
          description: Minimum character count required. Null when not applicable.
        maxLength:
          type:
            - integer
            - 'null'
          description: Maximum character count allowed. Null when not applicable.
        minValue:
          type:
            - string
            - 'null'
          description: Minimum value for numeric fields. Null when not applicable.
        maxValue:
          type:
            - string
            - 'null'
          description: Maximum value for numeric fields. Null when not applicable.
        required:
          type: boolean
          description: Whether this field must be provided in the booking request.
        values:
          description: >-
            Predefined allowed values. Present only for `ENUM` fields and
            `LOCATION` fields with a predefined list; omitted otherwise.

            - `type: "TEXT"`: `value` is a `string[]` — submitted value must
            match one exactly.

            - `type: "PREDEFINED_LOCATION"`: `value` is an array of location
            objects (see `PredefinedLocation`) — submit the selected location's
            `id` or `displayName`.
          nullable: true
          type: object
          properties:
            type:
              type: string
              enum:
                - TEXT
                - PREDEFINED_LOCATION
              description: Discriminator for the shape of `value`.
            value:
              type: array
              description: >-
                The allowed values. String array for `TEXT`; predefined location
                objects for `PREDEFINED_LOCATION`.
              items:
                oneOf:
                  - type: string
                  - $ref: '#/components/schemas/PredefinedLocation'
    PredefinedLocation:
      type: object
      description: >-
        A predefined pickup or drop-off location for a `LOCATION` dataType input
        field.

        When `validation.values` contains objects of this type, render them as a
        dropdown.

        Submit either the selected location's `id` or its `displayName` as the
        input field value when creating a booking.
      properties:
        id:
          type: integer
          description: >-
            Unique identifier for this location. Submit this value or the
            location's `displayName` as the input field value when creating a
            booking.
        latitude:
          type: number
          format: double
          description: Latitude of the pickup/drop-off point in decimal degrees.
        longitude:
          type: number
          format: double
          description: Longitude of the pickup/drop-off point in decimal degrees.
        address:
          type: string
          description: >-
            Full street address of the location (e.g., "3600 S Las Vegas Blvd,
            Las Vegas, NV 89109, USA").
        displayName:
          type: string
          description: >-
            Short human-readable label for display in a dropdown or list (e.g.,
            "Bellagio").
        timingConfig:
          $ref: '#/components/schemas/LocationTimingConfig'
          description: Optional pickup timing constraints for this location.
        note:
          type:
            - object
            - 'null'
          description: >-
            Additional instructions for this pickup location. Null if no note
            exists.
          properties:
            content:
              type:
                - string
                - 'null'
              description: >-
                The note text (e.g., "Meet at the main entrance, not the side
                entrance.").
            language:
              type: string
              description: Language code for the note content (e.g., `EN`, `ES`).
    LocationTimingConfig:
      type: object
      description: >-
        Pickup timing constraints for a predefined location. All fields are
        nullable — null means no restriction applies.
      properties:
        startTime:
          type:
            - string
            - 'null'
          description: >-
            Earliest allowed pickup time in HH:mm format (e.g., `10:30`). Null
            if no earliest restriction.
        endTime:
          type:
            - string
            - 'null'
          description: >-
            Latest allowed pickup time in HH:mm format (e.g., `11:00`). Null if
            no latest restriction.
        minPeriod:
          type:
            - integer
            - 'null'
          description: >-
            Minimum advance notice required for this pickup, in minutes. Null if
            no minimum notice.
        maxPeriod:
          type:
            - integer
            - 'null'
          description: >-
            Maximum advance booking window for this pickup, in minutes. Null if
            no maximum window.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Headout-Auth

````