Room Mapping API¶
The Room Mapping API provides room matching capabilities, allowing partners to automatically map room inventory between different suppliers using semantic name analysis empowered by AI-based techniques. It leverages modern AI and large language models to continuously improve matching accuracy, adapt to variations in naming conventions, and better understand contextual nuances across different suppliers over time.
Overview¶
The room mapping engine normalizes room descriptions, extracts semantic features (bed types, views, layout, amenities), and scores matches between target and source room inventories. This enables:
- Inventory reconciliation — Match your own room inventory against supplier rooms
- Multi-supplier mapping — Map rooms from one supplier to another
- Feature extraction — Understand the parsed semantic breakdown of each room name
Availability
Room mapping must be enabled for your partner account. Contact Evocative to request access. The only supported language is English.
Endpoints¶
POST /api/mapping/rooms¶
Map rooms for a single hotel. Provide your target rooms (reference inventory) and source rooms (to be matched), and the API returns which source rooms match which targets.
Authentication: Required (X-Api-Key)
Authorization: Requires room mapping enabled for partner
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
hotelId | string | Yes | Unique hotel identifier (evocativeId is acceptable) |
hotelName | string | Yes | Hotel display name |
country | string | Yes | Country code (2-letter ISO) |
targetRooms | array | No | Reference room inventory (rooms to match against). If omitted or empty, the API will automatically populate it from the Evocative inventory for hotelId. |
sourceRooms | array | Yes | Rooms to be matched to target rooms |
Auto-populated target rooms
When you leave targetRooms empty, the API fetches the room inventory for hotelId from the Evocative content catalog and uses it as the matching target. Auto-populated target rooms carry id (the Evocative room identifier) and description; supplierCode and roomCode are omitted. If the hotel is unknown or has no room content, the request proceeds with an empty target set (all your source rooms will come back under unmappedSourceRooms).
Room Object (used in both targetRooms and sourceRooms):
| Field | Type | Required | Description |
|---|---|---|---|
supplierCode | string | No | Supplier identifier (e.g., "EAN", "BOK"). Required for sourceRooms. For targetRooms it is optional — leave empty for your own inventory. |
id | string | Yes | Unique room identifier. Mandatory for every room in both targetRooms and sourceRooms — it is used as the grouping key in the response, and omitting it (or reusing the same value across rooms) will collapse distinct rooms into a single mapping group. |
description | string | Yes | Room name/description — primary input for matching |
roomCode | string | No | Room code/SKU |
price | number | No | Room price |
Example Request
curl -X POST "<BASE_URL>/api/mapping/rooms" \
-H "X-Api-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"hotelId": "12345",
"hotelName": "Grand Hotel Berlin",
"country": "DE",
"targetRooms": [
{
"supplierCode": "INT",
"id": "room-1",
"description": "Deluxe Double Room with City View",
"roomCode": "DDR-CV",
"price": 150.00
},
{
"supplierCode": "INT",
"id": "room-2",
"description": "Standard Twin Room",
"roomCode": "STR",
"price": 120.00
}
],
"sourceRooms": [
{
"supplierCode": "EAN",
"id": "ext-1",
"description": "Dlx Dbl City View",
"roomCode": "EAN-DDR"
},
{
"supplierCode": "EAN",
"id": "ext-2",
"description": "Twin Standard",
"roomCode": "EAN-STR"
},
{
"supplierCode": "EAN",
"id": "ext-3",
"description": "Presidential Suite",
"roomCode": "EAN-PS"
}
]
}'
Example Request — auto-populated target rooms
Omit targetRooms to have the API fetch the hotel's room inventory automatically:
curl -X POST "<BASE_URL>/api/mapping/rooms" \
-H "X-Api-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"hotelId": "R:12345",
"hotelName": "Grand Hotel Berlin",
"country": "DE",
"sourceRooms": [
{
"supplierCode": "EAN",
"id": "ext-1",
"description": "Dlx Dbl City View",
"roomCode": "EAN-DDR"
}
]
}'
Responses:
- 200 OK: Mapping results returned successfully
- 401 Unauthorized: Invalid/missing API key
- 403 Forbidden: Room mapping not enabled for this partner
- 429 Too Many Requests: Rate limit exceeded
- 502 Bad Gateway: Mapping service unavailable
Response Schema (200 OK):
| Field | Type | Description |
|---|---|---|
hotelId | string | Echo of the input hotel ID |
mappedRooms | array | Rooms that were successfully matched |
unmappedSourceRooms | array | Source rooms that could not be matched to any target |
Mapped Room Object:
| Field | Type | Description |
|---|---|---|
targetRoom | object | The target room that was matched |
sourceRooms | array | Source rooms matched to this target |
Example Response
{
"hotelId": "12345",
"mappedRooms": [
{
"targetRoom": {
"supplierCode": "INT",
"id": "room-1",
"description": "Deluxe Double Room with City View",
"roomCode": "DDR-CV",
"price": 150.00
},
"sourceRooms": [
{
"supplierCode": "EAN",
"id": "ext-1",
"description": "Dlx Dbl City View",
"roomCode": "EAN-DDR",
"price": null
}
]
},
{
"targetRoom": {
"supplierCode": "INT",
"id": "room-2",
"description": "Standard Twin Room",
"roomCode": "STR",
"price": 120.00
},
"sourceRooms": [
{
"supplierCode": "EAN",
"id": "ext-2",
"description": "Twin Standard",
"roomCode": "EAN-STR",
"price": null
}
]
}
],
"unmappedSourceRooms": [
{
"supplierCode": "EAN",
"id": "ext-3",
"description": "Presidential Suite",
"roomCode": "EAN-PS",
"price": null
}
]
}
POST /api/mapping/rooms/batch¶
Map rooms for multiple hotels in a single request. Each item follows the same format as the single-hotel endpoint.
Authentication: Required (X-Api-Key)
Authorization: Requires room mapping enabled for partner
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
items | array | Yes | Array of mapping requests (same schema as single endpoint) |
Example Request
curl -X POST "<BASE_URL>/api/mapping/rooms/batch" \
-H "X-Api-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"hotelId": "12345",
"hotelName": "Grand Hotel Berlin",
"country": "DE",
"targetRooms": [...],
"sourceRooms": [...]
},
{
"hotelId": "67890",
"hotelName": "Seaside Resort Bali",
"country": "ID",
"targetRooms": [...],
"sourceRooms": [...]
}
]
}'
Responses:
- 200 OK: Batch mapping results returned
- 401 Unauthorized: Invalid/missing API key
- 403 Forbidden: Room mapping not enabled for this partner
- 429 Too Many Requests: Rate limit exceeded
- 502 Bad Gateway: Mapping service unavailable
Response Schema (200 OK):
| Field | Type | Description |
|---|---|---|
results | array | Array of mapping responses, one per input item (same order) |
Each result follows the same schema as the single-hotel response.
Example Response
{
"results": [
{
"hotelId": "12345",
"mappedRooms": [
...
],
"unmappedSourceRooms": [
...
]
},
{
"hotelId": "67890",
"mappedRooms": [
...
],
"unmappedSourceRooms": [
...
]
}
]
}
Best Practices¶
-
Provide descriptive room names — The more detail in the
descriptionfield, the better the matching accuracy. Include bed types, views, and room categories when available. -
Include country — The
countryfield enables locale-aware matching and conditional rules that vary by region. -
Use batch for bulk operations — When mapping rooms for multiple hotels, use the batch endpoint to reduce HTTP overhead.
-
Handle unmapped rooms gracefully — Some source rooms may not match any target. Display these separately in your UI or apply fallback logic.
-
Skip
targetRoomswhen you don't maintain your own inventory — If you only want to map supplier rooms against Evocative's room catalog for a hotel, omittargetRoomsand the API will fill it in from our inventory for the givenhotelId. ProvidetargetRoomsexplicitly when you want to match against your own reference list.