Spotnana Company Policies API

APIs to configure company travel policies.

OpenAPI Specification

spotnana-company-policies-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Air Company Policies API
  version: v2
  description: APIs to perform search, checkout and book an air pnr
servers:
- url: https://api-ext-sboxmeta.partners.spotnana.com
  description: Sandbox URL
security:
- Bearer: []
tags:
- name: Company Policies
  description: APIs to configure company travel policies.
paths:
  /v2/companies/{companyId}/policies:
    parameters:
    - name: companyId
      in: path
      description: Identifier for company.
      required: true
      schema:
        type: string
        format: uuid
      example: 4974a66b-7493-4f41-908c-58ba81093947
    post:
      tags:
      - Company Policies
      summary: Create policy
      description: This endpoint creates a policy.
      operationId: createPolicy
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePolicyRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityId'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
    get:
      tags:
      - Company Policies
      summary: List company policies
      description: This endpoint list company policies.
      operationId: listPolicies
      parameters:
      - name: categories
        in: query
        description: Filter policies by categories. Defaults to EMPLOYEE if not provided.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/PolicyCategory'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayOfReference'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /v2/companies/{companyId}/policies/{policyId}:
    parameters:
    - name: companyId
      in: path
      description: Identifier for company.
      required: true
      schema:
        type: string
        format: uuid
      example: 4974a66b-7493-4f41-908c-58ba81093947
    - name: policyId
      in: path
      description: Identifier for policy.
      required: true
      schema:
        type: string
        format: uuid
      example: 4974a66b-7493-4f41-908c-58ba81093947
    get:
      tags:
      - Company Policies
      summary: Get policy
      description: This endpoint gets a policy by ID.
      operationId: readPolicy
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Policy'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      tags:
      - Company Policies
      summary: Update policy
      description: This endpoint updates a policy by ID.
      operationId: updatePolicy
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Policy'
      responses:
        '204':
          description: Updated Successfully
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      tags:
      - Company Policies
      summary: Delete policy
      description: This endpoint deletes a policy by ID.
      operationId: deletePolicy
      responses:
        '204':
          description: No Content
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: The specified resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    HotelRestrictedKeyword:
      type: object
      title: HotelRestrictedKeyword
      description: Keyword that should not be allowed in hotel name/description.
      required:
      - keyword
      - reason
      properties:
        keyword:
          type: string
          description: Keyword that should not be allowed in hotel name/description.
        reason:
          type: string
          description: Reason for not allowing the keyword.
    RuleTierExemptionConfig:
      type: object
      title: RuleTierExemptionConfig
      description: Per-rule tier exemption configuration with defaults.
      properties:
        defaultExemptedTiers:
          type: array
          description: 'Default tiers exempted for every rule not explicitly listed in ruleTierExemptions.

            '
          items:
            $ref: '#/components/schemas/PreferenceTierLevel'
        ruleTierExemptions:
          type: array
          description: 'Per-rule exemption configuration. Overrides defaultExemptedTiers for the listed rule types.

            '
          items:
            $ref: '#/components/schemas/RuleTierExemption'
    FlightAdvanceBookingWindow:
      type: object
      title: FlightAdvanceBookingWindow
      description: 'Air rule to describe whether to use default policy or a different advance booking window for

        a flight.

        '
      oneOf:
      - $ref: '#/components/schemas/IsLinkedWrapper'
      - $ref: '#/components/schemas/FlightAdvanceBookingWindowPropsWrapper'
    RestrictedAirlinesProps:
      type: object
      title: RestrictedAirlinesProps
      description: List of IATA Airline code.
      required:
      - airlineCodes
      properties:
        airlineCodes:
          type: array
          items:
            type: string
    ContinentProps:
      type: object
      title: ContinentProps
      description: List of continent with their type of restriction.
      required:
      - restrictions
      properties:
        restrictions:
          type: array
          items:
            $ref: '#/components/schemas/ContinentRestriction'
    Co2EmissionPerPassengerPerKmProps:
      type: object
      title: Co2EmissionPerPassengerPerKmProps
      description: 'Maximum allowed Co2 emission (in grams) per passenger per flight distance covered (in Kms).

        '
      required:
      - emission
      properties:
        emission:
          type: number
          format: double
    HotelPolicyRules:
      type: object
      title: HotelPolicyRules
      description: Details of rules related to hotel.
      properties:
        restrictedHotels:
          $ref: '#/components/schemas/RestrictedHotels'
        maxHotelPriceByLocation:
          $ref: '#/components/schemas/MaxHotelPriceByLocation'
        hotelAdvanceBookingWindow:
          $ref: '#/components/schemas/HotelAdvanceBookingWindow'
        hotelCancellation:
          $ref: '#/components/schemas/HotelCancellation'
        hotelChainCodes:
          $ref: '#/components/schemas/HotelChainCodes'
        hotelStarRating:
          $ref: '#/components/schemas/HotelStarRating'
        hotelMedianRateNightly:
          $ref: '#/components/schemas/HotelMedianRate'
        hotelCentralTierExemption:
          $ref: '#/components/schemas/HotelCentralTierExemption'
    MaxFlightBookingPriceByDurationProps:
      type: object
      title: MaxFlightBookingPriceByDurationProps
      description: List of max price of flight booking for different flight duration.
      required:
      - maxPricePerDurationList
      properties:
        maxPricePerDurationList:
          type: array
          items:
            $ref: '#/components/schemas/MaxFlightPricePerDuration'
        isTaxIncluded:
          type: boolean
          default: false
    FlightCabinUpgradePropsWrapper:
      type: object
      title: FlightCabinUpgradePropsWrapper
      properties:
        flightCabinUpgradeProps:
          $ref: '#/components/schemas/FlightCabinUpgradeProps'
    CarPolicyRules:
      type: object
      title: CarPolicyRules
      description: Details of rules related to car.
      properties:
        maxCarPricePerNumberOfDays:
          $ref: '#/components/schemas/MaxCarPricePerNumberOfDays'
        allowedCarTypes:
          $ref: '#/components/schemas/AllowedCarTypes'
    HotelStarRating:
      type: object
      title: HotelStarRatingRule
      description: 'Hotel rule to describe whether to use default policy rule or use the specific range of star

        rated hotels.

        '
      oneOf:
      - $ref: '#/components/schemas/IsLinkedWrapper'
      - $ref: '#/components/schemas/HotelStarRatingPropsWrapper'
      properties:
        approvalProcessType:
          type: string
          description: Out of policy action to take when hotel star rating rule is violated.
          enum:
          - NONE
          - SOFT_APPROVAL
          - HARD_APPROVAL
          - PASSIVE_APPROVAL
          - PREVENT_BOOKING
          - PRE_APPROVAL
    HotelChainCodes:
      type: object
      title: HotelChainCodes
      description: "Hotel rule to describe whether to use default policy or use a different set of allowed hotel \nchain codes.\n"
      oneOf:
      - $ref: '#/components/schemas/IsLinkedWrapper'
      - $ref: '#/components/schemas/HotelChainCodesPropsWrapper'
    LprFilterConfigWrapper:
      type: object
      title: LprFilterConfigWrapper
      properties:
        lprFilterConfig:
          $ref: '#/components/schemas/LprFilterConfig'
    HotelAdvanceBookingWindow:
      type: object
      title: HotelAdvanceBookingWindow
      description: 'Hotel rule to describe whether to use default policy or different rule for advance booking.

        '
      oneOf:
      - $ref: '#/components/schemas/IsLinkedWrapper'
      - $ref: '#/components/schemas/HotelAdvanceBookingWindowPropsWrapper'
    MaxFlightBookingPrice:
      type: object
      title: MaxFlightBookingPrice
      description: Max allowed flight booking price for that selected cabin.
      oneOf:
      - $ref: '#/components/schemas/IsLinkedWrapper'
      - $ref: '#/components/schemas/MaxFlightBookingPricePropsWrapper'
    LowestLogicalFarePropsWrapper:
      type: object
      title: LlfPropsWrapper
      properties:
        props:
          $ref: '#/components/schemas/LowestLogicalFareProps'
    PreventBookingWrapper:
      type: object
      title: PreventBookingWrapper
      properties:
        preventBooking:
          $ref: '#/components/schemas/PreventBooking'
    HotelRateType:
      type: string
      title: HotelRate Type
      enum:
      - PUBLISHED
      - CORPORATE
      - SPOTNANA
      - REGULAR
      - AAA
      - AARP
      - SENIOR_CITIZEN
      - GOVERNMENT
      - MILITARY
      - MEMBERSHIP
      - BEST_AVAILABLE_RATE
      - TMC
    RestrictedAirCraftsProps:
      type: object
      title: RestrictedAirCraftsProps
      description: List of IATA Aircraft code.
      required:
      - airCraftCodes
      properties:
        airCraftCodes:
          type: array
          items:
            type: string
            description: IATA Aircraft code
    RailTicketsRefundablePropsWrapper:
      type: object
      title: RailTicketsRefundablePropsWrapper
      properties:
        railTicketsRefundableProps:
          $ref: '#/components/schemas/RailTicketsRefundableProps'
    MaxCarPricePerNumberOfDays:
      type: object
      title: MaxCarPricePerNumberOfDays
      description: "Car rule to describe whether to use default policy rules \nor list of rules for max price for given number of days.\n"
      oneOf:
      - $ref: '#/components/schemas/IsLinkedWrapper'
      - $ref: '#/components/schemas/MaxCarPricePerNumberOfDaysPropsWrapper'
    LowestLogicalFareProps:
      type: object
      title: LowestLogicalFareProps
      description: Properties which will be used to filter candidates for a given flight in order to calculate lowest possible fare for the group.
      properties:
        flightTimeWindowInHoursDomestic:
          description: Time window (in hours) applied at both departure and arrival to get time bounds of candidate flights for domestic travel.
          type: integer
          format: int32
          deprecated: true
          x-sunset: '2026-07-01'
        flightTimeWindowInHoursInternational:
          description: Time window (in hours) applied at both departure and arrival to get time bounds of candidate flights for international travel.
          type: integer
          format: int32
          deprecated: true
          x-sunset: '2026-07-01'
        maxLayoverDurationInHoursDomestic:
          description: Maximum layover duration (in hours) possible for candidate flights for domestic travel.
          type: integer
          format: int32
          deprecated: true
          x-sunset: '2026-07-01'
        maxLayoverDurationInHoursInternational:
          description: Maximum layover duration (in hours) possible for candidate flights for international travel.
          type: integer
          format: int32
          deprecated: true
          x-sunset: '2026-07-01'
        maxLayoverDurationMinutesDomestic:
          description: Maximum layover duration (in minutes) possible for candidate flights for domestic travel.
          type: integer
          format: int32
          example: 120
        maxLayoverDurationMinutesInternational:
          description: Maximum layover duration (in minutes) possible for candidate flights for international travel.
          type: integer
          format: int32
          example: 150
        flightTimeWindowMinutesDomestic:
          description: "Time window (in minutes) applied at both departure and arrival \nto get time bounds of candidate flights for domestic travel.\n"
          type: integer
          format: int32
          example: 60
        flightTimeWindowMinutesInternational:
          description: "Time window (in minutes) applied at both departure and arrival \nto get time bounds of candidate flights for international travel.\n"
          type: integer
          format: int32
          example: 90
        maxNumberOfStops:
          description: Maximum number of stops possible in a leg to be for it to be considered as a valid llf candidate.
          type: string
          enum:
          - ANY
          - ONE_OR_LESS
          - TWO_OR_LESS
          - FEWEST
        airportConnectionChanges:
          description: Is more than one distinct airport possible in a leg.
          type: string
          enum:
          - NOT_ALLOWED
        carrier:
          description: Carriers which may be excluded / included for llf calculation.
          type: object
          properties:
            type:
              description: Whether to include / exclude carriers.
              type: string
              enum:
              - PREFERRED
              - EXCLUDE
            airlines:
              description: List of airline codes.
              type: array
              items:
                type: string
    ApprovalCondition:
      type: object
      title: ApprovalCondition
      description: Rules which should be satisfied to use an approval action. There is AND relationship between rules.
      properties:
        rules:
          type: array
          items:
            $ref: '#/components/schemas/ApprovalRule'
    PolicyRuleType:
      type: string
      description: Policy Rule type.
      title: PolicyRuleType
      enum:
      - BASIC_ECONOMY_FARES_DOMESTIC
      - BASIC_ECONOMY_FARES_INTERNATIONAL
      - CABIN_CLASS_NOT_ALLOWED_DOMESTIC
      - CABIN_CLASS_NOT_ALLOWED_INTERNATIONAL
      - HOTEL_RATE_CONDITIONS_NOT_ALLOWED
      - CAR_TYPES_NOT_ALLOWED
      - RAIL_ADVANCE_BOOKING_WINDOW
      - MAX_RAIL_BOOKING_PRICE_BY_DURATION
      - HIGHEST_RAIL_TRAVEL_CLASS_BY_DURATION
      - RAIL_TICKETS_REFUNDABLE
      - HOTEL_RESTRICTED_KEYWORDS
      - FLIGHT_ADVANCE_BOOKING_WINDOW_DOMESTIC
      - FLIGHT_ADVANCE_BOOKING_WINDOW_INTERNATIONAL
      - ALLOWED_AIR_ADDONS
      - MAX_HOTEL_BOOKING_PRICE
      - CAR_ENGINE_TYPES_NOT_ALLOWED
      - LOWEST_FARE_PER_HOTEL_PROPERTY
      - AIR_RESTRICTED_FARES
      - RESTRICT_AIRPORT_TRANSFERS
      - HOTEL_LPR_FILTER
      - HOTEL_PROPERTY_TYPE
      - LIMO_TYPES_NOT_ALLOWED
      example: CAR_TYPES_NOT_ALLOWED
      x-ignoreBreakingChanges:
      - PolicyRuleType->RESTRICT_AIRPORT_TRANSFERS
      - PolicyRuleType->HOTEL_LPR_FILTER
      - PolicyRuleType->HOTEL_PROPERTY_TYPE
      - PolicyRuleType->LIMO_TYPES_NOT_ALLOWED
    UserId:
      type: object
      title: UserId
      description: User identifier
      required:
      - id
      properties:
        id:
          type: string
          format: uuid
    HotelChainCodesProps:
      type: object
      title: HotelChainCodesProps
      description: List of hotel chain codes.
      required:
      - hotelChainCodes
      properties:
        hotelChainCodes:
          type: array
          items:
            type: string
            description: Unique chain codes of the hotel.
    MaxHotelPriceByLocationPropsWrapper:
      type: object
      title: MaxHotelPriceByLocationPropsWrapper
      properties:
        maxHotelPriceByLocationProps:
          $ref: '#/components/schemas/MaxHotelPriceByLocationProps'
    TravelRegionRuleWrapper:
      type: object
      title: TravelRegionRuleWrapper
      description: Rule to evaluate travel region, INTERNATIONAL or DOMESTIC.
      properties:
        travelRegionRule:
          $ref: '#/components/schemas/TravelRegionRule'
    RailTravelClass:
      description: Travel class
      type: string
      enum:
      - FIRST
      - STANDARD
      - BUSINESS
      - SLEEPER
      - STANDARD_PREMIUM
      - BUSINESS_PREMIUM
      - COACH
      - ROOM
      - EXECUTIVE
      example: FIRST
    DifferenceBetweenFlightFareAndMedianFare:
      type: object
      title: DifferenceBetweenFlightFareAndMedianFare
      description: 'Air rule to describe whether to use default policy or different rule for difference between

        a flight fare and median fare of the flights for a destination.

        Note: Median fare was calculated based on number of stops, cabin class and flight duration.

        '
      oneOf:
      - $ref: '#/components/schemas/IsLinkedWrapper'
      - $ref: '#/components/schemas/DifferenceBetweenFlightFareAndMedianFarePropsWrapper'
    LimoType:
      type: string
      title: LimoType
      description: Limo type.
      enum:
      - STANDARD_CAR
      - EXECUTIVE_CAR
      - BUSINESS_VAN
      - FIRST_CLASS
      - SUV
      - SEDAN
      - EXECUTIVE_SEDAN
      - LUXURY_SEDAN
      - EXECUTIVE_VAN
      - BUSINESS_SEDAN
      example: STANDARD_CAR
    IsLinkedWrapper:
      type: object
      title: IsLinkedWrapper
      properties:
        isLinked:
          type: boolean
          description: If the value has to be taken from default policy.
          example: true
    HotelPropertyEnum:
      type: string
      enum:
      - ALL_SUITE
      - ALL_INCLUSIVE_RESORT
      - APARTMENT
      - BED_AND_BREAKFAST
      - CABIN_OR_BUNGALOW
      - CAMPGROUND
      - CHALET
      - CONDOMINIUM
      - CONFERENCE_CENTER
      - CORPORATE_BUSINESS_TRANSIENT
      - CRUISE
      - EXTENDED_STAY
      - GUEST_FARM
      - GUEST_HOUSE_LIMITED_SERVICE
      - HEALTH_SPA
      - HOLIDAY_RESORT
      - HOSTEL
      - HOTEL
      - INN
      - LODGE
      - MONASTERY
      - MOTEL
      - RANCH
      - RESIDENTIAL_APARTMENT
      - RESORT
      - TENT
      - VACATION_HOME
      - VILLA
      - WILDLIFE_RESERVE
      - CASTLE
      - GOLF
      - PENSION
      - SKI
      - SPA
      - BOATEL
      - HISTORICAL
      - RECREATIONAL_VEHICLE_PARK
      - CHARM_HOTEL
      - OTHER
    ErrorResponse:
      type: object
      properties:
        debugIdentifier:
          type: string
          description: Link to debug the error internally.
        errorMessages:
          type: array
          items:
            type: object
            properties:
              errorCode:
                type: string
                description: Error code to identify the specific errors.
              message:
                type: string
                description: Message containing details of error.
              errorParameters:
                type: array
                description: Error message parameters.
                items:
                  $ref: '#/components/schemas/ErrorParameter'
              errorDetail:
                type: string
                description: More details about the error.
    HotelCentralTierExemptionPropsWrapper:
      type: object
      title: HotelCentralTierExemptionPropsWrapper
      properties:
        hotelCentralTierExemptionProps:
          $ref: '#/components/schemas/HotelCentralTierExemptionProps'
    MaxHotelBookingPricePropsWrapper:
      type: object
      title: MaxHotelBookingPricePropsWrapper
      properties:
        maxHotelBookingPriceProps:
          $ref: '#/components/schemas/MaxHotelBookingPriceProps'
    HotelMedianRate:
      type: object
      title: HotelMedianRate
      description: 'Defines the attributes/filters used to identify candidate hotels

        for calculating the median nightly rate in hotel search.


        The calculated median rate serves as the reference value for

        MaxHotelBookingPriceProps when enforcing price limits.

        '
      oneOf:
      - $ref: '#/components/schemas/IsLinkedWrapper'
      - $ref: '#/components/schemas/HotelMedianRatePropsWrapper'
    MaxFlightBookingPriceProps:
      type: object
      title: MaxFlightBookingPriceProps
      description: 'Air rule to describing how the maximum allowed flight price will be calculated and set for policy.

        '
      required:
      - type
      - sign
      - difference
      properties:
        type:
          type: string
          enum:
          - MINIMUM
          - MEDIAN
          - LOWEST_LOGICAL_FARE
        sign:
          type: string
          enum:
          - MORE
          - LESS
        difference:
          $ref: '#/components/schemas/DifferenceValue'
        isTaxIncluded:
          type: boolean
          default: true
    PolicyCategory:
      type: string
      description: Category of the policy.
      title: PolicyCategory
      enum:
      - EMPLOYEE
      - GUEST
      example: EMPLOYEE
    Policy:
      allOf:
      - $ref: '#/components/schemas/CreatePolicyRequest'
      type: object
      title: Policy details.
      description: Details of policy.
      required:
      - id
      - name
      - type
      - currency
      - userGroups
      properties:
        id:
          type: string
          format: uuid
          example: 4974a66b-7493-4f41-908c-58ba81093947
        version:
          type: integer
          format: int32
        updatedAt:
          $ref: '#/components/schemas/DateTimeOffset'
        isMembershipViaHrFeed:
          type: boolean
          description: True if membership is via HR feed. Read-only.
          example: true
        hrFeedPolicyDetails:
          $ref: '#/components/schemas/HrFeedPolicyDetails'
          description: User group details if membership is via HR feed. Read-only.
    PolicyCurrency:
      title: PolicyCurrency
      description: Currency for the policy.
      oneOf:
      - $ref: '#/components/schemas/CurrencyCodeWrapper'
      - $ref: '#/components/schemas/IsLinkedWrapper'
    HotelPolicyRuleType:
      type: string
      title: HotelPolicyRuleType
      description: Policy rule types applicable to hotel central tier exemption configuration.
      enum:
      - HOTEL_RESTRICTED_KEYWORDS
      - HOTEL_PROPERTY_TYPE
      - HOTEL_ADVANCE_BOOKING_WINDOW
      - HOTEL_RATING
      - MAX_HOTEL_PRICE_BY_LOCATION
      - MAX_HOTEL_BOOKING_PRICE
    HotelCancellationProps:
      type: object
      title: HotelCancellationProps
      description: Different types of cancellation rules for hotel booking.
      required:
      - type
      properties:
        type:
          type: string
          enum:
          - NONE
          - REFUNDABLE
          - REFUNDABLE_WITH_PENALTY
          - DONT_ALLOW
        conditionalRefundability:
          $ref: '#/components/schemas/ConditionalRefundability'
    QuestionFormat:
      type: string
      enum:
      - INPUT_BOX
      - RADIO_BUTTON
      - CHECKBOX
      - CHECKBOX_WITH_PERCENTAGE
      description: 'Question types. INPUT_BOX will make user enter a free flowing text.

        RADIO_BUTTON will have multiple options, user can select only one.

        CHECKBOX questions contain the possible set of options, from which the user can choose multiple options.

        CHECKBOX_WITH_PERCENTAGE is similar to checkbox, with the difference being that each option having an additional input field whose values must add up to 100.

        '
      example: CHECKBOX
    AirRestrictedFaresPropsWrapper:
      type: object
      title: AirRestrictedFaresPropsWrapper
      properties:
        airRestrictedFaresProps:
          $ref: '#/components/schemas/AirRestrictedFaresProps'
    MaxFlightBookingPricePropsWrapper:
      type: object
      title: MaxFlightBookingPricePropsWrapper
      properties:
        maxFlightBookingPriceProps:
          $ref: '#/components/schemas/MaxFlightBookingPriceProps'
    SimpleMoney:
      type: object
      title: SimpleMoney
      description: Money object containing just amount and currency code.
      required:
      - amount
      - currencyCode
      properties:
        amount:
          type: number
          format: double
          description: Amount
          example: 510
        currencyCode:
          type: string
          description: The 3-letter currency code defined in ISO 4217.
          example: GBP
    MaxFlightBookingPriceByDuration:
      type: object
      title: MaxFlightBookingPriceByDuration
      description: 'Air rule to describe whether to use default policy or different set of max booking price

        for different flight durations.

        '
      oneOf:
      - $ref: '#/components/schemas/IsLinkedWrapper'
      - $ref: '#/components/schemas/MaxFlightBookingPriceByDurationPropsWrapper'
    HighestFlightCabinOvernightPropsWrapper:
      type: object
      title: HighestFlightCabinOvernightPropsWrapper
      properties:
        highestFlightCabinOvernightProps:
          $ref: '#/components/schemas/HighestFlightCabinOvernightProps'
    AllTiersWrapper:
      type: object
      title: AllTiersWrapper
      properties:
        allTiers:
          type: boolean
          description: When true, all preference tiers are exempted for this rule.
    HotelAdvanceBookingWindowPropsWrapper:
      type: object
      title: HotelAdvanceBookingWindowPropsWrapper
      properties:
        hotelAdvanceBookingWindowProps:
          $ref: '#/components/schemas/HotelAdvanceBookingWindowProps'
    RestrictAirportTransfersPropsWrapper:
      type: object
      title: RestrictAirportTransfersPropsWrapper
      properties:
        restrictAirportTransfersProps:
          $ref: '#/components/schemas/RestrictAirportTransfersProps'
    MaxRailPricePerDuration:
      type: object
      title: MaxRailPricePerDuration
      description: Maximum price of a rail booking for given duration.
      required:
      - maxPrice
      - durationRange
      properties:
        maxPrice:
          $ref: '#/components/schemas/SimpleMoney'
        durationRange:
          $ref: '#/components/schemas/Int32Range'
    MaxFlightBookingPriceByDurationPropsWrapper:
      type: object
      title: MaxFlightBookingPriceByDurationPropsWrapper
      properties:
        maxFlightBookingPriceByDurationProps:
          $ref: '#/components/schemas/MaxFlightBookingPriceByDurationProps'
    FlightAdvanceBookingWindowInternationalProps:
      type: object
      title: FlightAdvanceBookingWindowInternationalProps
      description: Number of days in advance one can book an international flight.
      required:
      - numDaysInAdvance
      properties:
        numDaysInAdvance:
          type: integer
          format: int32
    TravelRegionType:
      type: string
      title: TravelRegionType
      description: Travel region Type
      enum:
      - DOMESTIC
      - INTERNATIONAL
      example: DOMESTIC
    HighestFlightCabinByDurationPropsWrapper:
      type: object
      title: HighestFlightCabinByDurationPropsWrapper
      properties:
        highestFlightCabinByDurationProps:
          $ref: '#/components/schemas/HighestFlightCabinByDurationProps'
    UniversalRule:
      type: object
      title: UniversalRule
      description: Policy Rules.
      required:
      - ruleType
      properties:
        ruleType:
          $ref: '#/components/schemas/PolicyRuleType'
        action:
          $ref: '#/components/schemas/Action'
        policyValue:
          $ref: '#/components/schemas/PolicyValue'
    FlightCabinUpgradeProps:
      type: object
      title: FlightCabinUpgradeProps
      description: Details whether flight cabin upgrade is allowed or not if cheaper.
      required:
      - isAllowed
      properties:
        isAllowed:
          type: boolean
    HotelPropertyTypePropsWrapper:
      type: object
      title: HotelPropertyTypePropsWrapper
      properties:
        hotelPropertyTypeProps:
          $ref: '#/components/schemas/HotelPropertyTypeProps'
    RestrictedAirlines:
      type: object
      title: RestrictedAirlines
      description: "Air rule to describe whether to use default policy or use the specific set of airlines that \nare restricted.\n"
      oneOf:
      - $ref: '#/components/schemas/IsLinkedWrapper'
      - $ref: '#/components/schemas/RestrictedAirlinesPropsWrapper'
    MaxRailBookingPriceByDurationProps:
      type: object
      title: MaxRailBookingPriceByDurationProps
      description: List of max price of rail booking for different rail duration.
      required:
      - maxPricePerDurationList
      properties:
        maxPricePerDurationList:
          type: array
          items:
            $ref: '#/components/schemas/MaxRailPricePerDuration'
        isTaxIncluded:
          type: boolean
          default: false
    ContinentPropsWrapper:
      type: object
      title: ContinentPropsWrapper
      properties:
        continentProps:
          $ref: '#/components/schemas/ContinentProps'
    HotelMedianRateProps:
      type: object
      title: HotelMedianRateProps
      description: Props for hotel median rate calculation.
      required:
      - searchRadius
      - ratingRange
      properties:
        searchRadius:
          description: Search radius within which candidate hotel has to be.
          $ref: '#/components/schemas/Length'
        ratingRange:
          description: Rating range of candidate hotels.
          $ref: '#/components/schemas/DoubleRange'
        hideRateStatistics:
          type: boolean
          default: false
          description: If true, rate statistics will be hidden.
        prepaidQualifier:
          type: string
          enum:
          - INCLUDE_PREPAID
          - EXCLUDE_PREPAID
          - PREPAID_ONLY
          description: Filter for prepaid rates to include in median calculation.
        refundableOnly:
          type: boolean
          default: false
          description: If true, only refundable rates will be included in median calculation.
        statisticalMethod:
          type: string
          enum:
          - MEDIAN
          - MEAN
          default: MEDIAN
          description: 'Statistical method used to calculate the recommended maximum hotel rate. Defaults to MEDIAN. Buffer and statistical method can be adjusted per policy.

            '
    ConditionalRefundability:
      type: object
      title: ConditionalRefundability
      description

# --- truncated at 32 KB (89 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/spotnana/refs/heads/main/openapi/spotnana-company-policies-api-openapi.yml