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

# Rooms

> Best price per room type, for one hotel, over a date range



## OpenAPI

````yaml best-price-api/open-api/best-price-api.json POST /Planning/2018A/BestPrice/Rooms
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/Rooms:
    post:
      tags:
        - BestPrice
      summary: >-
        Retrieve the best available price for each room type at the hotel for a
        specified date range and guest configuration.
      description: >-
        Retrieve the best available price for each room type at the hotel for a
        specified date range and guest configuration.
      requestBody:
        description: >-
          The period to cover (begin and end dates, both included), the single
          party of guests to accommodate, the rate plan, rooms and rates to look
          at, and the behaviours to arbitrate between restricted dates.
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/BestPriceRatesRequest'
              description: >-
                Request the best prices for each rate or room over a given
                period, for a given number of guests
      responses:
        '200':
          description: >-
            One entry per room and requested behaviour, with the best arrival
            date and price found for that room under that behaviour, and the
            effective stay restrictions. Entries are grouped by behaviour, in
            the order of the request, then ordered by room id.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BestPriceRatesResponse'
        '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:
    BestPriceRatesRequest:
      required:
        - beginDate
        - endDate
        - guests
      type: object
      properties:
        beginDate:
          type: string
          description: First date to be returned
          format: date
          example: '2027-08-31'
        endDate:
          type: string
          description: End of the requested period. This date is included
          format: date
          example: '2027-08-31'
        guests:
          allOf:
            - $ref: '#/components/schemas/Guests'
          description: "Number of guests the price is requested for.\r\nThis endpoint accepts a single party: unlike Calendar and Hotels/Stays, this is one object, not an array."
        filter:
          allOf:
            - $ref: '#/components/schemas/DailyBestPriceFilter'
          description: Filter to apply to the best price request
          nullable: true
        behaviour:
          enum:
            - LowestLengthOfStay
            - CheapestStay
            - EarliestAvailability
          type: string
          description: "Obsolete: use Behaviours instead. Cannot be combined with a non-empty Behaviours.\r\nWhen the date has restrictions, indicates how to behave\r\n- LowestLengthOfStay: (default): Will prioritise the shortest length of stay, to prevent displaying dates with minimum stays when there is a flexible rate available\r\n- CheapestStay: Will prioritise the cheapest stay, to prevent an overpriced flexible stay from being returned when longer stays are cheaper\r\n- EarliestAvailability: Will prioritise the earliest stay"
          default: LowestLengthOfStay
          nullable: true
          deprecated: true
        behaviours:
          type: array
          items:
            enum:
              - LowestLengthOfStay
              - CheapestStay
              - EarliestAvailability
            type: string
            description: "How to choose the best price when the date has restrictions\r\n- LowestLengthOfStay: (default): Will prioritise the shortest length of stay, to prevent displaying dates with minimum stays when there is a flexible rate available\r\n- CheapestStay: Will prioritise the cheapest stay, to prevent an overpriced flexible stay from being returned when longer stays are cheaper\r\n- EarliestAvailability: Will prioritise the earliest stay"
          description: "When the date has restrictions, indicates how to behave.\r\nEach entity is returned once per requested behaviour, with the behaviour set on each entry.\r\nEntries are returned grouped by behaviour, in this order.\r\nAn empty list is treated as absent: Behaviour is then used, else LowestLengthOfStay is assumed. Duplicate values are ignored."
          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 each rate or room over a given period, for a
        given number of guests
    BestPriceRatesResponse:
      type: object
      properties:
        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
        behaviour:
          enum:
            - LowestLengthOfStay
            - CheapestStay
            - EarliestAvailability
          type: string
          description: "Behaviour this entry was computed for, among the requested behaviours\r\n- LowestLengthOfStay: (default): Will prioritise the shortest length of stay, to prevent displaying dates with minimum stays when there is a flexible rate available\r\n- CheapestStay: Will prioritise the cheapest stay, to prevent an overpriced flexible stay from being returned when longer stays are cheaper\r\n- EarliestAvailability: Will prioritise the earliest stay"
        arrivalDate:
          type: string
          description: Arrival date (yyyy-MM-dd)
          format: date
          example: '2027-08-31'
        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 rooms still available for this room and rate, over the
            returned stay
          format: int32
          example: 3
        currency:
          type: string
          description: Iso Currency code.
          nullable: true
          example: EUR
        totalPrice:
          type: number
          description: >-
            Best Total price (Room + meals) to host all guests that day (average
            per night if minimum stay > 1)
          format: double
          example: 100.5
        originalTotalPrice:
          type: number
          description: "Total price without promotion applied (average per night if minimum stay > 1)\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
          type: string
          description: "Whether the best price can be booked directly or on request.\r\n- Available: The rate is available for booking\r\n- OnRequest: The hotel must confirm availability before booking"
        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 for an arrival on a given date
    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
    DailyBestPriceFilter:
      required:
        - ratePlan
      type: object
      properties:
        ratePlan:
          allOf:
            - $ref: '#/components/schemas/DailyBestPriceRatePlanFilter'
          description: 'Rate Plan: Hotel, Group, Reference rate'
        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
        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
        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
        maximumStay:
          maximum: 31
          minimum: 1
          type: integer
          description: "Maximum length of stay to consider (from 1 to 31, default: 31 nights). \r\nShortening this value will improve performance but may return unavailability when all rates have a longer length of stay. It will also prevent returning rates for very long stays in this planning."
          format: int32
          example: 15
      additionalProperties: false
      description: Filter to apply to the best price request
    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
    DailyBestPriceRatePlanFilter:
      required:
        - groupId
        - hotelId
      type: object
      properties:
        hotelId:
          allOf:
            - $ref: '#/components/schemas/HotelId'
          description: Hotel Identifier
          example: 1234
        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 hotel, its distribution group, and an
        optional reference rate
    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.