Data APIContact us

API reference · v1

BedsChain Data API

One permanent ID for every hotel (the BCH ID), the hotel's details, and the code each supplier uses for it. Connect your supplier contracts to one hotel list, keep your content up to date, and match your own hotel list to ours.

  1. Subscribe. Choose a plan with the BedsChain team; you receive an API key.
  2. Whitelist your server. Call GET /ip from your server and send us the address; keys work only from whitelisted addresses.
  3. Check your key. Call GET /account to see your plan, countries and suppliers.
  4. Load the hotels. Page through GET /hotels (or download everything with /export).
  5. Stay current. Call GET /hotels/updated-since daily and refresh only what changed.
Base URL
https://unify.bedschain.com/api/v1

for Postman, Swagger or code generators.

Authentication

Send your API key in the X-API-Key header of every request, over HTTPS. Keys start with bcu_. Keep the key on your server, never in a browser or mobile app. If a key leaks, ask us to revoke it and issue a new one; a revoked key stops working within a minute.

Example
curl https://unify.bedschain.com/api/v1/account \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"

IP whitelisting. Requests are accepted only from your whitelisted server addresses (single addresses or ranges). Until one is whitelisted, every call answers 403 ip_not_whitelisted with the address we saw. GET /ip shows it.

Responses are JSON in UTF-8 (the full download is JSON Lines). Dates and times are ISO 8601 in UTC.

Plans

Your plan decides what the API returns. Supplier codes are shown only for the suppliers named in your subscription, which can also be limited to certain countries.

PlanHotel detailsSupplier codesMatch your listFull downloadHotels
Hotel Mapping–✓––All
Hotel Content✓–––All
Complete✓✓✓ up to 50,000✓All
Trial (7 days)✓✓✓ up to 500–Approved only

Identifiers of third-party mapping providers and suppliers' own data feeds are never part of the API.

Limits and errors

Each plan allows a number of requests per minute and per month (see /account). Over a limit the API answers 429 with a Retry-After header in seconds. Lists return at most 1,000 items per page; pass page from 0 until you have total items.

Error
{ "error": { "code": "not_in_plan", "message": "Supplier codes is not part of the Hotel Content plan." } }
StatusCodeMeaning
400bad_requestA parameter or file is wrong; the message says which.
401missing_api_key / invalid_api_keyNo key, an unknown or revoked key, or no active subscription.
403ip_not_whitelistedThe request came from an address not whitelisted for your account.
403not_in_plan / supplier_not_in_subscriptionYour plan or subscription does not include this.
404not_foundNo such hotel or list in your subscription.
429rate_limitedPer-minute or monthly limit reached; wait the seconds in Retry-After.

BCH IDs and merges

A BCH ID (for example BCH-00100001-8) never changes and is never reused; its last digit is a check digit. When two BCH IDs turn out to be the same hotel, one is merged into the other: the old ID keeps answering with "status": "Merged" and mergedInto, and appears in /hotels/updated-since. Values marked "verified": false come from suppliers and have not yet been confirmed by BedsChain.

Account

Your IP address

GET/ip

The address BedsChain sees your requests coming from. Send it to us to have it whitelisted; no key is needed for this call.

Plans: Everyone

Request
curl "https://unify.bedschain.com/api/v1/ip" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"
Response
{ "ip": "203.0.113.7" }

Your subscription

GET/account

Your plan, subscription dates, countries and suppliers, what your plan includes, and your limits. Call it first to check your key.

Plans: All plans

Request
curl "https://unify.bedschain.com/api/v1/account" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"
Response
{
  "customer": "Acme Travel",
  "plan": { "code": "complete", "name": "Complete" },
  "subscription": { "startsOn": "2026-10-12", "endsOn": null, "countries": ["AE"], "suppliers": ["SUPPLIER_A", "SUPPLIER_B"] },
  "features": { "hotelContent": true, "supplierCodes": true, "inventoryMapping": true, "bulkDownload": true, "publishedHotelsOnly": false },
  "limits": { "requestsPerMinute": 300, "requestsPerMonth": 1000000, "maxInventoryHotels": 50000 }
}

Locations

Countries

GET/countries

Countries in your subscription and how many hotels each has.

Plans: All plans

Request
curl "https://unify.bedschain.com/api/v1/countries" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"
Response
[ { "iso2": "AE", "name": "United Arab Emirates", "hotels": 1250 } ]

Cities

GET/cities

Cities of one country with their hotel counts. City IDs are permanent; use them to filter hotels.

