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

> ## Agent Instructions
> This site documents the D-EDGE APIs for technology partners (web agencies, OTAs, PMS and RMS vendors, booking and CRM tools). It is written for developers integrating with hotels that use the D-EDGE platform.
> Seven APIs, grouped by domain. Connectivity: Channel Manager API (distribute a hotel's inventory to your channel and send bookings back). Pricing & Availability: Best Price API (best offers to highlight), Quotation API (all bookable offers for a stay), Daily Rates API (daily availability between two dates). Booking: Booking Engine API (a hotel's full direct booking funnel), Gift Shop API (gift vouchers from catalogue to payment). Guest Management: CRM API (guest profiles).
> Pick the API by the need: to display prices, use the Best Price API or the Daily Rates API; to quote a specific stay, use the Quotation API; to book, use the Booking Engine API; to sell gift vouchers, use the Gift Shop API; to manage guest profiles, use the CRM API; to receive hotel inventory and send bookings back as a distribution channel, use the Channel Manager API.
> Base URLs, hotel identifiers, and credentials are delivered by the D-EDGE partnership team during onboarding. Do not invent base URLs, endpoints, parameters, or example credentials that do not appear on these pages.
> Authentication differs per API: OAuth 1.0 for Best Price, Quotation, Daily Rates, and Booking Engine; an X-API-KEY header for Gift Shop; OAuth 2.0 client credentials for CRM; partner-defined credentials carried in the XML message for the Channel Manager API. Read each API's Authentication page before writing code.
> A mock environment returns realistic but fictitious data without credentials. The Postman and Insomnia collections on the API collections page target it by default. Use it for exploration and tests, never for production traffic.
> Use the official names exactly: D-EDGE, D-EDGE platform, Channel Manager API, partnership team. Do not use Back Office or Extranet.
> Each API has a Changelog page. Check it for the current behaviour before relying on an older answer. For questions these pages do not answer, direct the reader to the Contact us page.

# Returns the session metadata

> Returns the session metadata



## OpenAPI

````yaml booking-engine-api/open-api/booking-engine-api.json GET /v2/{sessionId}/session/metadata
openapi: 3.0.1
info:
  title: Booking Engine API
  version: v2
servers:
  - url: https://{apiBaseUrl}
    variables:
      apiBaseUrl:
        default: api.example.com
        description: Base URL delivered by D-EDGE during partnership setup
security: []
tags:
  - name: Basket
  - name: Booking
  - name: Configuration
  - name: Description
  - name: Loyalty
  - name: Promotion
  - name: Resources
  - name: Search
  - name: Session
