Developers & APIs

Integrate your Restaurant

Connect Dinr to your own ecosystem. We provide two simple ways to integrate: embedding the public screen directly into your website via Iframe, or developing custom flows using our REST API.

1. Embedding via Iframe

The simplest way to display the booking screen on your website is using an Iframe. By passing the ?embed=true parameter in your restaurant's booking URL, headers, footers and CTAs are automatically hidden to ensure a native and clean integration.

Example HTML Code:
<iframe 
  src="https://dev.dinr.pt/en/sua-slug-restaurante?embed=true" 
  width="100%" 
  height="650px" 
  style="border:none; background:transparent;">
</iframe>

2. API Authentication

For custom APIs, generate credentials in your dashboard under Settings > Developers. All calls to API endpoints must contain the Authorization or x-api-key header.

Authentication Header:
Authorization: Bearer dinr_live_suachavedoapirestaurante

3. Check Availability

Query available times and slots dynamically. Useful for building custom booking interfaces in chatbots, mobile apps, or websites without using the iframe.

GET/api/v1/availability?date=YYYY-MM-DD&party_size=2
Query Parameters:
  • date (required): date in YYYY-MM-DD format.
  • party_size (optional): number of people (default 2).
  • branch_id (optional): ID of a specific branch.
Example JSON Response (200 OK):
{
  "slots": [
    { "time": "19:00", "status": "available" },
    { "time": "19:30", "status": "available" },
    { "time": "20:00", "status": "waitlist" }
  ]
}

4. List Reservations

Retrieve reservations created in the restaurant filtering by date or status.

GET/api/v1/reservations?date=YYYY-MM-DD
Query Parameters:
  • date (optional): date in YYYY-MM-DD format.
  • status (optional): e.g. confirmed, pending, checked_in.
  • branch_id (optional): ID of a specific branch.
Example JSON Response (200 OK):
{
  "reservations": [
    {
      "id": "uuid-reserva",
      "guest_name": "António Silva",
      "guest_email": "antonio@email.com",
      "party_size": 4,
      "reservation_date": "2026-06-15",
      "reservation_time": "19:30:00",
      "status": "confirmed"
    }
  ]
}

5. Create Reservation

Create a reservation programmatically. Dining time and duration rules are calculated automatically based on your restaurant settings.

POST/api/v1/reservations
JSON Body (JSON):
{
  "guest_name": "Maria Cunha",
  "guest_email": "maria@email.com",
  "guest_phone": "+351912345678",
  "party_size": 2,
  "reservation_date": "2026-06-15",
  "reservation_time": "20:30:00",
  "branch_id": "uuid-da-filial",
  "special_request": "Mesa na janela"
}
Example JSON Response (201 Created):
{
  "reservation": {
    "id": "uuid-reserva-gerada",
    "guest_name": "Maria Cunha",
    "reservation_time": "20:30:00",
    "end_time": "22:00:00",
    "status": "confirmed"
  }
}