Plans: All plans

ParameterInDescription
countryrequiredstringqueryISO 3166 alpha-2 country codee.g. AE
Request
curl "https://unify.bedschain.com/api/v1/cities?country=AE" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"
Response
[ { "id": "CITY-292223", "name": "Dubai", "division": "Dubai", "latitude": 25.07725, "longitude": 55.30927, "hotels": 820 } ]

Hotels

List and search hotels

GET/hotels

A page of hotels ordered by BedsChain hotel ID (BCH ID). Hotel details come with the Hotel Content and Complete plans; supplier codes with Hotel Mapping and Complete, for the suppliers in your subscription. Descriptions and photos are included where BedsChain may pass them on; facilities use BedsChain's own list.

Plans: All plans

ParameterInDescription
countrystringqueryISO country codee.g. AE
cityIdstringqueryCity ID from /citiese.g. CITY-292223
namestringqueryPart of the hotel namee.g. marina
updatedSincedate-timequeryOnly hotels changed since then (UTC)e.g. 2026-10-01
verifiedbooleanquerytrue: only hotels verified by BedsChain (a person checked name, city, map position and every supplier link; any later change ends it)e.g. true
pageintegerqueryPage number, from 0e.g. 0
limitintegerqueryHotels per page, up to 1,000 (default 100)e.g. 100
Request
curl "https://unify.bedschain.com/api/v1/hotels?country=AE&cityId=CITY-292223&limit=100&page=0" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"
Response
{
  "page": 0,
  "limit": 100,
  "total": 820,
  "hotels": [
    {
      "bchId": "BCH-00100001-8",
      "status": "Active",
      "mergedInto": null,
      "country": "AE",
      "updatedAt": "2026-10-12T13:01:22Z",
      "verified": true,
      "verifiedAt": "2026-10-15T09:40:00Z",
      "name": "Marina Palace",
      "propertyType": "Hotel",
      "address": { "street": "Dubai Marina", "postalCode": null },
      "city": { "id": "CITY-292223", "name": "Dubai" },
      "area": { "id": "AREA-AE-DUBAI-MARINA", "name": "Dubai Marina" },
      "location": { "latitude": 25.0801, "longitude": 55.1402, "verified": false },
      "starRating": { "value": 5, "verified": false },
      "phones": ["+971 4 555 0101"],
      "websites": [],
      "description": "Set on Dubai Marina, the hotel offers …",
      "images": ["https://images.example/marina-palace/1.jpg"],
      "facilities": ["Fitness centre", "Outdoor pool", "Restaurant", "Wi-Fi"],
      "quality": { "score": 75, "status": "Incomplete" },
      "supplierCodes": [
        { "supplier": "SUPPLIER_A", "code": "A12345" },
        { "supplier": "SUPPLIER_B", "code": "B-77821" }
      ]
    }
  ]
}

One hotel

GET/hotels/{bchId}

One hotel by BCH ID, in the same shape as the list. If the hotel turned out to be a duplicate and was merged, it answers with "status": "Merged" and mergedInto: use that BCH ID from then on.

Plans: All plans

ParameterInDescription
bchIdrequiredstringpathBedsChain hotel IDe.g. BCH-00100001-8
Request
curl "https://unify.bedschain.com/api/v1/hotels/BCH-00100001-8" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"
Response
{
  "bchId": "BCH-00100001-8",
  "status": "Active",
  "mergedInto": null,
  "country": "AE",
  "updatedAt": "2026-10-12T13:01:22Z",
  "verified": true,
  "verifiedAt": "2026-10-15T09:40:00Z",
  "name": "Marina Palace",
  "propertyType": "Hotel",
  "address": { "street": "Dubai Marina", "postalCode": null },
  "city": { "id": "CITY-292223", "name": "Dubai" },
  "area": { "id": "AREA-AE-DUBAI-MARINA", "name": "Dubai Marina" },
  "location": { "latitude": 25.0801, "longitude": 55.1402, "verified": false },
  "starRating": { "value": 5, "verified": false },
  "phones": ["+971 4 555 0101"],
  "websites": [],
  "description": "Set on Dubai Marina, the hotel offers …",
  "images": ["https://images.example/marina-palace/1.jpg"],
  "facilities": ["Fitness centre", "Outdoor pool", "Restaurant", "Wi-Fi"],
  "quality": { "score": 75, "status": "Incomplete" },
  "supplierCodes": [
    { "supplier": "SUPPLIER_A", "code": "A12345" },
    { "supplier": "SUPPLIER_B", "code": "B-77821" }
  ]
}

