Frontend API Change Impact Guide

This guide summarizes what frontend consumers need to change after recent pricing/import updates.

⚠️ Deprecation Note

Scope

Applies to:


1) Pricing API updates

1.1 Admin vs Customer write endpoints

Use separated admin/customer write paths:

Booking create integration:

Both return pricing response in the same shape as GET /v1/itinerary/:id/price-details.

Usage split:

1.2 Category values

Category fields are numeric enum values (not string labels) — HotelCategoryEnum (src/shared/enums/hotel-category.enum.ts):

For hotel_transfer and hotel_only scenarios, availableCategories in the price-details response always returns all five values [1,2,3,4,5]. Use categoryPerPersonPrices to determine which categories have actual pricing rows.

1.3 Slab banding rule

Vehicle slab auto-selection uses adults + children (extraMattressCount/childrenWithBed and infants are excluded from slab banding):

1.3.1 B2B category lock rule

1.4 defaultHotelCategory removed

1.5 Markup source changed

1.6 Booking channel must be b2c


2) Import Full Itinerary payload updates

Endpoint: POST /v1/itinerary/import-itinerary-full

2.1 Inventory references

Use IDs only:

Do not send old hotels[] / transfers[] create-resolve payloads.

2.2 Activities

activities[] are created and mapped day-wise.

Required fields per item:

Optional fields:

2.3 Hotel day-wise mapping

Explicit mapping supported via:

Validation:

Backward compatibility:

2.4 Transfer mapping


3) Inventory APIs response enrichments

3.1 Hotel inventory responses (import-related)

For check-inventory, search-inventory, and inventory responses, hotel objects now include:

POST /v1/hotel/check-inventory also returns:

3.2 Transfer inventory responses (import-related)

For check-by-name, search, and inventory responses, transfer objects now include:

POST /v1/transfer/check-by-name request is bulk:

{ "items": [{ "name": "Wagon R / Similar" }, { "name": "Innova / Similar" }] }

Response includes requestedName per item.

Transfer update validation:


4) Existing GET APIs and break-risk

The following endpoints are not route-changed by these updates:

Potential response/data adjustments frontend should tolerate:


5) Markup management APIs (admin)

Base: /v1/markup

Behavior rules:

5.1 Create specific-trip markup

POST /v1/markup

{
  "name": "Summer promo - selected trips",
  "isGlobal": false,
  "itineraryIds": [948, 950, 958],
  "type": 2,
  "amount": 7.5,
  "notes": "Percentage markup for selected trips",
  "isActive": true
}

5.2 Create all-trips markup

POST /v1/markup

{
  "name": "Default all-trips fallback",
  "isGlobal": true,
  "type": 1,
  "amount": 1200,
  "notes": "Flat fallback markup for all trips",
  "isActive": true
}

5.3 Update markup

PUT /v1/markup/:id

{
  "name": "Summer promo - revised",
  "isActive": true,
  "type": 2,
  "amount": 8.25,
  "notes": "Revised percentage",
  "addItineraryIds": [970],
  "removeItineraryIds": [950]
}

5.4 Normalized list/detail response (appliesTo)

{
  "id": 12,
  "name": "Summer promo - revised",
  "isGlobal": false,
  "type": 2,
  "amount": "8.25",
  "isActive": true,
  "appliesTo": {
    "type": "SPECIFIC_TRIPS",
    "tripIds": [948, 958, 970],
    "trips": [
      { "id": 948, "name": "Sikkim Delight" },
      { "id": 958, "name": "North East Premium" },
      { "id": 970, "name": "Bhutan Escape" }
    ]
  }
}

For all-trips markup:

{
  "appliesTo": {
    "type": "ALL_TRIPS",
    "tripIds": [],
    "trips": []
  }
}

6) Hotel mapping + primary + category update rules

6.1 checkInTime is optional in hotel create/update forms

6.2 Scoped primary rule (important)

Primary uniqueness is now enforced within:

Frontend requirements:

Example:

{
  "hotelId": 647,
  "itineraryId": 948,
  "locationId": 12,
  "category": 1,
  "isPrimary": true
}

Error handling:

6.3 Hotel category update guard for published itineraries

When updating hotel category (categoryId) in hotel update API:

Error returned:

6.4 Mapping category sync behavior


7) Tenant media URLs API

Endpoint:

Auth/headers:

Request body:

{
  "tenantId": 1
}

Response highlights:

Option C URL resolution rule:

Negative cases:


8) Frontend checklist