> ## 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.

# Create a new session

> Create a new session



## OpenAPI

````yaml booking-engine-api/open-api/booking-engine-api.json POST /v2/session
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/session:
    post:
      tags:
        - Session
      summary: Create a new session
      description: "This method creates a session that will identify the user. It stores the scope, the search context and the display options. The returned `sessionId`\r\nwill be used to identify the session for all of the other operations\r\n            \r\n### Search context\r\nThis object defines the user selection for his search.\r\n* `SelectedHotelId` is the hotel id selected by the user. If the engine configuration contains a single hotel, the SelectedHotelId will be automatically selected and does not need to be provided.\r\n* `SelectedRoomCode` is the room selected by the user. It can be a room code or a room id. If the room code is not available, a `InvalidRoomId` error is thrown.\r\n* `SelectedRateCode` is the rate selected by the user. It can be a rate code or a rate id. If the rate code is not available, a `InvalidRateId` error is thrown.\r\n* `HighlightedRateCode` is the rate that will be placed in first on search results. It can be a rate code or a rate id. If the rate code is not available, a `InvalidRateId` error is thrown.\r\n* `PromoCode` is the discount code or the rate code that can be used by the client. If the promo code is not available, `InvalidPromoCode`, `InvalidPromoCodeBookingPeriod` or `InvalidPromoCodeStayPeriod` can be thrown\r\n* `ExcludeMixedRates` defines in the session if the search results may contain room availabilities with multiple rates. If the engine is configured with mixed rates disabled, then the user cannot override the value and is forced to `false`.\r\n### Display options\r\nThis property contains the `culture` and the `currency` to use for all of the calls to the API. Every human readable texts (except technical\r\nerror messages) will use the culture property to provide the corresponding translation. The money amounts will also be converted using the\r\nmatching currency defined in this property."
      operationId: Session_CreateSession
      parameters:
        - name: X-AVP-SessionDuration
          in: header
          description: The custom duration of the session.
          required: false
          schema:
            type: string
        - name: X-AVP-Impersonation
          in: header
          description: The impersonation.
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Session.CreateSessionRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/Session.CreateSessionRequest'
        description: The request.
        required: true
      responses:
        '200':
          description: Indicates that the session was created correctly
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session.CreateSessionResponse'
              examples:
                response:
                  value:
                    sessionId: 924f66dc-1706-4f13-968f-4a35293e8d2b
                    warnings: []
            text/json:
              schema:
                $ref: '#/components/schemas/Session.CreateSessionResponse'
              examples:
                response:
                  value:
                    sessionId: 924f66dc-1706-4f13-968f-4a35293e8d2b
                    warnings: []
        '400':
          description: >-
            Some parameters are invalid or missing, check the error code value
            for more details
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/BookingEngine.Hub.Service.Controllers.ErrorResponse_Exceptions.HubErrorType_
              examples:
                response:
                  value:
                    code: InvalidHotelId
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/BookingEngine.Hub.Service.Controllers.ErrorResponse_Exceptions.HubErrorType_
              examples:
                response:
                  value:
                    code: InvalidHotelId
        '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.CreateSessionRequest:
      required:
        - display
        - context
        - metadata
        - engineId
        - guestSelectionMode
      type: object
      properties:
        engineId:
          description: >-
            The engine for which to create a session. This is the only property
            that is required to create a session.
          allOf:
            - $ref: '#/components/schemas/Common.HubBookingEngineId'
        guestSelectionMode:
          description: The guest selection mode (per room or per booking).
          allOf:
            - $ref: '#/components/schemas/Session.HubGuestSelectionMode'
        display:
          description: The desired display context.
          default: {}
          allOf:
            - $ref: '#/components/schemas/Session.HubSessionDisplay'
        context:
          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'
        metadata:
          default:
            customTrackingValues: {}
          allOf:
            - $ref: '#/components/schemas/Session.CreateSessionRequestMetadata'
      example:
        engineId: 2MIS
        guestSelectionMode: Default
        display:
          culture: fr-FR
          currency: EUR
          countryCode: FR
        context:
          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
        metadata:
          customTrackingValues: {}
    Session.CreateSessionResponse:
      required:
        - warnings
        - sessionId
      type: object
      properties:
        sessionId:
          $ref: '#/components/schemas/Session.HubSessionId'
        warnings:
          description: >-
            Possible values are : InvalidStayPeriod, InvalidRateId,
            InvalidRoomId, InvalidPromoCode, InvalidGuests
          default: []
          type: array
          items:
            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
    Common.HubBookingEngineId:
      type: string
    Session.HubGuestSelectionMode:
      description: >-
        How guests are declared by the end user during the search — once for the
        whole booking or independently per room.
      enum:
        - Default
        - PerRoom
        - PerBooking
      type: string
    Session.HubSessionDisplay:
      type: object
      properties:
        culture:
          description: The culture name, used to localize results of other endpoints.
          type: string
        currency:
          description: >-
            The ISO code of the currency requested, used to configure price in
            the results.
          type: string
        countryCode:
          description: The country code from client browser.
          type: string
      example:
        culture: fr-FR
        currency: EUR
        countryCode: FR
    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
    Session.CreateSessionRequestMetadata:
      required:
        - customTrackingValues
      type: object
      properties:
        customTrackingValues:
          description: >-
            Allow the API client to store values that have been provided through
            URL at the beginning of the booking process.
          default: {}
          type: object
          additionalProperties:
            type: string
        application:
          type: string
        device:
          description: >-
            Allow the API client to store the device type of the end user at the
            beginning of the booking process.
          type: string
        ipAddress:
          description: Allow the API client to store the user ip address.
          type: string
    Session.HubSessionId:
      format: uuid
      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
    Common.HubGuestPosition:
      format: int32
      type: integer

````

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