Catalogue Mapping
Onboarding pushes a listing and its properties into Channex as a property, room types and rate plans, then registers a booking webhook. The operation is idempotent — re-running it updates the existing Channex entities using the stored UUIDs.
Onboard a Listing
POST /api/v1/admin/channex/listings/{listingId}/onboard?channelId=chnl_X
Response (ChannexSyncService.SyncResult):
{
"listingId": "lst_0853ie",
"status": "SYNCED",
"messages": [
"property created: 5f8a…",
"room_type prop_20Etl54TyDHROM → 7c2b… (rate_plan a91d…)",
"webhook created: e4f1…"
]
}
Field Mapping
Listing → Property
| Channex field | Source |
|---|---|
title | listing.title |
currency | INR (fixed) |
country / state / city | listing location |
address | listing.addressLine |
latitude / longitude | listing coordinates (as strings) |
group_id | channexGroupId from channel config |
Property → Room Type
| Channex field | Source |
|---|---|
title | property.name (falls back to title) |
count_of_rooms | property.quantity |
occ_adults | property.maxAdults |
default_occupancy | property.applicableAdult |
occ_children | property.maxChildren |
occ_infants | 0 |
Rate Plan
One primary rate plan is created per room type:
| Channex field | Value |
|---|---|
title | Best Available Rate |
currency | INR |
sell_mode | per_room |
rate_mode | manual |
options[0] | { occupancy: maxAdults, is_primary: true } |
Idempotency & Status
- The first onboard creates entities; subsequent calls update them in place via the stored
channex_property_id/channex_room_type_id/channex_rate_plan_id. - Each property/room-type result is recorded independently — if one room type fails, its mapping row is marked
FAILEDwith the error while the rest continue. - The webhook is only registered when none exists yet and
channex.webhook.base-urlis configured.
Inspect Sync Status
GET /api/v1/admin/channex/listings/{listingId}/status
Returns the channex_property row and all channex_room_type rows for the listing, including status, lastError, and lastSyncedAt.