paths:
  /v2/{sessionId}/session/metadata:
    get:
      tags:
        - Session
      summary: Returns the session metadata
      description: "This endpoint provides information related to the session:\r\n* `pendingBasketId` is the internal id used for redirecting the hub basket for usage on the SmartBE application. If you modify the Hub session basket, you must call this endpoint again in order to get the latest D-EDGE API pending basket. If the basket is empty, the pendingBasketId is empty\r\n* `visitId`, `avpCampaignId` and `trackingId` are ids passed in the create session endpoint, used for tracking the session on the different trackers used by the CoreBE.\r\n* `OriginalSearchCriteria` contains the search context passed to the create session endpoint."
      operationId: Session_GetMetadata
      parameters:
        - name: X-AVP-Impersonation
          in: header
          description: ''
          required: false
          schema:
            type: string
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session.HubSessionMetadata'
              examples:
                response:
                  value:
                    originalSearchCriteria:
                      stayPeriod:
                        arrivalDate: '2026-06-08T00:00:00Z'
                        departureDate: '2026-06-13T00:00:00Z'
                      guests:
                        - adults: 2
                          children: 0
                          infants: 0
                          position: 1
                          memberLevel: 0
                      selectedHotelId: '10133'
                      selectedRoomCode: '29513'
                      highlightedRateCode: '32643'
                      promoCode: DISCOUNT
                      excludeMixedRates: false
                      disableCrossSell: false
                      isMobile: false
                    pendingBasketId: 8a48119f-8928-496b-a341-64db026baa35
                    quoteId: 00000000-0000-0000-0000-000000000000
                    customTrackingValues:
                      visitId: visit-id
                      avp_campaign: avp-campaign-id
                      trackingid: trackingid
                    geonameId: 0
                    guestDetails: []
                    quoteServices: []
                    quotePaymentModes: []
                    editedExtras: []
                    crs: Availpro
                    sessionDuration: '00:00:00'
            text/json:
              schema:
                $ref: '#/components/schemas/Session.HubSessionMetadata'
              examples:
                response:
                  value:
                    originalSearchCriteria:
                      stayPeriod:
                        arrivalDate: '2026-06-08T00:00:00Z'
                        departureDate: '2026-06-13T00:00:00Z'
                      guests:
                        - adults: 2
                          children: 0
                          infants: 0
                          position: 1
                          memberLevel: 0
                      selectedHotelId: '10133'
                      selectedRoomCode: '29513'
                      highlightedRateCode: '32643'
                      promoCode: DISCOUNT
                      excludeMixedRates: false
                      disableCrossSell: false
                      isMobile: false
                    pendingBasketId: 8a48119f-8928-496b-a341-64db026baa35
                    quoteId: 00000000-0000-0000-0000-000000000000
                    customTrackingValues:
                      visitId: visit-id
                      avp_campaign: avp-campaign-id
                      trackingid: trackingid
                    geonameId: 0
                    guestDetails: []
                    quoteServices: []
                    quotePaymentModes: []
                    editedExtras: []
                    crs: Availpro
                    sessionDuration: '00:00:00'
        '400':
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/BookingEngine.Hub.Service.Controllers.ErrorResponse_Exceptions.HubErrorType_
              examples:
                response:
                  value:
                    code: InvalidSessionId
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/BookingEngine.Hub.Service.Controllers.ErrorResponse_Exceptions.HubErrorType_
              examples:
                response:
                  value:
                    code: InvalidSessionId
        '401':
          description: >-
            Authentication header is invalid or does not give access to the
            operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/BookingEngine.Hub.Service.Controllers.ErrorResponse_BookingEngine.Hub.Service.Config.SecurityErrorType_
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/BookingEngine.Hub.Service.Controllers.ErrorResponse_BookingEngine.Hub.Service.Config.SecurityErrorType_
components:
  schemas:
    Session.HubSessionMetadata:
      required:
        - originalSearchCriteria
        - customTrackingValues
        - guestDetails
        - quoteServices
        - quotePaymentModes
        - editedExtras
        - pendingBasketId
        - quoteId
        - geonameId
        - crs
        - sessionDuration
      type: object
      properties:
        originalSearchCriteria:
          default:
            stayPeriod:
              arrivalDate: '0001-01-01'
              departureDate: '0001-01-01'
            guests: []
            selectedHotelId: '0'
            excludeMixedRates: false
            disableCrossSell: false
            isMobile: false
          allOf:
            - $ref: '#/components/schemas/Session.HubSearchContext'
        pendingBasketId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        quoteId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        customTrackingValues:
          default: {}
          type: object
          additionalProperties:
            type: string
        application:
          type: string
        device:
          type: string
        geonameId:
          $ref: '#/components/schemas/Library.Geography.ToponymId'
        customerDetails:
          $ref: '#/components/schemas/Basket.HubCustomerDetails'
        guestDetails:
          default: []
          type: array
          items:
            $ref: '#/components/schemas/Basket.HubGuestDetail'
        quoteServices:
          default: []
          type: array
          items:
            $ref: '#/components/schemas/Basket.HubBookingServiceType'
        quotePaymentModes:
          default: []
          type: array
          items:
            type: string
        editedExtras:
          default: []
          type: array
          items:
            $ref: '#/components/schemas/Basket.HubEditedExtra'
        crs:
          $ref: '#/components/schemas/Common.HubCrs'
        sessionDuration:
          format: time
          type: string
    BookingEngine.Hub.Service.Controllers.ErrorResponse_Exceptions.HubErrorType_:
      allOf:
        - $ref: >-
            #/components/schemas/BookingEngine.Hub.Service.Controllers.ErrorResponse
        - required:
            - code
          type: object
          properties:
            code:
              $ref: '#/components/schemas/Exceptions.HubErrorType'
    BookingEngine.Hub.Service.Controllers.ErrorResponse_BookingEngine.Hub.Service.Config.SecurityErrorType_:
      allOf:
        - $ref: >-
            #/components/schemas/BookingEngine.Hub.Service.Controllers.ErrorResponse
        - required:
            - code
          type: object
          properties:
            code:
              $ref: >-
                #/components/schemas/BookingEngine.Hub.Service.Config.SecurityErrorType
    Session.HubSearchContext:
      description: "This represent the parameters used to configure future call to the service.\r\nIt represents more or less the data entered by the final customer."
      required:
        - stayPeriod
        - guests
        - selectedHotelId
        - excludeMixedRates
        - disableCrossSell
        - isMobile
      type: object
      properties:
        stayPeriod:
          default:
            arrivalDate: '0001-01-01'
            departureDate: '0001-01-01'
          allOf:
            - $ref: '#/components/schemas/Session.HubStayPeriod'
        guests:
          default: []
          type: array
          items:
            $ref: '#/components/schemas/Session.HubBookingGuests'
        selectedHotelId:
          description: "The currently selected hotel id.\r\nCould be zero when starting a session for a multi hotel booking engine.\r\nAutomatically set when starting a session for a mono hotel booking engine."
          allOf:
            - $ref: '#/components/schemas/Common.HubHotelId'
        selectedRoomCode:
          type: string
        selectedRateCode:
          type: string
        highlightedRateCode:
          type: string
        highlightedRoomCode:
          type: string
        highlightedHotelCode:
          type: string
        promoCode:
          description: "The promo code requested for the session.\r\nIt could be either an OfferCode or a RateCode."
          type: string
        excludeMixedRates:
          description: >-
            Configure whether the search results should include mixed rates or
            not.
          type: boolean
        disableCrossSell:
          description: >-
            Configure whether the search results should return cross sell
            configuration when no rooms are available.
          type: boolean
        gpsPosition:
          description: If defined the search results should be based on user's location.
          allOf:
            - $ref: '#/components/schemas/Common.HubGpsPosition'
        isMobile:
          description: Configure whether the request came from a mobile or not.
          type: boolean
      example:
        stayPeriod:
          arrivalDate: '2026-06-08T00:00:00Z'
          departureDate: '2026-06-13T00:00:00Z'
        guests:
          - adults: 2
            children: 0
            infants: 0
            position: 1
            memberLevel: 0
        selectedHotelId: '10133'
        selectedRoomCode: '29513'
        highlightedRateCode: '32643'
        promoCode: DISCOUNT
        excludeMixedRates: false
        disableCrossSell: false
        isMobile: false
    Library.Geography.ToponymId:
      format: int32
      type: integer
    Basket.HubCustomerDetails:
      required:
        - addressLines
        - title
      type: object
      properties:
        title:
          $ref: '#/components/schemas/Basket.HubGuestTitle'
        firstName:
          type: string
        lastName:
          type: string
        countryCode:
          description: The country where the customer live.
          type: string
        phoneNumber:
          description: "The phone number of the customer.\r\nIt is validated against the phoneConstraint associated with the PhoneCountryCode."
          type: string
        phoneCountryCode:
          description: >-
            The country used to validate the phone number and define the
            international prefix.
          type: string
        emailAddress:
          description: Must be a valid email address.
          type: string
        addressLines:
          default: []
          type: array
          items:
            type: string
        state:
          type: string
        cityName:
          type: string
        postalCode:
          type: string
        arrivalTime:
          format: time
          description: The time of arrival. Must be between 00:00 and 24:00.
          type: string
        faxNumber:
          type: string
        marketingConsent:
          description: Marketing consent.
          allOf:
            - $ref: '#/components/schemas/Basket.HubMarketingConsent'
    Basket.HubGuestDetail:
      required:
        - itemNumber
        - title
        - type
        - roomId
        - occupancyId
      type: object
      properties:
        title:
          $ref: '#/components/schemas/Basket.HubGuestTitle'
        type:
          $ref: '#/components/schemas/Basket.HubGuestType'
        firstName:
          type: string
        lastName:
          type: string
        roomId:
          description: The id of the room in which the guest will stay.
          allOf:
            - $ref: '#/components/schemas/HotelBusiness.RoomId'
        occupancyId:
          description: The id of the occupancy in which the guest will stay.
          allOf:
            - $ref: '#/components/schemas/HotelBusiness.OccupancyId'
        itemNumber:
          format: int32
          description: >-
            The room identifier number (1-based) in the basket in order to
            identify each room in guest distribution process
          default: 1
          type: integer
    Basket.HubBookingServiceType:
      description: >-
        Ancillary service attached to a booking alongside rooms and extras.


        - **Insurance** — Insurance subscribed during the booking flow.

        - **SmsConfirmation** — SMS booking confirmation service.

        - **OfferCode** — Private offer code granting access to hidden rates or
        discounted price.

        - **PublicOffer** — Public promotional offer applied to the booking.

        - **CallOption** — Booking placed as a call option - reserves the slot
        for a CRS-configured amount of time with a price penalty if the booking
        is not completed on time.

        - **AdditionalDiscount** — Extra discount applied on top of the base
        price.
      enum:
        - Insurance
        - SmsConfirmation
        - OfferCode
        - PublicOffer
        - CallOption
        - AdditionalDiscount
      type: string
    Basket.HubEditedExtra:
      required:
        - extraId
        - roomId
        - guestPosition
      type: object
      properties:
        extraId:
          $ref: '#/components/schemas/HotelBusiness.ExtraId'
        roomId:
          $ref: '#/components/schemas/HotelBusiness.RoomId'
        guestPosition:
          $ref: '#/components/schemas/Common.HubGuestPosition'
    Common.HubCrs:
      description: >-
        Central Reservation System that owns the underlying inventory and
        booking flow.
      enum:
        - Availpro
      type: string
    BookingEngine.Hub.Service.Controllers.ErrorResponse:
      type: object
      properties:
        message:
          type: string
    Exceptions.HubErrorType:
      description: >-
        Machine-readable error code returned by the Hub API when a request
        cannot be fulfilled. Integrators should switch on this value to decide
        how to recover (retry, adjust input, show a message, etc.).


        - **InvalidHotelId** — The provided hotel identifier does not exist.

        - **EngineConfigNotFound** — No engine configuration was found for the
        requested hotel.

        - **InvalidBasket** — The basket referenced by the request is invalid or
        has been discarded.

        - **InvalidPromoCode** — The promotional code is unknown or not
        applicable to the current context.

        - **InvalidPromoCodeBookingPeriod** — The promotional code is not valid
        for the booking date range.

        - **InvalidPromoCodeStayPeriod** — The promotional code is not valid for
        the requested stay period.

        - **InvalidPromoCodeDevice** — The promotional code is not valid for the
        current device or channel.

        - **InvalidRateId** — The provided rate identifier does not exist.

        - **InvalidRoomId** — The provided room identifier does not exist.

        - **InvalidGuestPosition** — The provided guest position is invalid (out
        of range or malformed).

        - **InvalidRoomQuantity** — The requested room quantity is invalid
        (typically zero, negative or above the allowed maximum).

        - **InvalidSessionCulture** — The session culture (language) is not
        supported.

        - **InvalidSessionCurrency** — The session currency is not supported.

        - **InvalidSessionId** — The session identifier is unknown or expired.

        - **InvalidSessionFilter** — The session filter is invalid or
        inconsistent with the session context.

        - **UnavailableRoom** — The requested room is not available for the
        given search context.

        - **InvalidStayPeriod** — The requested stay period is invalid (e.g.
        arrival after departure, past dates, out of window).

        - **InvalidExtraId** — The provided extra identifier does not exist.

        - **UnavailableExtra** — The requested extra is not available for the
        given search context.

        - **InvalidSessionUpdate** — The session update payload is invalid.

        - **InvalidSessionDuration** — The session duration is invalid
        (typically outside the configured min/max).

        - **InvalidOccupancyId** — The provided occupancy identifier does not
        exist.

        - **UnavailableQuantity** — The requested quantity is not available in
        inventory.

        - **InvalidQuote** — The quote referenced by the request is invalid or
        has expired.

        - **InvalidGuests** — The guest declaration is invalid (missing,
        inconsistent with the room, etc.).

        - **InvalidAcceptQuoteRequest** — The accept-quote request is invalid;
        see HubInvalidAcceptQuoteRequestException.ValidationErrors for the list
        of offending fields.

        - **InvalidSessionCountryCode** — The session country code is invalid or
        not supported.

        - **InvalidSearchParameter** — A search parameter has an invalid value.

        - **InvalidLoyaltySession** — The loyalty session is invalid or expired.

        - **InvalidBeddingConfigurationId** — The provided bedding configuration
        identifier does not exist.

        - **InvalidGuestsChildrenNotSupported** — The request includes children
        but the hotel does not accept children.

        - **InvalidGuestsInfantsNotSupported** — The request includes infants
        but the hotel does not accept infants.

        - **LoyaltyProviderGenericError** — The loyalty provider returned a
        generic error not mapped to a specific code.

        - **LoyaltyProviderTokenExpired** — The loyalty provider token has
        expired; the caller must re-authenticate the loyalty session.

        - **InvalidRoomCapacity** — The room capacity constraint is violated by
        the requested guest count.

        - **InvalidGuestsChildrenAges** — One or more children ages fall outside
        the hotel's accepted range.

        - **InvalidGuestsInfantsAges** — One or more infants ages fall outside
        the hotel's accepted range.
      enum:
        - InvalidHotelId
        - EngineConfigNotFound
        - InvalidBasket
        - InvalidPromoCode
        - InvalidPromoCodeBookingPeriod
        - InvalidPromoCodeStayPeriod
        - InvalidPromoCodeDevice
        - InvalidRateId
        - InvalidRoomId
        - InvalidGuestPosition
        - InvalidRoomQuantity
        - InvalidSessionCulture
        - InvalidSessionCurrency
        - InvalidSessionId
        - InvalidSessionFilter
        - UnavailableRoom
        - InvalidStayPeriod
        - InvalidExtraId
        - UnavailableExtra
        - InvalidSessionUpdate
        - InvalidSessionDuration
        - InvalidOccupancyId
        - UnavailableQuantity
        - InvalidQuote
        - InvalidGuests
        - InvalidAcceptQuoteRequest
        - InvalidSessionCountryCode
        - InvalidSearchParameter
        - InvalidLoyaltySession
        - InvalidBeddingConfigurationId
        - InvalidGuestsChildrenNotSupported
        - InvalidGuestsInfantsNotSupported
        - LoyaltyProviderGenericError
        - LoyaltyProviderTokenExpired
        - InvalidRoomCapacity
        - InvalidGuestsChildrenAges
        - InvalidGuestsInfantsAges
      type: string
    BookingEngine.Hub.Service.Config.SecurityErrorType:
      description: >-
        Category of security failure returned when authentication or
        authorization is rejected.
      enum:
        - InvalidUserAuthentication
        - InvalidUserRoles
        - InvalidPermissions
      type: string
    Session.HubStayPeriod:
      description: >-
        Describe a period of stay by specifying the arrival date and the
        departure date.
      required:
        - arrivalDate
        - departureDate
      type: object
      properties:
        arrivalDate:
          format: date-time
          type: string
        departureDate:
          format: date-time
          type: string
    Session.HubBookingGuests:
      description: Describes the details of the guests count.
      required:
        - adults
        - children
        - infants
        - position
        - memberLevel
      type: object
      properties:
        adults:
          format: int32
          type: integer
        children:
          format: int32
          type: integer
        infants:
          format: int32
          type: integer
        childrenAges:
          type: array
          items:
            format: int32
            type: integer
        position:
          $ref: '#/components/schemas/Common.HubGuestPosition'
        memberLevel:
          format: int32
          type: integer
    Common.HubHotelId:
      type: string
    Common.HubGpsPosition:
      description: Describe geo coordinates.
      required:
        - latitude
        - longitude
      type: object
      properties:
        latitude:
          format: double
          type: number
        longitude:
          format: double
          type: number
    Basket.HubGuestTitle:
      description: Salutation used to address the guest.
      enum:
        - None
        - Mr
        - Mrs
        - Miss
      type: string
    Basket.HubMarketingConsent:
      required:
        - optinHotel
        - optinPartners
        - optinHotelAccepted
        - optinPartnersAccepted
      type: object
      properties:
        optinHotel:
          description: >-
            True if the end user was proposed to receive information from the
            hotel.
          type: boolean
        optinPartners:
          description: >-
            True if the end user was proposed to receive information from the
            hotel's partners.
          type: boolean
        optinHotelAccepted:
          description: True if the end user accepts to receive information from the hotel.
          type: boolean
        optinPartnersAccepted:
          description: >-
            True if the end user accepts to receive information from the hotel's
            partners.
          type: boolean
    Basket.HubGuestType:
      description: >-
        Category of a guest based on age (used for occupancy, pricing and
        extras).
      enum:
        - Adult
        - Child
        - Infant
      type: string
    HotelBusiness.RoomId:
      format: int32
      type: integer
    HotelBusiness.OccupancyId:
      format: int32
      type: integer
    HotelBusiness.ExtraId:
      format: int32
      type: integer
    Common.HubGuestPosition:
      format: int32
      type: integer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.