Authentication
This API is authenticated with Restro-API-Key / Restro-API-Secret headers, issued to you by the tenant owner from their own RestroLab dashboard.
Partner authentication (everything you’ll use)
Section titled “Partner authentication (everything you’ll use)”Every partner-facing endpoint (/v1/restrolab/ping/, /v1/restro/dishes/*, /v1/restro/orders/*, /v1/hotels/roomtypes/, /v1/hotels/roomtypes/{room_type_id}/availability/, /v1/hotels/bookings/*, and /v1/restrolab/webhook/) is authenticated with two headers instead of a bearer token:
Restro-API-Key: YOUR_API_KEYRestro-API-Secret: YOUR_API_SECRETThe tenant is resolved entirely from this credential. Never send a restaurant_id, or hotel_id yourself.
Example request
Section titled “Example request”curl https://api.restrolab.com/v1/restro/dishes/ \ -H "Restro-API-Key: YOUR_API_KEY" \ -H "Restro-API-Secret: YOUR_API_SECRET"JavaScript
Section titled “JavaScript”const response = await fetch('https://api.restrolab.com/v1/restro/dishes/', { headers: { 'Restro-API-Key': 'YOUR_API_KEY', 'Restro-API-Secret': 'YOUR_API_SECRET', },});Python
Section titled “Python”import requests
response = requests.get( "https://api.restrolab.com/v1/restro/dishes/", headers={"Restro-API-Key": "YOUR_API_KEY", "Restro-API-Secret": "YOUR_API_SECRET"},)Feature gating (why you might get a 403)
Section titled “Feature gating (why you might get a 403)”A single credential can be valid for the Restro module, the Hotel module, or both. Each module is checked independently:
- A hotel-only tenant’s credential works against every hotel endpoint (
/v1/hotels/roomtypes/,/v1/hotels/roomtypes/{room_type_id}/availability/,/v1/hotels/bookings/*) and gets a403from every Restro endpoint (/v1/restro/dishes/*,/v1/restro/orders/*). - A restaurant-only tenant’s credential works the other way around.
- A tenant with both enabled can use either set of endpoints through the same credential.
This isn’t a problem with a specific request. It reflects which modules the tenant has enabled, and it won’t change until they enable the other module.
Security recommendations
Section titled “Security recommendations”- Never embed your
Restro-API-Key/Restro-API-Secretin client-side code, mobile apps, or public repositories. Call this API from your own backend. - Send requests only over HTTPS.
- Use a separate credential per tenant, and per environment where possible.
- If a credential may have been exposed, ask the tenant owner to rotate it immediately from their RestroLab dashboard.
- Store credentials in a secrets manager or environment variables, never in source control.
Common authentication errors
Section titled “Common authentication errors”| Status | Meaning | Response body |
|---|---|---|
401 Unauthorized |
No credential, an unknown/inactive Restro-API-Key, or a wrong Restro-API-Secret. |
{"code": "invalid_credentials", "message": "Invalid integration credentials."} |
403 Forbidden |
The credential is valid but the module you’re calling isn’t enabled for this tenant. | {"code": "error", "message": "You do not have permission to perform this action."}. See Feature gating above. |
See Error Handling for the full error envelope and every status/code combination.
