openapi: 3.0.3
info:
title: 'HERO API Documentation'
description: 'The HERO API provides a comprehensive and secure interface for integrating with our platform. This RESTful API enables seamless access to user management.'
version: 1.0.0
servers:
-
url: 'https://horeca-hero.com'
tags:
-
name: 'User management'
description: 'APIs for managing users'
components:
securitySchemes:
default:
type: http
scheme: bearer
description: 'To setup OAuth2 authentication please contact us at dev@horeca-hero.com.'
security:
-
default: []
paths:
/api-clients/v1/employees:
get:
summary: 'List users'
operationId: listUsers
description: ' Get a paginated list of users based on your client.'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
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
properties:
data:
type: array
example:
-
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'
items:
type: object
properties:
business_id:
type: string
example: business_live_87f15f0118f64e9fb9facaa95a24e2ab
employee_id:
type: string
example: user_54321
email:
type: string
example: john6@example.com
first_name:
type: string
example: John
last_name:
type: string
example: Doe
status:
type: string
example: inactive
role:
type: string
example: User
created_at:
type: string
example: '2025-05-09T10:06:52.000000Z'
updated_at:
type: string
example: '2025-05-09T10:06:52.000000Z'
links:
type: object
properties:
first:
type: string
example: 'https://horeca-hero.com/api-clients/v1/employees?page=1'
last:
type: string
example: 'https://horeca-hero.com/api-clients/v1/employees?page=2'
prev:
type: string
example: null
next:
type: string
example: 'https://horeca-hero.com/api-clients/v1/employees?page=2'
meta:
type: object
properties:
current_page:
type: integer
example: 1
from:
type: integer
example: 1
last_page:
type: integer
example: 2
links:
type: array
example:
-
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
items:
type: object
properties:
url:
type: string
example: null
label:
type: string
example: '« Zurück'
active:
type: boolean
example: false
path:
type: string
example: 'https://horeca-hero.com/api-clients/v1/employees'
per_page:
type: integer
example: 2
to:
type: integer
example: 2
total:
type: integer
example: 3
tags:
- 'User management'
post:
summary: 'Create user'
operationId: createUser
description: ' Create a user based on your body parameters.'
parameters: []
responses:
201:
description: ''
content:
application/json:
schema:
type: object
example:
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'
properties:
data:
type: object
properties:
business_id:
type: string
example: business_live_87f88f0888f64e8fb9facaa88a24e2ab
employee_id:
type: string
example: user_54321
email:
type: string
example: example@test.com
first_name:
type: string
example: John
last_name:
type: string
example: Doe
status:
type: string
example: inactive
role:
type: string
example: User
created_at:
type: string
example: '2025-05-09T10:06:52.000000Z'
updated_at:
type: string
example: '2025-05-09T10:06:52.000000Z'
tags:
- 'User management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
business_id:
type: string
description: 'The id of the business/location. The prefixed_id
of an existing record in the businesses table. Must not be greater than 255 characters.'
example: business_live_87f88f0888f64e8fb9facaa88a24e2ab
nullable: false
employee_id:
type: string
description: 'The id of the user. Must not be greater than 255 characters.'
example: user_54321
nullable: false
email:
type: string
description: 'The users email address. Must be a valid email address. Must not be greater than 255 characters.'
example: example@test.com
nullable: true
first_name:
type: string
description: 'The users first name. Must not be greater than 255 characters.'
example: John
nullable: false
last_name:
type: string
description: 'The users last name. Must not be greater than 255 characters.'
example: Doe
nullable: false
role:
type: string
description: 'The users role either User or GM. Must not be greater than 255 characters.'
example: User
nullable: true
enum:
- User
- GM
status:
type: string
description: "This won't be added to the examples. Must not be greater than 255 characters."
example: active
nullable: false
enum:
- active
- inactive
required:
- business_id
- employee_id
- first_name
- last_name
- status
'/api-clients/v1/employees/{employee}':
put:
summary: 'Update user'
operationId: updateUser
description: ' Update a user based on your body parameters by the given client and user id.'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
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'
properties:
data:
type: object
properties:
business_id:
type: string
example: business_live_87f88f0888f64e8fb9facaa88a24e2ab
employee_id:
type: string
example: user_54321
email:
type: string
example: example@test.com
first_name:
type: string
example: John
last_name:
type: string
example: Doe
status:
type: string
example: inactive
role:
type: string
example: User
created_at:
type: string
example: '2025-05-09T10:06:52.000000Z'
updated_at:
type: string
example: '2025-05-09T10:06:52.000000Z'
tags:
- 'User management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
business_id:
type: string
description: 'The id of the business/location. The prefixed_id
of an existing record in the businesses table. Must not be greater than 255 characters.'
example: business_live_87f88f0888f64e8fb9facaa88a24e2ab
nullable: false
employee_id:
type: string
description: 'The id of the user. Must not be greater than 255 characters.'
example: user_54321
nullable: false
email:
type: string
description: 'The users email address. Must be a valid email address. Must not be greater than 255 characters.'
example: example@test.com
nullable: true
first_name:
type: string
description: 'The users first name. Must not be greater than 255 characters.'
example: John
nullable: false
last_name:
type: string
description: 'The users last name. Must not be greater than 255 characters.'
example: Doe
nullable: false
role:
type: string
description: 'The users role either User or GM. Must not be greater than 255 characters.'
example: User
nullable: true
enum:
- User
- GM
status:
type: string
description: "This won't be added to the examples. Must not be greater than 255 characters."
example: active
nullable: false
enum:
- active
- inactive
required:
- business_id
- employee_id
- first_name
- last_name
- status
get:
summary: 'Show user details'
operationId: showUserDetails
description: ' Show user details based on your client and user id.'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
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'
properties:
data:
type: object
properties:
business_id:
type: string
example: business_live_87f88f0888f64e8fb9facaa88a24e2ab
employee_id:
type: string
example: user_54321
email:
type: string
example: example@test.com
first_name:
type: string
example: John
last_name:
type: string
example: Doe
status:
type: string
example: inactive
role:
type: string
example: User
created_at:
type: string
example: '2025-05-09T10:06:52.000000Z'
updated_at:
type: string
example: '2025-05-09T10:06:52.000000Z'
tags:
- 'User management'
delete:
summary: 'Update user'
operationId: updateUser
description: " Delete a user based on the given client and user id.\n "
parameters: []
responses:
204:
description: ''
422:
description: ''
content:
application/json:
schema:
type: object
example:
error: 'Only inactive users can be deleted.'
properties:
error:
type: string
example: 'Only inactive users can be deleted.'
tags:
- 'User management'
parameters:
-
in: path
name: employee
description: 'The ID of the user.'
example: user_54321
required: true
schema:
type: string