Channel Mappings
Per-channel availability & pricing for meals, value-added services, promotions, bank offers and coupons. Backs the channel_meal, channel_value_added_service, channel_promotion, channel_bank_offer and channel_coupon tables.
📄️ List bank offers on a channel
List bank offers on a channel
📄️ Upsert a channel-bank-offer mapping
Creates or overwrites the (channelId, bankOfferId) row and applies it to every listing carrying the tag. Listings marked as overrides are left untouched.
📄️ List coupons on a channel
List coupons on a channel
📄️ Upsert a channel-coupon mapping
Creates or overwrites the (channelId, couponId) row and applies it to every listing carrying the tag. Listings marked as overrides are left untouched.
📄️ List meals on a channel (paginated)
A channel holds one row per meal per tag, so this reads a page at a time. Default size is 50, capped at 200. The response is a page envelope: `data`, `total`, `page`, `size`.
📄️ Upsert a channel-meal mapping for one or more tags
Creates or overwrites the (channelId, mealId, tagName) row for every tag in `tagName`. The field takes an array, so one save can cover several tags — `'tagName': ['purple_coral', 'celest']` writes two mappings, each priced, enabled and deleted on its own. 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 is always an array, one persisted mapping per tag, in the order supplied.
📄️ List promotions on a channel
List promotions on a channel
📄️ Upsert a channel-promotion mapping
Creates or overwrites the (channelId, promotionId) row and applies it to every listing carrying the tag. Listings marked as overrides are left untouched.
📄️ List VAS on a channel (paginated)
A channel holds one row per VAS per tag, so this reads a page at a time. Default size is 50, capped at 200. The response is a page envelope: `data`, `total`, `page`, `size`.
📄️ Upsert a channel-VAS mapping
Creates or overwrites the (channelId, vasId, tagName) row. Optionally carries a structured `pricingConfig` so a channel can switch a flat-fee VAS to tiered/overage pricing without touching the catalog baseline.
📄️ Get a channel-bank-offer mapping
Get a channel-bank-offer mapping
📄️ Delete a channel-bank-offer mapping
Delete a channel-bank-offer mapping
📄️ Get a channel-coupon mapping
Get a channel-coupon mapping
📄️ Delete a channel-coupon mapping
Delete a channel-coupon mapping
📄️ Get a channel-meal mapping
Get a channel-meal mapping
📄️ Delete a channel-meal mapping under every tag
Removes the mapping under every tag for this (channelId, mealId). To drop the meal from one property only, call the per-tag form `DELETE /meals/{channelId}/{mealId}/{tagName}` instead.
📄️ Get a channel-promotion mapping
Get a channel-promotion mapping
📄️ Delete a channel-promotion mapping
Delete a channel-promotion mapping
📄️ Get a channel-VAS mapping
Get a channel-VAS mapping
📄️ Delete a channel-VAS mapping for one tag
Removes only the (channelId, vasId, tagName) row; the VAS stays mapped under the channel's other tags. A listing keeps the VAS when one of those remaining tags still covers it.
📄️ Re-apply every enabled channel mapping to the listings carrying its tag
Idempotent. Listing rows marked as overrides are left untouched. The returned counts are listings processed, not rows actually written — a listing already carrying an override is still counted even though the write is skipped. Covers tag-driven mappings only: an offer attached to a channel by listing (via ListingChannelOfferMappingService, keyed off channel_listing) rather than by tag is not re-applied by this backfill.
📄️ Reconcile tag fan-out
Removes listing-channel rows that no longer match any tag on the listing, then re-runs the fan-out. Rows marked as a per-listing override are never removed. Unlike /backfill, which only ever adds, this deletes — it is what repairs a listing whose tags changed while its mappings did not. Only meals and VAS are covered by the prune (promotions, bank offers and coupons can be attached straight to a channel with no tag involved, so an unjustified row for those three is not necessarily an orphan); the fan-out (add) side still covers all five. With `dryRun=true`, reports the same meals/VAS counts the real run would delete, per type, without deleting or fanning out anything.
📄️ Delete a channel-meal mapping for one tag
Removes only the (channelId, mealId, tagName) row; the meal stays mapped under the channel's other tags. A listing keeps the meal when one of those remaining tags still covers it.