Skip to main content

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 fieldSource
titlelisting.title
currencyINR (fixed)
country / state / citylisting location
addresslisting.addressLine
latitude / longitudelisting coordinates (as strings)
group_idchannexGroupId from channel config

Property → Room Type

Channex fieldSource
titleproperty.name (falls back to title)
count_of_roomsproperty.quantity
occ_adultsproperty.maxAdults
default_occupancyproperty.applicableAdult
occ_childrenproperty.maxChildren
occ_infants0

Rate Plan

One primary rate plan is created per room type:

Channex fieldValue
titleBest Available Rate
currencyINR
sell_modeper_room
rate_modemanual
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 FAILED with the error while the rest continue.
  • The webhook is only registered when none exists yet and channex.webhook.base-url is 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.