Skip to content

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_KEY
Restro-API-Secret: YOUR_API_SECRET

The tenant is resolved entirely from this credential. Never send a restaurant_id, or hotel_id yourself.

Terminal window
curl https://api.restrolab.com/v1/restro/dishes/ \
-H "Restro-API-Key: YOUR_API_KEY" \
-H "Restro-API-Secret: YOUR_API_SECRET"
const response = await fetch('https://api.restrolab.com/v1/restro/dishes/', {
headers: {
'Restro-API-Key': 'YOUR_API_KEY',
'Restro-API-Secret': 'YOUR_API_SECRET',
},
});
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"},
)

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 a 403 from 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.

  • Never embed your Restro-API-Key / Restro-API-Secret in 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.
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.