What changed

GET/hotels/updated-since

BCH IDs whose details, supplier codes or status changed since a moment, merged hotels included. Store the time of each call and pass it next time to refresh only what changed.

Plans: All plans

ParameterInDescription
sincerequireddate-timequeryUTC date or date-timee.g. 2026-10-01T00:00:00Z
pageintegerqueryPage number, from 0e.g. 0
limitintegerqueryIDs per page, up to 1,000e.g. 1000
Request
curl "https://unify.bedschain.com/api/v1/hotels/updated-since?since=2026-10-01T00:00:00Z" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"
Response
{ "since": "2026-10-01T00:00:00+00:00", "page": 0, "limit": 1000, "total": 2, "ids": ["BCH-00100001-8", "BCH-00100002-6"] }

Full download

GET/export

Every hotel in your subscription as JSON Lines: one hotel per line, in the list shape. Use it for the first load, then /hotels/updated-since for changes.

Plans: Complete

Request
curl "https://unify.bedschain.com/api/v1/export" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"
Response
{"bchId":"BCH-00100001-8","status":"Active","name":"Marina Palace", … }
{"bchId":"BCH-00100002-6","status":"Active","name":"Creek Hotel", … }

Supplier codes

Supplier codes to BCH IDs

GET/mappings/{supplier}

Every hotel code of one supplier in your subscription with its BCH ID. Two supplier codes with the same BCH ID are the same hotel, which is how you connect your supplier contracts to one hotel list.

Plans: Hotel Mapping, Complete, Trial

ParameterInDescription
supplierrequiredstringpathA supplier code as listed in your subscription (GET /account)e.g. SUPPLIER_A
codestringqueryLook up one supplier hotel codee.g. A12345
pageintegerqueryPage number, from 0e.g. 0
limitintegerqueryCodes per page, up to 1,000e.g. 1000
Request
curl "https://unify.bedschain.com/api/v1/mappings/SUPPLIER_A?code=A12345" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"
Response
{
  "supplier": "SUPPLIER_A",
  "page": 0,
  "limit": 1000,
  "total": 1,
  "mappings": [ { "supplierHotelCode": "A12345", "bchId": "BCH-00100001-8", "supplierStatus": "Active", "updatedAt": "2026-10-12T09:41:07Z" } ]
}

Mapping changes feed

GET/mappings/changes

Every supplier code whose mapping changed, oldest first, so you can keep your own mapping table in step without downloading everything again. Added: the code now points to a BCH ID. Moved: it now points to another BCH ID (for example after two hotels were merged; previousBchId says which). Removed: it no longer points to one. Start with since, then pass the resumeKey from each answer until hasMore is false; store the last resumeKey for next time.

Plans: Hotel Mapping, Complete, Trial

ParameterInDescription
sincedate-timequeryChanges from this moment (needed on the first call)e.g. 2026-10-01T00:00:00Z
resumeKeystringqueryFrom the previous answer, to continue where it stopped
supplierstringqueryOnly one supplier in your subscriptione.g. SUPPLIER_A
limitintegerqueryChanges per call, up to 1,000e.g. 1000
Request
curl "https://unify.bedschain.com/api/v1/mappings/changes?since=2026-10-01T00:00:00Z" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"
Response
{
  "since": "2026-10-01T00:00:00+00:00",
  "count": 2,
  "hasMore": false,
  "resumeKey": "NjM4OTUxMjk2MDAwMDAwMDAwfE1BUC1CQ0gtMDAwMDAwMTJ8Mg",
  "changes": [
    { "change": "Added", "supplier": "SUPPLIER_A", "supplierHotelCode": "A12345", "bchId": "BCH-00100001-8", "previousBchId": null, "reason": null, "changedAt": "2026-10-12T09:41:07Z" },
    { "change": "Moved", "supplier": "SUPPLIER_B", "supplierHotelCode": "B-77821", "bchId": "BCH-00100001-8", "previousBchId": "BCH-00100044-1", "reason": "Merged", "changedAt": "2026-10-13T08:02:55Z" }
  ]
}

Look up many codes

POST/mappings/lookup

Up to 1,000 supplier hotel codes in one call, for example the hotels in today's bookings. Each comes back with its BCH ID, in the order you sent them. status is Mapped, NotMapped, NotInSubscription, or SwitchedOff (you switched that supplier off for the hotel, its city or country in the portal).

