Quickstart
This page takes you from zero to your first successful call to the RestroLab API.
There are two roles in this flow, and it helps to keep them straight:
- The organization owner (the restaurant/hotel) creates a credential in RestroLab and gives it to you once. They sign in to RestroLab with their own login, which you never see.
- Your platform uses that credential on every call described on this site. Your platform never logs into RestroLab directly.
1. Get API credentials from the tenant owner
Section titled “1. Get API credentials from the tenant owner”Credentials are created by the tenant owner, not by you. The owner:
- Logs into RestroLab with their own login and generates a credential .
- Receives an
api_keyandapi_secret, shown exactly once. - Pastes those two values into your platform’s own settings/integration page.
From here on, your platform only calls the partner-facing endpoints below using the api_key / api_secret the owner gave you.
2. Configure your credentials securely
Section titled “2. Configure your credentials securely”Store the credential in environment variables. Never hardcode it or commit it to version control.
# .env (never commit this file)RESTROLAB_API_KEY=the_api_key_the_owner_gave_youRESTROLAB_API_SECRET=the_api_secret_the_owner_gave_youexport RESTROLAB_API_KEY="the_api_key_the_owner_gave_you"export RESTROLAB_API_SECRET="the_api_secret_the_owner_gave_you"JavaScript
Section titled “JavaScript”const apiKey = process.env.RESTROLAB_API_KEY;const apiSecret = process.env.RESTROLAB_API_SECRET;Python
Section titled “Python”import os
api_key = os.environ["RESTROLAB_API_KEY"]api_secret = os.environ["RESTROLAB_API_SECRET"]3. Check your connection
Section titled “3. Check your connection”Call GET /v1/restrolab/ping/ first. It confirms your key and secret work before you build anything else:
curl https://api.restrolab.com/v1/restrolab/ping/ \ -H "Restro-API-Key: $RESTROLAB_API_KEY" \ -H "Restro-API-Secret: $RESTROLAB_API_SECRET"{ "connected": true, "credential_label": "My Delivery Platform", "tenant": "Hillside Restaurant"}tenant tells you which organization this credential belongs to. A 401 means the key or secret is wrong, or the credential has been revoked.
4. Make your first API request
Section titled “4. Make your first API request”List the organization’s dish. The organization is resolved entirely from your credential, so you never send a tenant_id, restaurant_id, or hotel_id.
curl https://api.restrolab.com/v1/restro/dishes/ \ -H "Restro-API-Key: $RESTROLAB_API_KEY" \ -H "Restro-API-Secret: $RESTROLAB_API_SECRET"JavaScript
Section titled “JavaScript”const response = await fetch('https://api.restrolab.com/v1/restro/dishes/', { headers: { 'Restro-API-Key': apiKey, 'Restro-API-Secret': apiSecret, },});
const dishes = await response.json();console.log(dishes);Python
Section titled “Python”import requests
response = requests.get( "https://api.restrolab.com/v1/restro/dishes/", headers={"Restro-API-Key": api_key, "Restro-API-Secret": api_secret},)response.raise_for_status()print(response.json())5. Understand the response
Section titled “5. Understand the response”GET /v1/restro/dishes/ returns a JSON array of every active dish, sorted by name (see Pagination). When you place an order, send each dish’s sku as item_id:
[ { "id": "b3f1e2c0-9d3e-4a2b-8f1a-1234567890ab", "name": "Margherita Pizza", "sku": "PIZZA-MARG-01", "price": "9.99", "currency": "USD", "is_active": true }]See Your First Request for the full field list.
6. Continue to the API Reference
Section titled “6. Continue to the API Reference”Once your first request works, open the interactive API Reference. It’s generated from openapi.json and covers every endpoint (Restro menu and orders; Hotel rooms, availability, and reservations; webhooks), parameter, and schema.
