Pricing APIs

Frontend integration contract for itinerary pricing flows.

Base

Category enum values

Pricing categories use HotelCategoryEnum numeric values:

Discount type values (when present in summary):


1) GET /v1/itinerary/:id/price-details

Source of truth for pricing table mode, defaults, and summary.

Supported query params

Common response envelope

{
  "message": "SUC_PRICE_DETAILS_FETCHED",
  "data": {
    "itineraryId": 958,
    "pricingTableType": "hotel_transfer",
    "mappingSnapshot": {
      "hasActivities": true,
      "hasHotels": true,
      "hasTransfers": true
    },
    "defaultCategory": 5,
    "availableCategories": [5, 2, 1],
    "selection": {
      "selectedCategory": 5,
      "selectedVehicleSlab": {
        "vehicleName": "Innova / Xylo / Similar",
        "capacityMin": 1,
        "capacityMax": 3
      },
      "travelerDetails": {
        "adults": 2,
        "children": 1,
        "infants": 0,
        "childrenWithBed": 0,
        "childrenWithoutBed": 1
      },
      "includeDinnerSupplement": false,
      "displayMode": 1
    },
    "pricingTable": {},
    "summary": {
      "channel": "b2b",
      "currency": "INR",
      "baseCost": 0,
      "markupPercent": 5,
      "markupAmount": 0,
      "gstPercent": 5,
      "gstAmount": 0,
      "tcsPercent": 0,
      "tcsAmount": 0,
      "discountType": 1,
      "discountValue": 0,
      "discountAmount": 0,
      "grandTotal": 0,
      "tcsApplicable": false
    }
  }
}

2) pricingTable by scenario

A) activities_only

{
  "pricingTableType": "activities_only",
  "pricingTable": {
    "activitiesOnly": {
      "adultPrice": 5000,
      "childPrice": 2000
    }
  }
}

B) hotel_only

{
  "pricingTableType": "hotel_only",
  "pricingTable": {
    "hotelRows": [
      {
        "category": 5,
        "plan": "CP",
        "extraBedPrice": 4050,
        "childWithoutBedPrice": 2100,
        "dinnerSupplementPrice": 1950
      },
      {
        "category": 2,
        "plan": "CP",
        "extraBedPrice": 5500,
        "childWithoutBedPrice": 3800,
        "dinnerSupplementPrice": 2400
      }
    ]
  }
}

C) transfer_only

{
  "pricingTableType": "transfer_only",
  "pricingTable": {
    "transferRows": [
      {
        "vehicleName": "Wagon R / Similar",
        "capacityMin": 1,
        "capacityMax": 3,
        "pricePerPerson": 15100
      },
      {
        "vehicleName": "Innova / Xylo / Similar",
        "capacityMin": 1,
        "capacityMax": 3,
        "pricePerPerson": 18400
      },
      {
        "vehicleName": "Innova / Xylo / Similar",
        "capacityMin": 4,
        "capacityMax": 6,
        "pricePerPerson": 12350
      }
    ]
  }
}

D) hotel_transfer

{
  "pricingTableType": "hotel_transfer",
  "pricingTable": {
    "rows": [
      {
        "category": 5,
        "plan": "CP",
        "extraBedPrice": 4050,
        "childWithoutBedPrice": 2100,
        "dinnerSupplementPrice": 1950,
        "vehiclePricing": [
          {
            "vehicleName": "Wagon R / Similar",
            "capacityMin": 1,
            "capacityMax": 3,
            "pricePerPerson": 15100
          },
          {
            "vehicleName": "Innova / Xylo / Similar",
            "capacityMin": 1,
            "capacityMax": 3,
            "pricePerPerson": 18400
          },
          {
            "vehicleName": "Innova / Xylo / Similar",
            "capacityMin": 4,
            "capacityMax": 6,
            "pricePerPerson": 12350
          }
        ]
      }
    ]
  }
}

3) PUT pricing-selection endpoints

Two write endpoints exist with different auth and persistence targets:

Request

{
  "channel": "b2b",
  "selectedCategory": 5,
  "selectedVehicleSlab": {
    "vehicleName": "Innova / Xylo / Similar",
    "capacityMin": 1,
    "capacityMax": 3
  },
  "travelerDetails": {
    "adults": 2,
    "children": 1,
    "infants": 0,
    "childrenWithBed": 0,
    "childrenWithoutBed": 1
  },
  "includeDinnerSupplement": true,
  "displayMode": 1,
  "activitiesOnly": {
    "adultPrice": 5000,
    "childPrice": 2000
  }
}

Response

Returns same pricing structure as GET /price-details with recalculated summary.

Customer endpoint also returns bookingId in data.

Notes:


4) B2B/B2C summary behavior


5) Other related pricing endpoints

A) GET /v1/itinerary/price-details/:leadId/:tripId

Public lead pricing endpoint.

B) GET /v1/itinerary/:id/customer-price-details

Customer-token variant of itinerary price-details endpoint.

C) PUT /v1/itinerary/:id/customer-pricing-selection

Customer write endpoint for pricing selection (booking persistence).

D) PUT /v1/itinerary/:id/travelers

Legacy compatibility endpoint. New UI should use PUT /pricing-selection.


6) Rules for frontend consumers


7) Publish validation matrix