Skip to main content

Version 1.1.5

🎯 Enhancements​

Hourly Package Selection Logic​

Changed: Package duration filter logic for hourly bookings

  • Previous behavior: Selected packages with duration >= requested duration
  • New behavior: Selects packages with duration <= requested duration
  • Impact: More intuitive package selection - shows packages that fit within requested time
  • Example:
    • Before: 5-hour request → returns 5h, 6h, 8h, 10h packages
    • After: 5-hour request → returns 1h, 2h, 3h, 5h packages

Update Booking API​

Enhanced: The Update Booking API now supports additional parameters and flexible datetime formats

New Optional Parameters​

luggage (Integer, Optional)​
  • Updates luggage count
  • No fare recalculation
passengers (Integer, Optional)​
  • Updates passenger count
  • No fare recalculation
pickup (Object, Optional)​
  • Updates pickup location
  • Required fields: latitude, longitude
  • Optional fields: address, city, country, postcode
  • No fare recalculation
destination (Object, Optional)​
  • Updates destination location
  • Required fields: latitude, longitude
  • Optional fields: address, city, country, postcode
  • No fare recalculation

Flexible Pickup DateTime Format​

The pickupDateTime parameter now accepts multiple formats for easier integration:

  • Simple format: "2024-10-17 14:30" (YYYY-MM-DD HH:mm)
  • With timezone: "2024-10-17T14:30:00.000+07:00"
  • UTC format: "2024-10-17T07:30:00.000Z" (still supported)

Example​

PATCH /api/demand/v1/bookings/:bookId
{
"pickupDateTime": "2024-10-17 14:30",
"luggage": 3,
"passengers": 4,
"pickup": {
"latitude": 13.7563,
"longitude": 100.5018,
"address": "New Address"
}
}

📋 Migration Notes​

Backward Compatibility: ✅ All changes are backward compatible

  1. Hourly Package Logic:

    • Existing bookings are not affected
    • Only new quote and booking requests are affected
    • No integration changes required
  2. Update Booking API:

    • All new parameters (luggage, passengers, pickup, destination) are optional
    • Multiple datetime formats supported: YYYY-MM-DD HH:mm, ISO 8601 with timezone, or UTC
    • Existing update calls work without any changes
    • You can adopt new parameters and formats when needed
    • All formats are supported indefinitely