Skip to main content

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.

Written by Bhushan

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 [email protected] 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:

`bash

-H "Content-Type: application/json" \

-d '{

"email": "[email protected]",

"password": "your-password"

}'

`

A successful response returns a JWT token:

`json

{

"token": "eyJhbGciOiJIUzI1NiIs...",

"user": {

"id": "user-uuid",

"email": "[email protected]",

"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:

`bash

-H "Authorization: Bearer YOUR_TOKEN_HERE" \

-H "Content-Type: application/json"

`

Example response:

`json

{

"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:

`bash

Get the menu for a specific shop

-H "Authorization: Bearer YOUR_TOKEN_HERE"

Get recent 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 [email protected] 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:

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

Did this answer your question?