Environments & Access
The two Hostme environments — production and test (QA): base URLs, access and the differences between them.
Hostme provides two environments: production and test (QA). We recommend debugging every integration on QA first and only then switching it to production.
Base URLs
| Environment | API base URL | Swagger UI |
|---|---|---|
| Production | https://api.hostmeapp.com | open |
| QA / Test | https://api-qa.hostmeapp.com | — |
All paths in the documentation are relative to the base URL. For example, the endpoint
/api/rsv/admin/restaurants/{restaurantId}/availability on production is
https://api.hostmeapp.com/api/rsv/admin/restaurants/123/availability.
Getting a token
The token is issued on the API base domain via POST /Token (form-urlencoded):
| Environment | Token endpoint |
|---|---|
| Production | https://api.hostmeapp.com/Token |
| QA / Test | https://api-qa.hostmeapp.com/Token |
For partners, grant_type=password, username and password are enough — client_id and scope
are not needed. See Authentication for details.
About swagger. In the specification, OAuth2 is declared with
tokenUrl: https://service.hostmeapp.com/token(the official authorization server), but in practice the token is also accepted on the API base domain ({API_BASE}/Token) — this is the path recommended for integrations.
How to get access
For an integration you will need:
- Credentials for obtaining a token (the login/password of a service account or partner access — issued by the Hostme team).
- The restaurant identifier (
restaurantId) — the numeric ID of the restaurant you work with. The list of available restaurants is returned byGET /api/core/admin/account/me(see Authentication). - For partner applications — the application’s
appId(see App Registration).
API access, service accounts and partner identifiers are issued on request to the Hostme team. This documentation describes how to use access that has already been granted.
Environment recommendations
- Don’t store tokens and credentials in code. Use secrets/environment variables.
- Test on QA. QA data is isolated from restaurants’ production data.
- Separate configuration. The base URL, token endpoint and
restaurantIdshould be environment parameters, not constants.