Introduction

The HERO API provides a comprehensive and secure interface for integrating with our platform. This RESTful API enables seamless access to user management.

This documentation aims to provide all the information needed to work with our API.
Please read the documentation carefully. Below you will find a list of all the endpoints and their respective operations. 

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

To setup OAuth2 authentication please contact us at dev@horeca-hero.com.

User management

APIs for managing users

List users

GET
https://horeca-hero.com
/api-clients/v1/employees
requires authentication

Get a paginated list of users based on your client.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Accept
Example:
application/json
Content-Type
Example:
application/json
Example request:
import requests
import json

url = 'https://horeca-hero.com/api-clients/v1/employees'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()
Example response:
{
    "data": [
        {
            "business_id": "business_live_87f15f0118f64e9fb9facaa95a24e2ab",
            "employee_id": "user_54321",
            "email": "john6@example.com",
            "first_name": "John",
            "last_name": "Doe",
            "status": "inactive",
            "role": "User",
            "created_at": "2025-05-09T10:06:52.000000Z",
            "updated_at": "2025-05-09T10:06:52.000000Z"
        },
        {
            "business_id": "business_live_87f15f0118f64e9fb9facaa95a24e2ab",
            "employee_id": "user_54321",
            "email": "john7@example.com",
            "first_name": "John",
            "last_name": "Doe",
            "status": "active",
            "role": "User",
            "created_at": "2025-05-09T10:07:34.000000Z",
            "updated_at": "2025-05-09T10:07:34.000000Z"
        }
    ],
    "links": {
        "first": "https://horeca-hero.com/api-clients/v1/employees?page=1",
        "last": "https://horeca-hero.com/api-clients/v1/employees?page=2",
        "prev": null,
        "next": "https://horeca-hero.com/api-clients/v1/employees?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 2,
        "links": [
            {
                "url": null,
                "label": "« Zurück",
                "active": false
            },
            {
                "url": "https://horeca-hero.com/api-clients/v1/employees?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "https://horeca-hero.com/api-clients/v1/employees?page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "https://horeca-hero.com/api-clients/v1/employees?page=2",
                "label": "Weiter »",
                "active": false
            }
        ],
        "path": "https://horeca-hero.com/api-clients/v1/employees",
        "per_page": 2,
        "to": 2,
        "total": 3
    }
}

Create user

POST
https://horeca-hero.com
/api-clients/v1/employees
requires authentication

Create a user based on your body parameters.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
import requests
import json

url = 'https://horeca-hero.com/api-clients/v1/employees'
payload = {
    "business_id": "business_live_87f88f0888f64e8fb9facaa88a24e2ab",
    "employee_id": "user_54321",
    "email": "example@test.com",
    "first_name": "John",
    "last_name": "Doe",
    "role": "User",
    "status": "active"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response:
{
    "data": {
        "business_id": "business_live_87f88f0888f64e8fb9facaa88a24e2ab",
        "employee_id": "user_54321",
        "email": "example@test.com",
        "first_name": "John",
        "last_name": "Doe",
        "status": "inactive",
        "role": "User",
        "created_at": "2025-05-09T10:06:52.000000Z",
        "updated_at": "2025-05-09T10:06:52.000000Z"
    }
}

Update user

PUT
https://horeca-hero.com
/api-clients/v1/employees/{employee}
requires authentication

Update a user based on your body parameters by the given client and user id.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

employee
string
required

The ID of the user.

Example:
user_54321

Body Parameters

Example request:
import requests
import json

url = 'https://horeca-hero.com/api-clients/v1/employees/user_54321'
payload = {
    "business_id": "business_live_87f88f0888f64e8fb9facaa88a24e2ab",
    "employee_id": "user_54321",
    "email": "example@test.com",
    "first_name": "John",
    "last_name": "Doe",
    "role": "User",
    "status": "active"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Example response:
{
    "data": {
        "business_id": "business_live_87f88f0888f64e8fb9facaa88a24e2ab",
        "employee_id": "user_54321",
        "email": "example@test.com",
        "first_name": "John",
        "last_name": "Doe",
        "status": "inactive",
        "role": "User",
        "created_at": "2025-05-09T10:06:52.000000Z",
        "updated_at": "2025-05-09T10:06:52.000000Z"
    }
}

Show user details

GET
https://horeca-hero.com
/api-clients/v1/employees/{employee}
requires authentication

Show user details based on your client and user id.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

employee
string
required

The ID of the user.

Example:
user_54321
Example request:
import requests
import json

url = 'https://horeca-hero.com/api-clients/v1/employees/user_54321'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()
Example response:
{
    "data": {
        "business_id": "business_live_87f88f0888f64e8fb9facaa88a24e2ab",
        "employee_id": "user_54321",
        "email": "example@test.com",
        "first_name": "John",
        "last_name": "Doe",
        "status": "inactive",
        "role": "User",
        "created_at": "2025-05-09T10:06:52.000000Z",
        "updated_at": "2025-05-09T10:06:52.000000Z"
    }
}

Update user

DELETE
https://horeca-hero.com
/api-clients/v1/employees/{employee}
requires authentication

Delete a user based on the given client and user id.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

employee
string
required

The ID of the user.

Example:
user_54321
Example request:
import requests
import json

url = 'https://horeca-hero.com/api-clients/v1/employees/user_54321'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()
Example response:
[Empty response]
{
    "error": "Only inactive users can be deleted."
}