Plans: Hotel Mapping, Complete, Trial

ParameterInDescription
bodyrequiredapplication/jsonbody{"codes": [{"supplier", "code"}]}
Request
curl -X POST "https://unify.bedschain.com/api/v1/mappings/lookup" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @hotels.csv
hotels.csv (application/json)
{ "codes": [ { "supplier": "SUPPLIER_A", "code": "A12345" }, { "supplier": "SUPPLIER_B", "code": "B-00000" } ] }
Response
{
  "results": [
    { "supplier": "SUPPLIER_A", "supplierHotelCode": "A12345", "bchId": "BCH-00100001-8", "status": "Mapped", "supplierStatus": "Active" },
    { "supplier": "SUPPLIER_B", "supplierHotelCode": "B-00000", "bchId": null, "status": "NotMapped", "supplierStatus": null }
  ]
}

History of one code

GET/mappings/{supplier}/{code}/history

Every version of one supplier hotel's mapping: which BCH ID it pointed to, its status and when it changed. Useful when a booking was made against an older mapping.

Plans: Hotel Mapping, Complete, Trial

ParameterInDescription
supplierrequiredstringpathA supplier in your subscriptione.g. SUPPLIER_A
coderequiredstringpathThe supplier's hotel codee.g. A12345
Request
curl "https://unify.bedschain.com/api/v1/mappings/SUPPLIER_A/A12345/history" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"
Response
{
  "supplier": "SUPPLIER_A",
  "supplierHotelCode": "A12345",
  "supplierStatus": "Active",
  "firstSeenAt": "2026-10-10T06:00:00Z",
  "lastSeenAt": "2026-10-13T06:00:00Z",
  "history": [ { "version": 1, "bchId": "BCH-00100001-8", "status": "Mapped", "confidence": 98.5, "reason": null, "changedAt": "2026-10-10T06:12:40Z" } ]
}

Your hotel list

Match your hotel list

POST/inventories

Send your own hotel list as CSV or JSON; it is matched to BCH IDs straight away. hotel_code and name are required; country, latitude/longitude, address, city and stars make matches far better. Each hotel comes back Mapped (the same hotel), Review (probably the same: please check) or Unmapped.

Plans: Complete, Trial

ParameterInDescription
namestringqueryA name for the liste.g. My hotels
bodyrequiredtext/csv or application/jsonbodyHeader row: hotel_code, name, address, city, country, latitude, longitude, stars
Request
curl -X POST "https://unify.bedschain.com/api/v1/inventories?name=My%20hotels" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY" \
  -H "Content-Type: text/csv" \
  --data-binary @hotels.csv
hotels.csv (text/csv)
hotel_code,name,address,city,country,latitude,longitude,stars
A1,Marina Palace,Dubai Marina,Dubai,AE,25.0801,55.1402,5
A2,Nowhere Inn,,,AE,24.0,54.0,
Response
{ "id": "6f2c1e0a-6a51-4c5e-9d0e-2b1f8f0d7a11", "name": "My hotels", "status": "Completed", "createdAt": "2026-10-12T14:02:11Z", "hotels": 2, "mapped": 1, "review": 0, "unmapped": 1 }

Your lists

GET/inventories

The hotel lists you have sent, newest first.

Plans: Complete, Trial

Request
curl "https://unify.bedschain.com/api/v1/inventories" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"
Response
[ { "id": "6f2c1e0a-…", "name": "My hotels", "status": "Completed", "hotels": 2, "mapped": 1, "review": 0, "unmapped": 1 } ]

Match results

GET/inventories/{id}

Each hotel of a list with its BCH ID, confidence (0 to 100) and the reason.

Plans: Complete, Trial

ParameterInDescription
idrequireduuidpathList ID
resultstringqueryMapped, Review or Unmappede.g. Mapped
pageintegerqueryPage number, from 0e.g. 0
limitintegerqueryHotels per page, up to 1,000e.g. 1000
Request
curl "https://unify.bedschain.com/api/v1/inventories/6f2c1e0a-6a51-4c5e-9d0e-2b1f8f0d7a11?result=Mapped" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"
Response
{
  "inventory": { "id": "6f2c1e0a-…", "name": "My hotels", "hotels": 2, "mapped": 1, "review": 0, "unmapped": 1 },
  "page": 0,
  "limit": 1000,
  "total": 1,
  "hotels": [ { "hotelCode": "A1", "name": "Marina Palace", "result": "Mapped", "confidence": 95, "reason": "Same name, 14 m apart.", "bchId": "BCH-00100001-8", "bchName": "Marina Palace" } ]
}

