GET
Accor URL to Hotel ID API
Convert an Accor hotel URL into the id used by every property endpoint.
Overview
Pass an accor.com or *.accor.com hotel URL. StayAPI validates the host, extracts the property id locally, and returns a normalized URL without calling Accor upstream.
Endpoint URL
GET https://api.stayapi.com/v1/accor/hotel/url-to-id
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Required | An HTTP(S) Accor hotel URL, for example https://all.accor.com/hotel/2179/index.en.shtml. |
URL-encode the value
Pass the hotel URL through your HTTP client's params/query option. It will safely encode slashes and any tracking parameters for the outer request.
Response
- success: Always true on a 2xx response
- url: Normalized Accor URL
- hotel_id: Numeric or alphanumeric property id to use with Details, Amenities, Reviews, Rooms, Photos, and Price Calendar
Errors
400 INVALID_URL
The value is malformed, does not use HTTP(S), or is not on accor.com or an Accor subdomain.
400 HOTEL_ID_NOT_FOUND
The URL is on an allowed Accor host but does not contain a recognizable hotel id.
Next steps
Request
Response