Returns the flat delivery rate (LKR), whether the requested date is available,
and — if not — the next available date plus reason. Kapruka delivers as a
single shipment per order at one flat rate regardless of item count.
If a `product_id` is supplied and the code matches a perishable family
(CAKE*, FLOWER*, COMBO*), an extra warning is added when the chosen
delivery date is more than 1 day out.
Args:
params (CheckDeliveryInput):
- city (str): Canonical city name (e.g. 'Colombo 03', 'Galle')
- delivery_date (Optional[str]): YYYY-MM-DD; defaults to today (LK time)
- product_id (Optional[str]): Optional, enables perishable warning
- response_format (str): 'markdown' (default) or 'json'
Returns:
str: Delivery feasibility + rate in the requested format.
JSON schema:
{
"city": str,
"now": str, # ISO timestamp, Sri Lanka time
"checked_date": str, # YYYY-MM-DD
"available": bool,
"rate": number, # flat LKR rate per order
"currency": "LKR",
"reason": str | null, # populated when available=false
"next_available_date": str|null, # populated when available=false
"perishable_warning": str | null # populated when product_id is perishable
}