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

# Update the search context

> Update the search context



## OpenAPI

````yaml booking-engine-api/open-api/booking-engine-api.json PATCH /v2/{sessionId}/session/context
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/context:
    patch:
      tags:
        - Session
      summary: Update the search context
      description: Use this method to update the search criterias selected by the user.
      operationId: Session_UpdateContext
      parameters:
        - name: X-AVP-SessionDuration
          in: header
          description: ''
          required: false
          schema:
            type: string
        - name: X-AVP-Impersonation
          in: header
          description: ''
          required: false
          schema:
            type: string
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Session.HubSearchContext'
          text/json:
            schema:
              $ref: '#/components/schemas/Session.HubSearchContext'
        description: The new search context
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
            text/json:
              schema:
                type: object
        '204':
          description: The session context is updated correctly
        '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.Examples.Session.InvalidSessionErrorResponse
              examples:
                response:
                  value:
                    code: InvalidSessionId
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/BookingEngine.Hub.Service.Examples.Session.InvalidSessionErrorResponse
              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.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
    BookingEngine.Hub.Service.Examples.Session.InvalidSessionErrorResponse:
      required:
        - code
      type: object
      properties:
        code:
          default: InvalidSessionId
          type: string
        message:
          type: string
    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.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
    BookingEngine.Hub.Service.Controllers.ErrorResponse:
      type: object
      properties:
        message:
          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
    Common.HubGuestPosition:
      format: int32
      type: integer

````

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