Meal Costs
Per-meal, per-tag pricing (adult and child cost). Updates propagate to channel_meal and downstream listing_channel_meal rows. Supports single, bulk, and CSV upload/export.
📄️ List meal costs (paginated)
Returns a page of meal cost rows. Default size is 20. When `mealId` is supplied, all matching rows are returned without pagination (cardinality is naturally small — one row per tag). When both `mealId` and `tagName` are supplied, the single matching row is returned.
📄️ Upsert meal costs for one or more tags
Sets the (mealId, tagName) → (perAdultCost, perChildCost) row for every tag in `tagName` and propagates to channels and listings. `tagName` is an array, so one configuration can cover several tags — `'tagName': ['GOA', 'DELHI']` writes two rows. A bare string is still accepted and read as a one-element array. Blank entries and an empty array are rejected; repeated tags are collapsed. The response `data` is always an array, one persisted row per tag, in the order supplied.
📄️ Export all meal costs as CSV
Streams `meal_costs.csv`.
📄️ Download a CSV template
Streams `meal_costs_sample.csv`.
📄️ Get one meal cost by id
Get one meal cost by id
📄️ Delete one meal cost by id
Delete one meal cost by id
📄️ Upsert meal costs in bulk
Bulk-applies a list of MealCost rows. Each row keyed by (mealId, tagName).
📄️ Bulk upsert from CSV upload
Multipart/form-data upload. Field name `file`. Use the `/sample` endpoint to download a template. A `BASE_PLUS_EXTRA` row carries its config in the `baseGuestCount`, `basePrice`, `perExtraAdultCost`, `perExtraChildCost` and `extraDiscountPercent` columns; leave those blank for `PER_PERSON`. The whole file is validated before anything is saved, and every fault is reported with its row number.