Fleksa

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

EnvironmentBase URL
Productionhttps://apiv3.fleksa.com
Staginghttps://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.).

  1. Register a webhook URL -- Contact developer@fleksa.com with your endpoint URL and the events you want to receive
  2. Receive events -- Fleksa sends a POST request to your URL with a JSON payload for each event
  3. Respond with 200 -- Your endpoint must return a 200 OK status within 10 seconds to acknowledge receipt

Common webhook events:

EventDescription
order.createdA new order has been placed
order.status_changedOrder status updated (accepted, preparing, ready, completed)
payment.capturedPayment successfully processed
payment.failedPayment attempt failed
payment.refundedA 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