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

# Hotels (Stays)

> Best price for a specific stay, across multiple hotels



## OpenAPI

````yaml best-price-api/open-api/best-price-api.json POST /Planning/2018A/BestPrice/Hotels/Stays
openapi: 3.0.1
info:
  title: Best Price Service
  version: 2018A
servers:
  - url: https://{apiBaseUrl}
    variables:
      apiBaseUrl:
        default: api.example.com
        description: Base URL delivered by D-EDGE during partnership setup
security: []
paths:
  /Planning/2018A/BestPrice/Hotels/Stays:
    post:
      tags:
        - BestPrice
      summary: >-
        Retrieve the best available price across multiple hotels for a specific
        arrival date, length of stay and guest configuration.
      description: >-
        Retrieve the best available price across multiple hotels for a specific
        arrival date, length of stay and guest configuration.
      requestBody:
        description: >-
          The stay to price (arrival date and number of nights), the parties of
          guests to accommodate, and the hotels, rooms and rates of the rate
          plan to look at.
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/BestPriceHotelsStaysRequest'
              description: >-
                Request the best prices for a given stay, for a given number of
                guests, over multiple hotels
      responses:
        '200':
          description: >-
            One entry per hotel and party of guests, with the best price found
            for the whole stay, its availability and, when the stay is not
            available, the reasons.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BestPriceHotelsStaysResponse'
        '400':
          description: >-
            The request is malformed, or a required field is missing or out of
            range. The response body lists the fields in error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpValidationProblemDetails'
        '401':
          description: The authentication token is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: >-
            The impersonation is not consistent with the scope of the
            authentication token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    BestPriceHotelsStaysRequest:
      required:
        - arrivalDate
        - guests
        - nightCount
      type: object
      properties:
        arrivalDate:
          type: string
          description: First night of the stay
          format: date
          example: '2027-08-31'
        nightCount:
          type: integer
          description: Number of nights of the stay (minimum 1)
          format: int32
          example: 3
        guests:
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/Guests'
          description: "Number of guests the price is requested for. One item per \"party\". At least one item mandatory.\r\nThis field is mandatory for all hotels using price with supplements"
        filter:
          allOf:
            - $ref: '#/components/schemas/HotelsStaysRequestFilter'
          nullable: true
        impersonation:
          allOf:
            - $ref: '#/components/schemas/Impersonation'
          description: Impersonation information to restrict the scope of the request
          nullable: true
      additionalProperties: false
      description: >-
        Request the best prices for a given stay, for a given number of guests,
        over multiple hotels
    BestPriceHotelsStaysResponse:
      type: object
      properties:
        hotelId:
          type: integer
          description: Identifier of the hotel
          format: int32
          example: 1234
        rateId:
          type: integer
          description: Identifier of the best rate
          format: int32
          example: 5678
        roomId:
          type: integer
          description: Identifier of the best room
          format: int32
          example: 3456
        minimumStay:
          type: integer
          description: >-
            Effective minimum stay for an arrival that day, on this rate and
            room.
          format: int32
          example: 2
        maximumStay:
          type: integer
          description: "Effective maximum stay for an arrival that day, on this rate and room.\r\nValue is capped at the values provided in the request\r\nINFO: There may be other (more expensive) offers that will allow the guest to stay longer"
          format: int32
          example: 15
        availability:
          type: integer
          description: number of available rooms
          format: int32
          example: 3
        totalPrice:
          type: number
          description: >-
            Best Total price (Room + meals) to host all guests for the full stay
            (nightCount nights)
          format: double
          example: 100.5
        originalTotalPrice:
          type: number
          description: "Total price without promotion applied for the full stay (nightCount nights)\r\nValue is omitted if there is no promotion that day"
          format: double
          nullable: true
          example: 120
        offerCodeId:
          type: string
          description: "id of the promotion applicable to that day\r\nValue is omitted if there is no promotion with an id that day"
          format: uuid
          nullable: true
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        status:
          enum:
            - Available
            - OnRequest
            - NotAvailable
          type: string
          description: "Whether the stay can be booked at this price\r\n- Available: Room is available for booking\r\n- OnRequest: Hotel must confirm availability before booking\r\n- NotAvailable: Room is not available for booking"
        guests:
          allOf:
            - $ref: '#/components/schemas/Guests'
          description: the guest of the request this entity belongs to
          nullable: true
        unavailabilityReasons:
          type: array
          items:
            enum:
              - None
              - MinStay
              - MaxStay
              - Other
              - GuestsDoNotFitInRoom
            type: string
            description: "Why the entity is not available. Returned together with the availability status.\r\n- None: No unavailability reason applies, the entity is available\r\n- MinStay: Minimum stay constraint is not met\r\n- MaxStay: Maximum stay constraint is not met\r\n- Other: Entity is not available for another reason\r\n- GuestsDoNotFitInRoom: Entity is not available for this number of guests"
          description: list of reasons why the stay is not available
          nullable: true
        additionalTaxes:
          type: number
          description: >-
            Taxes that must be collected in addition to the TotalPrice (due on
            site or at booking)
          format: double
          nullable: true
          example: 5.5
        additionalFees:
          type: number
          description: >-
            Fees that must be collected in addition to the TotalPrice (due on
            site or at booking)
          format: double
          nullable: true
          example: 2
        includedTaxes:
          type: number
          description: Taxes that are included in the TotalPrice
          format: double
          nullable: true
          example: 9.15
        includedFees:
          type: number
          description: Fees that are included in the TotalPrice
          format: double
          nullable: true
          example: 1.5
      additionalProperties: false
      description: Best price of one hotel for the requested stay
    HttpValidationProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          nullable: true
      additionalProperties: {}
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    Guests:
      required:
        - adults
      type: object
      properties:
        adults:
          maximum: 2147483647
          minimum: 1
          type: integer
          description: Number of adults in the room, minimum 1
          format: int32
          example: 2
        children:
          type: array
          items:
            $ref: '#/components/schemas/Child'
          description: List of children in the room
          nullable: true
        infants:
          maximum: 2147483647
          minimum: 0
          type: integer
          description: Number of babies in the room, minimum 0
          format: int32
          example: 0
      additionalProperties: false
    HotelsStaysRequestFilter:
      type: object
      properties:
        ratePlan:
          allOf:
            - $ref: '#/components/schemas/BestPriceHotelsStaysRatePlanFilter'
          description: The rate plan to request
          nullable: true
        hotels:
          allOf:
            - $ref: '#/components/schemas/HotelIdEntityFilter'
          description: List of hotels to request
          nullable: true
        rooms:
          allOf:
            - $ref: '#/components/schemas/RoomIdEntityFilter'
          description: List of rooms to request
          nullable: true
        rates:
          allOf:
            - $ref: '#/components/schemas/RateIdEntityFilter'
          description: List of rates to request
          nullable: true
        currency:
          type: string
          description: "Iso Currency code. Only rates matching this currency will be considered.\r\nIf missing, the service will use the currency most used by the hotel. This has a small impact on performance"
          nullable: true
          example: EUR
        options:
          type: array
          items:
            enum:
              - SalesAgentAccess
              - PrivateRatesIncluded
              - TestHotelsIncluded
              - MobileOffersIncluded
            type: string
            description: "Options affecting the results\r\n- SalesAgentAccess: Add SalesAgentAccess value in the Options field in order to indicate that the client is a sales agent and that the entities should be returned only if the hotel accepts bookings coming from sales agents.\r\n- PrivateRatesIncluded: Private rates are excluded by default. Add this option to include private rates in the response.\r\n- TestHotelsIncluded: Test hotels are excluded by default.\n            To be returned the test hotels need to be explicitly requested by using the filter / rateplan / hotels / exceptions or by adding the TestHotelsIncluded value in the Options field.\r\n- MobileOffersIncluded: Mobile offers are excluded by default. Add this option to include eligible mobile offers (public or private) in the response."
          description: Options affecting the rates that can be returned
          nullable: true
        customerLocation:
          allOf:
            - $ref: '#/components/schemas/CustomerLocation'
          description: "Geographical location of the client trying to access the pricing\r\nMust correspond to a country (service does not check hierarchy)."
          nullable: true
        loyaltyProgram:
          allOf:
            - $ref: '#/components/schemas/LoyaltyProgram'
          description: >-
            Loyalty program information of the client trying to access the
            pricing
          nullable: true
      additionalProperties: false
    Impersonation:
      type: object
      properties:
        hotelId:
          allOf:
            - $ref: '#/components/schemas/HotelId'
          description: "Restrict the scope of the request to this hotel.\r\nMandatory with a Hotel token, optional otherwise; when set with a HotelView token, GroupId must be set as well."
          nullable: true
          example: 1234
        groupId:
          allOf:
            - $ref: '#/components/schemas/GroupId'
          description: "Restrict the scope of the request to this distribution group.\r\nMandatory with a System token, optional otherwise; when set with a HotelView token, HotelId must be set as well."
          nullable: true
          example: 9876
        userId:
          allOf:
            - $ref: '#/components/schemas/UserId'
          nullable: true
          deprecated: true
        bookingEngineId:
          allOf:
            - $ref: '#/components/schemas/BookingEngineId'
          description: Restrict the scope of the request to this booking engine.
          nullable: true
          example: 1XXA
      additionalProperties: false
      description: "Narrows the scope of the request to a single group, hotel or booking engine.\r\nImpersonation does not grant access: it selects, inside the scope your authentication token\r\nalready allows, the context the call must run in.\r\n            \r\nEach token carries a scope, and impersonation must be consistent with it:\r\n            \r\n- System token (internal applications only): GroupId is mandatory, HotelId optional.\r\n- Group token: GroupId is optional but must match the token group; HotelId is optional; BookingEngineId must be empty.\r\n- Hotel token: HotelId is mandatory and must match the token hotel; GroupId is optional and can be the group rate plan; BookingEngineId must be empty.\r\n- HotelView token: GroupId and HotelId are both optional, but if one is set the other must be set too, and both must match the token; BookingEngineId must be empty.\r\n- BookingEngine token: impersonation is ignored. The scope is entirely defined by the booking engine of the token, whatever is sent in this object.\r\n            \r\nIf your application has access to multiple tokens with different scopes, always set your\r\nimpersonation with the group and hotel of that scope. This avoids issues with token reuse and\r\nimproves performance.\r\n            \r\nAn impersonation inconsistent with the token scope is rejected with a 403 Forbidden. For\r\nexample, with a HotelView token on hotel 2 of group 1, setting GroupId without HotelId (or\r\nHotelId without GroupId) is forbidden."
    Child:
      type: object
      properties:
        age:
          maximum: 2147483647
          minimum: 0
          type: integer
          description: "Age of the child. \r\nIf missing, the service will assume the maximum age for a child on the given hotel"
          format: int32
          nullable: true
          example: 10
        count:
          maximum: 2147483647
          minimum: 0
          type: integer
          description: Number of children with that age in the room, minimum 0
          format: int32
          example: 1
      additionalProperties: false
    BestPriceHotelsStaysRatePlanFilter:
      type: object
      properties:
        groupId:
          allOf:
            - $ref: '#/components/schemas/GroupId'
          description: Group identifier of the rate plan
          example: 9876
        referenceRateCode:
          type: string
          description: Either a Rate Code or a Private Offer Code Rate
          nullable: true
          example: RACKPRI
      additionalProperties: false
      description: >-
        The rate plan to look at: a distribution group and an optional reference
        rate
    HotelIdEntityFilter:
      type: object
      properties:
        exceptions:
          type: array
          items:
            $ref: '#/components/schemas/HotelId'
          description: "List of identifiers to include or exclude.\r\nMust be combined with the Default field, which decides how this list is read."
          nullable: true
        default:
          enum:
            - Included
            - Excluded
          type: string
          description: "How the Exceptions list is applied\r\n- Included: Items are returned if they are not mentioned in the Exceptions list. An empty list means all items\r\n- Excluded: Items are returned only if they are mentioned in the Exceptions list"
      additionalProperties: false
    RoomIdEntityFilter:
      type: object
      properties:
        exceptions:
          type: array
          items:
            $ref: '#/components/schemas/RoomId'
          description: "List of identifiers to include or exclude.\r\nMust be combined with the Default field, which decides how this list is read."
          nullable: true
        default:
          enum:
            - Included
            - Excluded
          type: string
          description: "How the Exceptions list is applied\r\n- Included: Items are returned if they are not mentioned in the Exceptions list. An empty list means all items\r\n- Excluded: Items are returned only if they are mentioned in the Exceptions list"
      additionalProperties: false
    RateIdEntityFilter:
      type: object
      properties:
        exceptions:
          type: array
          items:
            $ref: '#/components/schemas/RateId'
          description: "List of identifiers to include or exclude.\r\nMust be combined with the Default field, which decides how this list is read."
          nullable: true
        default:
          enum:
            - Included
            - Excluded
          type: string
          description: "How the Exceptions list is applied\r\n- Included: Items are returned if they are not mentioned in the Exceptions list. An empty list means all items\r\n- Excluded: Items are returned only if they are mentioned in the Exceptions list"
      additionalProperties: false
    CustomerLocation:
      type: object
      properties:
        geonameId:
          allOf:
            - $ref: '#/components/schemas/ToponymId'
          description: "Customer Country Identifier\r\nIf missing, Geo Pricing restrictions are not enforced."
      additionalProperties: false
      description: Geographical location of the client trying to access the pricing
    LoyaltyProgram:
      type: object
      properties:
        membershipLevel:
          type: integer
          description: Customer Membership level (default is 0)
          format: int32
          example: 0
      additionalProperties: false
      description: Loyalty program information of the client trying to access the pricing
    HotelId:
      type: integer
      description: Hotel identifier.
      example: 1234
    GroupId:
      type: integer
      description: Distribution group identifier.
      example: 9876
    UserId:
      type: integer
      description: Obsolete. User identifier.
      example: 1357
    BookingEngineId:
      type: string
      description: Booking engine reference.
      example: 1XXA
    RoomId:
      type: integer
      description: Room identifier.
      example: 3456
    RateId:
      type: integer
      description: Rate identifier.
      example: 5678
    ToponymId:
      type: integer
      description: GeoNames identifier of the customer country.
      example: 3017382

````

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