Catering
Clear prices, honest advice and no surprises along the way. Vegan, vegetarian and gluten-free dishes are marked clearly on every menu.
Overview
We measure success by how many guests come back and tell their friends. Book a table online in seconds, or call us for groups of eight or more. We have been feeding this neighbourhood for over a decade, and we still love it.
Installation
Install the SDK with the package manager your project already uses. It needs Node 18 or newer.
$ npm install @koraara-deck/sdk$ yarn add @koraara-deck/sdk$ pnpm add @koraara-deck/sdkConfiguration
Our terrace is open from spring to autumn, with heaters for cooler evenings. Private dining rooms seat up to forty guests for birthdays and business dinners. Create a file named koraara-deck.config.json in the project root:
{
"project": "koraara-deck",
"region": "us-east",
"categories": ["starters", "mains", "desserts"],
"retries": 2,
"timeoutMs": 4000,
"webhooks": { "enabled": true }
}| Option | Type | Default | Description |
|---|---|---|---|
project | string | - | Your project key from the dashboard. |
region | string | "us-east" | Data centre closest to your guests. |
retries | number | 3 | How often a failed call is retried. |
timeoutMs | number | 10000 | Time before a request is cancelled. |
webhooks.enabled | boolean | false | Send events to your endpoint. |
Your first request
Thousands of guests already trust us, and we work hard to keep it that way.
- Create an API keyOpen the dashboard, choose Settings › API keys and copy a new secret key.
- Store it safelyKeep the key in an environment variable, never in your source code.
- Make the callRun the snippet below; it prints the first page of results.
import { Client } from "@koraara-deck/sdk";
const client = new Client({ apiKey: process.env.API_KEY });
// list the newest dishs in one category
const page = await client.dishs.list({ category: "starters", limit: 20 });
for (const item of page.data) {
console.log(item.name, item.price);
}API reference
Every endpoint returns JSON and uses standard HTTP status codes.
/v1/dishesList dishes with paging and filters./v1/dishesCreate a new dish./v1/dishes/{id}Update some fields of a dish./v1/dishes/{id}Archive a dish; it can be restored for 30 days.{
"data": [
{ "id": "dish_2730", "name": "House lemonade", "price": 56 }
],
"has_more": true
}Troubleshooting
Next steps
Every detail is handled by people who care about getting it right.