Quick Start for Developers
Get started with the Fleksa API — authentication, first API call, and webhooks
Quick Start for Developers
This guide walks you through authenticating with the Fleksa API, making your first request, and setting up webhooks for real-time order updates.
Base URLs
| Environment | Base URL |
|---|---|
| Production | https://apiv3.fleksa.com |
| Staging | https://apiqav3.fleksa.com |
Use the staging environment for development and testing. Never test against production with real restaurant data.
Get API Access
To use the Fleksa API, you need a partner account with API credentials.
- Existing partners: Use the same email and password you use for the Partner Portal
- New integrations: Contact developer@fleksa.com to request API access and a staging account
Once you have credentials, you can authenticate and start making API calls.
Authenticate
The Fleksa API uses JWT (JSON Web Token) authentication. Obtain a token by posting your credentials to the login endpoint:
curl -X POST https://apiqav3.fleksa.com/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "your@email.com",
"password": "your-password"
}'A successful response returns a JWT token:
{
"token": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"id": "user-uuid",
"email": "your@email.com",
"role": "ADMIN"
}
}Include this token in the Authorization header for all subsequent requests:
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...Tokens expire after a set period. If you receive a 401 Unauthorized response, re-authenticate to get a fresh token.
Make Your First API Call
Retrieve the list of shops (restaurants) associated with your account:
curl -X GET https://apiqav3.fleksa.com/shops \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json"Example response:
{
"shops": [
{
"id": "shop-uuid",
"name": "My Restaurant",
"address": "123 Main St",
"currency": "EUR",
"timezone": "Europe/Berlin"
}
]
}With a shop ID, you can access shop-specific endpoints:
# Get the menu for a specific shop
curl -X GET https://apiqav3.fleksa.com/shops/SHOP_ID/menu \
-H "Authorization: Bearer YOUR_TOKEN_HERE"
# Get recent orders
curl -X GET https://apiqav3.fleksa.com/shops/SHOP_ID/orders \
-H "Authorization: Bearer YOUR_TOKEN_HERE"Set Up Webhooks
Webhooks notify your system in real-time when events occur (new orders, payment status changes, etc.).
- Register a webhook URL -- Contact developer@fleksa.com with your endpoint URL and the events you want to receive
- Receive events -- Fleksa sends a
POSTrequest to your URL with a JSON payload for each event - Respond with 200 -- Your endpoint must return a
200 OKstatus within 10 seconds to acknowledge receipt
Common webhook events:
| Event | Description |
|---|---|
order.created | A new order has been placed |
order.status_changed | Order status updated (accepted, preparing, ready, completed) |
payment.captured | Payment successfully processed |
payment.failed | Payment attempt failed |
payment.refunded | A refund has been issued |
Always verify webhook payloads before processing. Implement idempotency in your webhook handler -- the same event may be delivered more than once.
Next Steps
- Explore the full API Reference for all available endpoints
- Read about Authentication & Permissions for role-based access
- See the Platform Overview for context on data models and product architecture