Delete a list

DELETE/inventories/{id}

Removes a list and its results. Answers 204 No Content.

Plans: Complete, Trial

ParameterInDescription
idrequireduuidpathList ID
Request
curl -X DELETE "https://unify.bedschain.com/api/v1/inventories/6f2c1e0a-6a51-4c5e-9d0e-2b1f8f0d7a11" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"
Response
(no content)

Match one hotel now

POST/match

Match a single hotel (or up to 50) straight away, without creating a list: for example when a new hotel appears in your system. Same rules and answers as list matching.

Plans: Complete, Trial

ParameterInDescription
bodyrequiredapplication/jsonbodyOne hotel, or {"hotels": [...]}: name (required), hotelCode, address, city, country, latitude, longitude, stars
Request
curl -X POST "https://unify.bedschain.com/api/v1/match" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @hotels.csv
hotels.csv (application/json)
{ "hotelCode": "A1", "name": "Marina Palace", "country": "AE", "latitude": 25.0801, "longitude": 55.1402 }
Response
{ "results": [ { "hotelCode": "A1", "name": "Marina Palace", "result": "Mapped", "bchId": "BCH-00100001-8", "confidence": 95, "reason": "Same name, 14 m apart." } ] }

Coverage & reference

Coverage statistics

GET/statistics

For each supplier in your subscription: how many of its hotels are mapped to a BCH ID, how many are being checked by our team, and how many are not mapped yet, in total and per country.

Plans: All plans

Request
curl "https://unify.bedschain.com/api/v1/statistics" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"
Response
{
  "generatedAt": "2026-10-13T20:00:00Z",
  "masterHotels": 2092,
  "suppliers": [
    { "supplier": "SUPPLIER_A", "supplierHotels": 1250, "mapped": 1190, "inReview": 41, "notMapped": 19, "mappedPercent": 95.2,
      "byCountry": [ { "country": "AE", "supplierHotels": 1250, "mapped": 1190, "inReview": 41, "notMapped": 19 } ] }
  ]
}

Reference lists

GET/reference

The fixed lists hotel fields use: property types, BedsChain facilities with their group, brands, and the problems you can report with POST /feedback.

Plans: All plans

Request
curl "https://unify.bedschain.com/api/v1/reference" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"
Response
{
  "propertyTypes": ["Apartment", "Hotel", "Resort"],
  "facilities": [ { "key": "outdoor-pool", "name": "Outdoor pool", "group": "Leisure" } ],
  "brands": [ { "id": "BRD-000001", "name": "Example Brand" } ],
  "problems": ["WrongMapping", "Duplicate", "WrongDetails", "Closed", "Other"]
}

Feedback

Report a problem

POST/feedback

Tell us when a mapping is wrong (for example a guest was sent to a different hotel), two BCH IDs are the same hotel, details are wrong, or a hotel has closed. Our team checks every report; follow it with GET /feedback. Give bchId, or supplier and supplierHotelCode.

Plans: All plans

ParameterInDescription
bodyrequiredapplication/jsonbodyproblem (WrongMapping, Duplicate, WrongDetails, Closed or Other), bchId, supplier, supplierHotelCode, otherBchId, bookingReference, message
Request
curl -X POST "https://unify.bedschain.com/api/v1/feedback" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @hotels.csv
hotels.csv (application/json)
{ "problem": "WrongMapping", "supplier": "SUPPLIER_A", "supplierHotelCode": "A12345", "bookingReference": "BK-77", "message": "The guest arrived at a different hotel." }
Response
{ "id": "0b7d3c1e-2f4a-4d7b-8b8e-6a1f0c9e2d31", "status": "Open" }

Your reports

GET/feedback

Your reports, newest first, with their status (Open, Resolved or Rejected) and what our team did.

Plans: All plans

Request
curl "https://unify.bedschain.com/api/v1/feedback" \
  -H "X-API-Key: $BEDSCHAIN_API_KEY"
Response
[ { "id": "0b7d3c1e-…", "problem": "WrongMapping", "supplier": "SUPPLIER_A", "supplierHotelCode": "A12345", "status": "Resolved", "resolution": "Mapping corrected.", "createdAt": "2026-10-13T10:12:00Z", "resolvedAt": "2026-10-13T11:40:00Z" } ]