How to use
Authentication
Every call needs the API key of an application subscribed to the product, sent in the apikey header.
Only POST with Content-Type: application/json is accepted.
curl -X POST "https://rec-api.accor.com/api/hub/hub-sandbox2/v1/graphql" \
-H "apikey: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"{ __typename }"}'
Headers
| Header | Required | Description |
|---|---|---|
apikey |
yes | API key of the consumer application. |
Content-Type |
yes | application/json. |
Accept-Language |
no | Locale of the response. |
Environments
| Environment | URL |
|---|---|
| DEV (sandbox) | https://dev-api.accor.com/api/hub/hub-sandbox/v1/graphql |
| REC | https://rec-api.accor.com/api/hub/hub-sandbox2/v1/graphql |
| PREPROD | https://pre-api.accor.com/api/hub/hub-oat/v1/graphql |
| PROD | https://api.accor.com/api/hub/pro/v1/graphql |
Errors
Errors produced by the gateway follow the platform format: {status, title, code, detail, requestId}.
Application errors of the GraphQL operation are returned with HTTP 200, in the response body.
Quote the requestId when contacting the support.