Connected Molecules Api API Reference

Welcome to the Connected Molecules API reference. The Connected Molecules API is organized around the REST methodology, and it uses resource-oriented URLs, and common HTTP response codes to indicate API errors. All requests are authenticated using an access_token which can be obtained by calling POST /auth/login.

API Endpoint
https://api.connectedmolecules.com/
Contact: partnerservice@connectedmolecules.com
Schemes: https
Version: 1.0.0

Authentication

bearerAuth

Type
http
Scheme
bearer
Request header
Authorization
Format
Bearer <access_token>
More info
https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication

User

User Api

Login

POST /auth/login

It generates new access and refresh tokens for the user

username: string
password: string
Request Content-Types: application/json
Request Example
{
  "username": "string",
  "password": "string"
}
201 Created

Successful operation

type
object
400 Bad Request

Missing parameters

401 Unauthorized

Unauthorized. Returned when e-mail address is not confirmed

Response Content-Types: application/json
Response Example (201 Created)
{
  "access_token": "string",
  "refresh_token": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get authenticated user

GET /user/me

Get the information of the current logged-in user.

200 OK

successful operation

type
object
401 Unauthorized

Unauthorized

Response Content-Types: application/json
Response Example (200 OK)
{
  "id": "integer",
  "username": "string",
  "email": "string",
  "language": {
    "id": "integer",
    "name": "string",
    "address": "string",
    "postcode": "string",
    "city": "string",
    "country": "string",
    "activeShift": "integer",
    "latitude": "string",
    "longitude": "string",
    "placeId": "string",
    "timeZone": "string",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  },
  "userGroup": {
    "id": "integer",
    "name": "string",
    "parent": "integer",
    "admin": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  },
  "createdAt": "string",
  "updatedAt": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Set new password

POST /auth/update-password

Set a new password after resetting it.

token: string

The token retrieved from the reset password email.

password: string

The new password for the user.

Request Content-Types: application/json
Request Example
{
  "token": "string",
  "password": "string"
}
200 OK

Successful operation

type
object
400 Bad Request

Missing parameter

Response Content-Types: application/json
Response Example (200 OK)
{
  "access_token": "string",
  "refresh_token": "string"
}

Reset password

POST /auth/recover-password

Reset password of user, request will also returned successful if user is not found.

username: string
email: string
Request Content-Types: application/json
Request Example
{
  "username": "string",
  "email": "string"
}
200 OK

Successful operation

400 Bad Request

Missing parameter

Confirm/activate user

POST /auth/activate

Activate and confirm the email-address of the user.

token: string

The token from the activation email.

password: string

The new password of the user

Request Content-Types: application/json
Request Example
{
  "token": "string",
  "password": "string"
}
200 OK

Successful operation

400 Bad Request

Missing/invalid token or invalid password

Refresh access token

POST /auth/refresh_token

Refresh an expired access token.

refresh_token: string
Request Content-Types: application/json
Request Example
{
  "refresh_token": "string"
}
200 OK

Successful operation

type
object
400 Bad Request

Missing parameters

401 Unauthorized

Unauthorized

404 Not Found

NotFound

Response Content-Types: application/json
Response Example (200 OK)
{
  "access_token": "string",
  "refresh_token": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Check token

GET /auth/check-token

Verify if the access token is still valid

200 OK

Successful operation

type
object
400 Bad Request

Missing parameter

401 Unauthorized

Unauthorized

Response Content-Types: application/json
Response Example (200 OK)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new user

POST /user

User object that needs to be added to the store

username: string
email: integer
userGroup: integer
language: integer
Request Content-Types: application/json
Request Example
{
  "username": "string",
  "email": "integer",
  "userGroup": "integer",
  "language": "integer"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Content-Types: application/json
Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find users

GET /user
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "id": "integer",
    "username": "string",
    "email": "string",
    "language": "integer",
    "userGroup": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Count the number of users

GET /user/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Content-Types: application/json
Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one user

GET /user/{id}
id: integer
in path

ID of the user

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Content-Types: application/json
Response Example (200 OK)
{
  "id": "integer",
  "username": "string",
  "email": "string",
  "language": "integer",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update user

PUT /user/{id}

User object that needs to be updated in the store

username: string
email: integer
userGroup: integer
language: integer
id: integer
in path

ID of the user

Request Content-Types: application/json
Request Example
{
  "username": "string",
  "email": "integer",
  "userGroup": "integer",
  "language": "integer"
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Remove user

DELETE /user/{id}
id: integer
in path

ID of the user

204 No Content

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate user's associations/collections

GET /user/{parentid}/{alias}
parentid: integer
in path

ID of user

alias: string userGroup, language
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Content-Types: application/json
Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Login as another user

POST /user/{id}/copilot
id: integer
in path

The ID of the user to login as

200 OK

successful operation

type
object
400 Bad Request

Missing parameter

401 Unauthorized

Unauthorized

Response Content-Types: application/json
Response Example (200 OK)
{
  "access_token": "string",
  "refresh_token": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

User group

The user groups

Count the number of user groups

GET /usergroup/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find user groups

GET /usergroup
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "parent": "integer",
    "admin": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new user group

POST /usergroup

User group object that needs to be added to the store

name: string
parent: integer
locations: integer[]
integer
locationGroups: integer[]
integer
Request Example
{
  "name": "string",
  "parent": "integer",
  "locations": [
    "integer"
  ],
  "locationGroups": [
    "integer"
  ]
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Remove user group

DELETE /usergroup/{id}
id: integer
in path

ID of the user group

204 No Content

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one user group

GET /usergroup/{id}
id: integer
in path

ID of the user group

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "parent": "integer",
  "admin": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update a user group

PUT /usergroup/{id}

User group object that needs to be updated in the store

name: string
parent: integer
locations: integer[]
integer
locationGroups: integer[]
integer
id: integer
in path

ID of the user group

Request Example
{
  "name": "string",
  "parent": "integer",
  "locations": [
    "integer"
  ],
  "locationGroups": [
    "integer"
  ]
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Get the user groups this user group could be moved to

GET /usergroup/{parentid}/targets
parentid: integer
in path

ID of user group

200 OK

Successful operation

type
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "parent": "integer",
    "admin": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate user group's associations/collections

GET /usergroup/{parentid}/{alias}
parentid: integer
in path

ID of user group

alias: enum parent, users, errorCodes, manufacturers, locations, errorProfiles, alertGroups, alertRecipients, locationGroups, permissions, languages, translations, machineModels, machineGroups, alertObservers, machine
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Machine

The machines

Update houdini config

POST /gateway/{hostname}/config

Houdini config that needt to be stored

config: string
Request Example
{
  "config": "string"
}
201 Created

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Update all machines' configuration for the given filter

POST /machineconfig/set

Update all machines' configuration for the given filter

config: object
config: string
wlan: object
mode: string
ssid: string
encryption: string
encryptionKey: string
apn: object
apn: string
sharing: object
sharing: string
Request Example
{
  "config": {
    "config": "string"
  },
  "wlan": {
    "mode": "string",
    "ssid": "string",
    "encryption": "string",
    "encryptionKey": "string"
  },
  "apn": {
    "apn": "string"
  },
  "sharing": {
    "sharing": "string"
  }
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Count the number of machines

GET /machine/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get machine and group them per location

GET /machine/locations

Get machine and group them per location

200 OK

Successful operation

type
object
401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "name": "string",
  "address": "string",
  "postcode": "string",
  "city": "string",
  "country": "string",
  "activeShift": "number",
  "latitude": "string",
  "longitude": "string",
  "placeId": "string",
  "timeZone": "string",
  "id": "number",
  "machines": [
    {
      "id": "integer",
      "name": "string",
      "hostname": "string",
      "gateway": "integer",
      "location": "integer",
      "machineModel": "integer",
      "machineType": "integer",
      "manufacturer": "integer",
      "lastRevenuetransaction": "integer",
      "lastLog": "integer",
      "lastIotevent": "integer",
      "tag": "string",
      "notes": "string",
      "virtualPrices": "integer",
      "active": "integer",
      "currency": "integer",
      "debtor": "integer",
      "logSynced": "integer",
      "revenuetransactionSynced": "integer",
      "ioteventSynced": "integer",
      "ruleSet": "string",
      "createdAt": "string (date-time-utc)",
      "updatedAt": "string (date-time-utc)"
    }
  ]
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Validate hostname

GET /hostname/validate/{hostname}

Check if the hostname is valid and is available.

hostname: string
in query

(no description)

200 OK

Successful operation

type
object
401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "available": "boolean",
  "friendlyname": "string|undefined"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get alert observer's machines

GET /alertobserver/{id}/machines
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "hostname": "string",
    "gateway": "integer",
    "location": "integer",
    "machineModel": "integer",
    "machineType": "integer",
    "manufacturer": "integer",
    "lastRevenuetransaction": "integer",
    "lastLog": "integer",
    "lastIotevent": "integer",
    "tag": "string",
    "notes": "string",
    "virtualPrices": "integer",
    "active": "integer",
    "currency": "integer",
    "debtor": "integer",
    "logSynced": "integer",
    "revenuetransactionSynced": "integer",
    "ioteventSynced": "integer",
    "ruleSet": "string",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get alertobservers based on widget id and status

GET /machinestatus/{status}/alertobservers
widget: integer
in query

The id of the widget

status: string
in path

The status to find

200 OK

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "error": "integer",
    "observer": "string",
    "occurs": "integer",
    "timer": "integer",
    "timerType": "integer",
    "alertGroup": "integer",
    "sentAt": "string (date-time)",
    "type": "string",
    "paymentMethod": "string",
    "openingHours": "integer",
    "userGroup": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get machine count(s) grouped by status for a given machineStatus widget

GET /machinestatus/{status}/machines
widget: integer
in query

The id of the widget

status: string
in path

The status to find

200 OK

Successful operation

type
401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "hostname": "string",
    "gateway": "integer",
    "location": "integer",
    "machineModel": "integer",
    "machineType": "integer",
    "manufacturer": "integer",
    "lastRevenuetransaction": "integer",
    "lastLog": "integer",
    "lastIotevent": "integer",
    "tag": "string",
    "notes": "string",
    "virtualPrices": "integer",
    "active": "integer",
    "currency": "integer",
    "debtor": "integer",
    "logSynced": "integer",
    "revenuetransactionSynced": "integer",
    "ioteventSynced": "integer",
    "ruleSet": "string",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get machine count(s) grouped by status for a given machineStatus widget

GET /machinestatus/status
widget: integer
in query

The id of the widget

200 OK

Successful operation

type
object[]
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "status": "string",
    "count": "integer"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get the machines the user has access to, including the alert observers observing them

GET /machinestatus/machines
id: integer
in query

The id of the widget

200 OK

Successful operation

type
object[]
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "status": "string",
    "count": "integer"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get the number of machines/alertobserver the user has access to

GET /machinestatus/machines/count
id: integer
in query

The id of the widget

200 OK

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Count the number of alertobservers on a machine

GET /machine/{id}/alertobservers/count
machine: integer
in query

The id of the machine

200 OK

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get alert observers

GET /machine/{id}/alertobservers
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "error": "integer",
    "observer": "string",
    "occurs": "integer",
    "timer": "integer",
    "timerType": "integer",
    "alertGroup": "integer",
    "sentAt": "string (date-time)",
    "type": "string",
    "paymentMethod": "string",
    "openingHours": "integer",
    "userGroup": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find machine

GET /machine
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "hostname": "string",
    "gateway": "integer",
    "location": "integer",
    "machineModel": "integer",
    "machineType": "integer",
    "manufacturer": "integer",
    "lastRevenuetransaction": "integer",
    "lastLog": "integer",
    "lastIotevent": "integer",
    "tag": "string",
    "notes": "string",
    "virtualPrices": "integer",
    "active": "integer",
    "currency": "integer",
    "debtor": "integer",
    "logSynced": "integer",
    "revenuetransactionSynced": "integer",
    "ioteventSynced": "integer",
    "ruleSet": "string",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new machine or copy machine if source query params is passed

POST /machine

Machine object that needs to be added to the store

name: string
hostname: string
location: integer
machineModel: integer
machineType: integer
manufacturer: integer
currency: integer
debtor: integer
tag: string
virtualPrices: boolean
active: boolean
machineGroups: array
source: integer
in query

The id of the source machine to be copied (fields and assortment)

Request Example
{
  "name": "string",
  "hostname": "string",
  "location": "integer",
  "machineModel": "integer",
  "machineType": "integer",
  "manufacturer": "integer",
  "currency": "integer",
  "debtor": "integer",
  "tag": "string",
  "virtualPrices": "boolean",
  "active": "boolean",
  "machineGroups": "array"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one machine

GET /machine/{id}
id: integer
in path

ID of the machine

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "hostname": "string",
  "gateway": "integer",
  "location": "integer",
  "machineModel": "integer",
  "machineType": "integer",
  "manufacturer": "integer",
  "lastRevenuetransaction": "integer",
  "lastLog": "integer",
  "lastIotevent": "integer",
  "tag": "string",
  "notes": "string",
  "virtualPrices": "integer",
  "active": "integer",
  "currency": "integer",
  "debtor": "integer",
  "logSynced": "integer",
  "revenuetransactionSynced": "integer",
  "ioteventSynced": "integer",
  "ruleSet": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update a machine

PUT /machine/{id}

Machine object that needs to be updated

name: string
location: integer
machineModel: integer
machineType: integer
manufacturer: integer
currency: integer
debtor: integer
tag: string
virtualPrices: boolean
active: boolean
machineGroups: integer[]
integer
id: integer
in path

ID of the machine

Request Example
{
  "name": "string",
  "location": "integer",
  "machineModel": "integer",
  "machineType": "integer",
  "manufacturer": "integer",
  "currency": "integer",
  "debtor": "integer",
  "tag": "string",
  "virtualPrices": "boolean",
  "active": "boolean",
  "machineGroups": [
    "integer"
  ]
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (401 Unauthorized)
{
  "message": "string"
}

Sync one machine

PUT /machine/{id}/sync
id: integer
in path

ID of the machine

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

503 Service Unavailable

Service unavailable

Response Example (200 OK)
{
  "processed": "boolean",
  "details": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Count unmapped error codes

GET /unmappederrorcode/count
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find unmapped error codes

GET /unmappederrorcode

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "errorProfile": "number",
  "code": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find unmapped error codes by machine

GET /machine/{id}/unmappederrorcodes
id: integer
in path

ID of the machine

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "errorProfile": "number",
  "code": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate machine's associations/collections

GET /machine/{parentid}/{alias}
parentid: integer
in path

ID of machine

alias: string location, machineModel, machineType, manufacturer, machineGroups, alertObservers
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find machines by user group

GET /usergroup/:usergroup/machines
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "hostname": "string",
    "gateway": "integer",
    "location": "integer",
    "machineModel": "integer",
    "machineType": "integer",
    "manufacturer": "integer",
    "lastRevenuetransaction": "integer",
    "lastLog": "integer",
    "lastIotevent": "integer",
    "tag": "string",
    "notes": "string",
    "virtualPrices": "integer",
    "active": "integer",
    "currency": "integer",
    "debtor": "integer",
    "logSynced": "integer",
    "revenuetransactionSynced": "integer",
    "ioteventSynced": "integer",
    "ruleSet": "string",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Count vouchers

GET /voucher/count
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Machine model

The machine models

Count the number of machine models

GET /machinemodel/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find machine models

GET /machinemodel
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "manufacturer": "integer",
    "machineType": "integer",
    "errorProfile": "integer",
    "image": "integer",
    "userGroup": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new machine model

POST /machinemodel

Machine model object that needs to be added to the store

name: string
manufacturer: integer
errorProfile: integer
machineType: integer
Request Example
{
  "name": "string",
  "manufacturer": "integer",
  "errorProfile": "integer",
  "machineType": "integer"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one machine model

GET /machinemodel/{id}
id: integer
in path

ID of the machine model

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "manufacturer": "integer",
  "machineType": "integer",
  "errorProfile": "integer",
  "image": "integer",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update a machine model

PUT /machinemodel/{id}

Machine model object that needs to be updated in the store

name: string
manufacturer: integer
errorProfile: integer
machineType: integer
id: integer
in path

ID of the machine model

Request Example
{
  "name": "string",
  "manufacturer": "integer",
  "errorProfile": "integer",
  "machineType": "integer"
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate machine model's associations/collections

GET /machinemodel/{parentid}/{alias}
parentid: integer
in path

ID of machine model

alias: string manufacturer, machineType, errorProfile, userGroup
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Machine type

The machine types

Count the number of machine types

GET /machinetype/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find machine types

GET /machinetype
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "image": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new machine type

POST /machinetype

Machine type object that needs to be added to the store

name: string
Request Example
{
  "name": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one machine type

GET /machinetype/{id}
id: integer
in path

ID of the machine type

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "image": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update a machine type

PUT /machinetype/{id}

Machine type object that needs to be updated in the store

name: string
id: integer
in path

ID of the machine type

Request Example
{
  "name": "string"
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate machine type's associations/collections

GET /machinetype/{parentid}/{alias}
parentid: integer
in path

ID of machine type

alias: string manufacturers, machines, image
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Manufacturer

The manufacturers

Count the number of manufacturers

GET /manufacturer/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find manufacturers

GET /manufacturer
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "userGroup": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new manufacturer

POST /manufacturer

Manufacturer object that needs to be added to the store

name: string
machineTypes: integer[]
integer
Request Example
{
  "name": "string",
  "machineTypes": [
    "integer"
  ]
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one manufacturer

GET /manufacturer/{id}
id: integer
in path

ID of the manufacturer

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update a manufacturer

PUT /manufacturer/{id}

Manufacturer object that needs to be updated in the store

name: string
machineTypes: integer[]
integer
id: integer
in path

ID of the manufacturer

Request Example
{
  "name": "string",
  "machineTypes": [
    "integer"
  ]
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate manufacturer's associations/collections

GET /manufacturer/{parentid}/{alias}
parentid: integer
in path

ID of manufacturer

alias: string machineTypes, userGroup
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Machine group

Organizes the machines into groups

Count the number of machine groups

GET /machinegroup/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find machine groups

GET /machinegroup
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "userGroup": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new machine group

POST /machinegroup

Machine group object that needs to be added to the store

name: string
machines: integer[]
integer
Request Example
{
  "name": "string",
  "machines": [
    "integer"
  ]
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one machine group

GET /machinegroup/{id}
id: integer
in path

ID of the machine group

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update a machine group

PUT /machinegroup/{id}

Machine group object that needs to be updated in the store

name: string
machines: integer[]
integer
id: integer
in path

ID of the machine group

Request Example
{
  "name": "string",
  "machines": [
    "integer"
  ]
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Delete a machine group

DELETE /machinegroup/{id}
id: integer
in path

ID of the machine group

204 No Content

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate machine group's associations/collections

GET /machinegroup/{parentid}/{alias}
parentid: integer
in path

ID of machine group

alias: string machines, userGroup
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Machine config

The machines' gateway configuration

Update machine config

POST /machine/{hostname}/config/config

Config object that needs to be saved for the gateway

config: string
Request Example
{
  "config": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update WLAN machine config

POST /machine/{hostname}/config/wlan

WLAN config object that needs to be saved for the gateway

ssid: string
wlanenc: string psk2+ccmp, psk, none
wlankey: string
wlanmode: string ap, sta
Request Example
{
  "ssid": "string",
  "wlanenc": "string",
  "wlankey": "string",
  "wlanmode": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update APN machine config

POST /machine/{hostname}/config/apn

APN config object that needs to be saved for the gateway

apn: string
Request Example
{
  "apn": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update sharing machine config

POST /machine/{hostname}/config/sharing

Sharing config object that needs to be saved for the gateway

share: string none, 3g, wifi, net
Request Example
{
  "share": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update logo machine config

POST /machine/{hostname}/config/logo

Upload a printer logo for the gateway

image: string
Request Example
{
  "image": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Install printer drivers machine config

POST /machine/{hostname}/config/printer
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Reboot the gateway

POST /machine/{hostname}/config/reboot
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Updates the software on the gateway

POST /machine/{hostname}/config/update
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Updates the software on the gateway to the current test version

POST /machine/{hostname}/config/updatetest
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get machine config by hostname

GET /machine/{hostname}/config

Get the configiration of the machine

hostname: string
in query

(no description)

200 OK

Successful operation

type
object
401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "name": "string",
  "apn": "string",
  "config": "string",
  "sharing": "string",
  "mode": "string",
  "encryption": "string",
  "encryptionKey": "string",
  "ssid": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get machine config templates

GET /machineconfigtemplate

Get the configiration of the machine

hostname: string
in query

(no description)

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "apn": "string",
  "config": "string",
  "sharing": "string",
  "mode": "string",
  "encryption": "string",
  "encryptionKey": "string",
  "ssid": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new machine config template

POST /machineconfigtemplate

Machine config template object that needs to be added to the store

name: string
apn: string
config: string
sharing: string
mode: string
encryption: string
encryptionKey: string
ssid: string
Request Example
{
  "name": "string",
  "apn": "string",
  "config": "string",
  "sharing": "string",
  "mode": "string",
  "encryption": "string",
  "encryptionKey": "string",
  "ssid": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Count the number of machine config templates

GET /machineconfigtemplate/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update machine configuration template

PUT /machineconfigtemplate/{id}

Update the machine configuration template

name: string
config: string
mode: string
ssid: string
encryption: string
encryptionKey: string
apn: string
sharing: string
id: integer
in path

The id of the template

Request Example
{
  "name": "string",
  "config": "string",
  "mode": "string",
  "ssid": "string",
  "encryption": "string",
  "encryptionKey": "string",
  "apn": "string",
  "sharing": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Delete a machine config template

DELETE /machineconfigtemplate/{id}
id: integer
in path

ID of the machine config template

204 No Content

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (401 Unauthorized)
{
  "message": "string"
}

Find a machine config template

GET /machineconfigtemplate/{id}
id: integer
in path

ID of machine config template

200 OK

Successful operation

type
object
401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "name": "string",
  "config": "string",
  "mode": "string",
  "ssid": "string",
  "encryption": "string",
  "encryptionKey": "string",
  "apn": "string",
  "sharing": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get machine config hostname

GET /machine/{hostname}/remoteconfig

Get the configuration of the machine

hostname: string
in query

(no description)

200 OK

Successful operation

type
object
401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "apn": "string",
  "config": "string",
  "sharing": "string",
  "wlan": {
    "device": "string",
    "network": "string",
    "mode": "string",
    "encryption": "string",
    "key": "string",
    "ssid": "string"
  }
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update machine's configuration

PUT /machineconfig/{machine}

Update the configuration of the machine

config: string
mode: string
ssid: string
encryption: string
encryptionKey: string
apn: string
sharing: string
machine: integer
machine: integer
in path

The id of the machine

Request Example
{
  "config": "string",
  "mode": "string",
  "ssid": "string",
  "encryption": "string",
  "encryptionKey": "string",
  "apn": "string",
  "sharing": "string",
  "machine": "integer"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Location

The locations where the machines are physically placed

Count the number of locations

GET /location/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find locations

GET /location
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "address": "string",
    "postcode": "string",
    "city": "string",
    "country": "string",
    "activeShift": "integer",
    "latitude": "string",
    "longitude": "string",
    "placeId": "string",
    "timeZone": "string",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new location

POST /location

location object that needs to be added to the store

name: string
address: string
postcode: string
city: string
country: string
latitude: number
longitude: number
placeId: string
locationGroups: integer[]
integer
Request Example
{
  "name": "string",
  "address": "string",
  "postcode": "string",
  "city": "string",
  "country": "string",
  "latitude": "number",
  "longitude": "number",
  "placeId": "string",
  "locationGroups": [
    "integer"
  ]
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one location

GET /location/{id}
id: integer
in path

ID of the location

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "address": "string",
  "postcode": "string",
  "city": "string",
  "country": "string",
  "activeShift": "integer",
  "latitude": "string",
  "longitude": "string",
  "placeId": "string",
  "timeZone": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update a location

PUT /location/{id}

location object that needs to be updated in the store

name: string
address: string
postcode: string
city: string
country: string
latitude: integer
longitude: integer
placeId: string
locationGroups: integer[]
integer
id: integer
in path

ID of the location

Request Example
{
  "name": "string",
  "address": "string",
  "postcode": "string",
  "city": "string",
  "country": "string",
  "latitude": "integer",
  "longitude": "integer",
  "placeId": "string",
  "locationGroups": [
    "integer"
  ]
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Delete a location

DELETE /location/{id}
id: integer
in path

ID of the location

204 No Content

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate location's associations/collections

GET /location/{parentid}/{alias}
parentid: integer
in path

ID of location

alias: string userGroups, machines, shifts, locationGroups
in path

Resource to populate

200 OK

Successful operation

type
object[]
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
[
  "object"
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Location group

Used to group locations

Count the number of location groups

GET /locationgroup/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find location groups

GET /locationgroup
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "userGroup": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new location group

POST /locationgroup

Location group object that needs to be added to the store

name: string
locations: integer[]
integer
Request Example
{
  "name": "string",
  "locations": [
    "integer"
  ]
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one location group

GET /locationgroup/{id}
id: integer
in path

ID of the location group

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update a location group

PUT /locationgroup/{id}

Location group object that needs to be updated in the store

name: string
locations: integer[]
integer
id: integer
in path

ID of the location group

Request Example
{
  "name": "string",
  "locations": [
    "integer"
  ]
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Delete a location group

DELETE /locationgroup/{id}
id: integer
in path

ID of the location group

204 No Content

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate location group's associations/collections

GET /locationgroup/{parentid}/{alias}
parentid: integer
in path

ID of locationgroup

alias: string userGroups, locations, userGroup
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Location shift

The locations' shift

Count the number of shifts

GET /shift/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate report's associations/collections

GET /report/{parentid}/{alias}
parentid: integer
in path

ID of report

alias: string locationGroup, manufacturers, locations, machineTypes, machineModels, machineGroups, machines, user
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Close a new shift and open a new one

POST /shift/close
location: integer
Request Example
{
  "location": "integer"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer",
  "location": "integer",
  "firstTransaction": "integer",
  "lastTransaction": "integer",
  "previousShift": "integer",
  "closed": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find shifts

GET /shift
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "location": "integer",
    "firstTransaction": "integer",
    "lastTransaction": "integer",
    "previousShift": "integer",
    "closed": "string",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one shift

GET /shift/{id}
id: integer
in path

ID of the shift

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "location": "integer",
  "firstTransaction": "integer",
  "lastTransaction": "integer",
  "previousShift": "integer",
  "closed": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate shift's associations/collections

GET /shift/{parentid}/{alias}
parentid: integer
in path

ID of shift

alias: string location, aggregatedRevenueTransaction
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find aggregated payment transaction

GET /aggregatedpaymenttransaction
200 OK

Successful operation

type
object[]
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "amount": "integer",
    "quantity": "integer",
    "currency": "string",
    "paymentType": "string",
    "reportGroup": "string"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get sum

GET /aggregatedpaymenttransaction/sum

Get the sum of aggregated payment transactions grouped by currency.

shift: integer
in query

The id of the shift

200 OK

Successful operation

type
object[]
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "amount": "integer",
    "quantity": "integer",
    "currency": "string"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find aggregated revenue transaction

GET /aggregatedrevenuetransaction
200 OK

Successful operation

type
object[]
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "amount": "integer",
    "quantity": "integer",
    "name": "string",
    "price": "integer",
    "barcode": "string",
    "currency": "string"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get sum

GET /aggregatedrevenuetransaction/sum

Get the sum of aggregated revenue transactions grouped by currency.

shift: integer
in query

The id of the shift

200 OK

Successful operation

type
object[]
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "amount": "integer",
    "quantity": "integer",
    "currency": "string"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Count the number of aggregated revenue transactions in a shift

GET /aggregatedrevenuetransaction/count
shift: integer
in query

The id of the shift

200 OK

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Count the number of aggregated payment transactions in a shift

GET /aggregatedpaymenttransaction/count
shift: integer
in query

The id of the shift

200 OK

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Opening hour

Manage opening hours of: machines, machine groups, locations or location groups

Set opening hours

PUT /{resource}/{id}/openinghours

Set the opening hours of a machine through a parent resource. Example: updating the opening hours of a location will override all the open hours of the machines that are part of that location.

object
day: integer
startTime: string
endTime: string
resource: enum machine, machinegroup, location, locationgroup
in path

(no description)

id: integer
in path

The ID of the resource

Request Example
[
  {
    "day": 1,
    "startTime": "09:15:00",
    "endTime": "10:00:00"
  }
]
200 OK

successful operation

400 Bad Request

Missing parameter

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Get openinghours

GET /openinghour

Get the openinghours of a certain machine.

machine: integer
in query

The id of the machine

200 OK

Successful operation

400 Bad Request

Missing parameter

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "day": "integer",
  "startTime": "string",
  "endTime": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Revenue transaction

The transactions registered on the machines

Count the number of revenue transactions

GET /revenuetransaction/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find revenue transactions

GET /revenuetransaction
limit: integer x ≤ 100
in query

Limit the number of logs returned

skip: integer 0
in query

Skips the first 'N' items of the results

where[<col>][<op>]: value: string
in query

Filter criteria. It supports multiple values: e.g. where[occurredAt][>]=2018-05-15T00:00:00&where[machine]=1094

sort: string asc
in query

The sort column e.g. sort[occurredAt]=desc

useArchive: boolean
in query

It will use archived data in combination with the last data available. If True: only limit and where are used. limit becomes mandatory, max limit is 1000 and where accepts only a machine id (mandatory) and id with > operator (optional. Defaults to: where.id > -1)

Successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden. Sent when the limit provided or the results size is greater than the max limit allowed

Response Example (200 OK)
[
  {
    "id": 3184234,
    "product": 1,
    "name": "Kaffee klein",
    "internalRef": "KAF-KL",
    "machine": 80,
    "location": 2,
    "occurredAt": "2019-02-06T07:06:17+01:00",
    "timeZone": "Europe/Amsterdam",
    "originalPrice": 0,
    "price": 10,
    "barcode": null,
    "currency": "EUR",
    "timestamp": 1549433177,
    "token": "^^C:R/-0",
    "salestype": 0,
    "numPaymentTransactions": 1,
    "remote": 40314354,
    "pricelist": 0,
    "usergroup": 0,
    "createdAt": "2019-02-06T06:12:16Z",
    "updatedAt": "2019-02-06T06:12:16Z"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one revenue transaction

GET /revenuetransaction/{id}
id: integer
in path

ID of the revenue transaction

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": 3184234,
  "product": 1,
  "name": "Kaffee klein",
  "internalRef": "KAF-KL",
  "machine": 80,
  "location": 2,
  "occurredAt": "2019-02-06T07:06:17+01:00",
  "timeZone": "Europe/Amsterdam",
  "originalPrice": 0,
  "price": 10,
  "barcode": null,
  "currency": "EUR",
  "timestamp": 1549433177,
  "token": "^^C:R/-0",
  "salestype": 0,
  "numPaymentTransactions": 1,
  "remote": 40314354,
  "pricelist": 0,
  "usergroup": 0,
  "createdAt": "2019-02-06T06:12:16Z",
  "updatedAt": "2019-02-06T06:12:16Z"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate revenue transaction's associations/collections

GET /revenuetransaction/{parentid}/{alias}
parentid: integer
in path

ID of revenue transaction

alias: string paymenttransactions, machine, location
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Summary all products

GET /revenue/summary/all-products

Get a summary of revenue grouped by currency and date.

startDate: string
in query

(no description)

endDate: string
in query

(no description)

machines: array
in query

Limit the results based on machines ids

locations: array
in query

Limit the results based on location ids

200 OK

Successful operation

type
object
400 Bad Request

Missing parameter

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "<$currency>": [
    {
      "currency": "string",
      "currencyRate": "float",
      "date": "string",
      "orginalValue": "integer",
      "value": "integer"
    }
  ]
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Top products

GET /revenue/summary/top-products

Get the best selling product for each day grouped by product.

startDate: string
in query

(no description)

endDate: string
in query

(no description)

machines: array
in query

Limit the results based on machines ids

locations: array
in query

Limit the results based on location ids

amount: integer
in query

Amount of products, defaults to 10

200 OK

Successful operation

type
object[]
400 Bad Request

Missing parameter

401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "name": "string",
    "values": [
      {
        "date": "string",
        "value": "integer"
      }
    ]
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Total revenue summary

GET /revenue/summary/total

The revenue summary and the amount of products sold for various periods grouped by currency

machines: array
in query

Limit the results based on machines ids

locations: array
in query

Limit the results based on location ids

200 OK

Successful operation

type
object
401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "<$currency>": [
    {
      "day": {
        "currency": "string",
        "products": "integer",
        "revenue": "integer"
      },
      "month": {
        "currency": "string",
        "products": "integer",
        "revenue": "integer"
      },
      "week": {
        "currency": "string",
        "products": "integer",
        "revenue": "integer"
      },
      "year": {
        "currency": "string",
        "products": "integer",
        "revenue": "integer"
      }
    }
  ]
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Revenue distribution

GET /revenue/summary/hour-weekday

Contains data of the last three months grouped by hour and day.

machines: array
in query

Limit the results based on machines ids

locations: array
in query

Limit the results based on location ids

200 OK

Successful operation

type
object[]
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "day": "integer",
    "hour": "integer",
    "count": "integer",
    "total": "integer"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Payment transaction

The payments contained in the revenue transactions

Count the number of payment transactions

GET /paymenttransaction/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find payment transactions

GET /paymenttransaction
limit: integer x ≤ 100
in query

Limit the number of logs returned

skip: integer 0
in query

Skips the first 'N' items of the results

where[<col>][<op>]: value: string
in query

Filter criteria. It supports multiple values: e.g. where[occurredAt][>]=2018-05-15T00:00:00&where[machine]=1094

sort: string
in query

The sort column e.g. sort[occurredAt]=desc

useArchive: boolean
in query

It will use archived data in combination with the last data available. If True: only limit and where are used. limit becomes mandatory, max limit is 1000 and where accepts only a machine id (mandatory) and id with > operator (optional. Defaults to: where.id > -1)

Successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden. Sent when the limit provided or the results size is greater than the max limit allowed

Response Example (200 OK)
[
  {
    "id": 3287746,
    "revenuetransaction": 3184234,
    "machine": 80,
    "location": 2,
    "occurredAt": "2019-02-06T07:06:17+01:00",
    "timeZone": "Europe/Amsterdam",
    "method": "virtual",
    "type": "virtual",
    "price": 10,
    "currency": "EUR",
    "exclude": 0,
    "reportGroup": null,
    "createdAt": "2019-02-06T06:12:16Z",
    "updatedAt": "2019-02-06T06:12:16Z"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one payment transaction

GET /paymenttransaction/{id}
id: integer
in path

ID of the payment transaction

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": 3287746,
  "revenuetransaction": 3184234,
  "machine": 80,
  "location": 2,
  "occurredAt": "2019-02-06T07:06:17+01:00",
  "timeZone": "Europe/Amsterdam",
  "method": "virtual",
  "type": "virtual",
  "price": 10,
  "currency": "EUR",
  "exclude": 0,
  "reportGroup": null,
  "createdAt": "2019-02-06T06:12:16Z",
  "updatedAt": "2019-02-06T06:12:16Z"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate payment transaction's associations/collections

GET /paymenttransaction/{parentid}/{alias}
parentid: integer
in path

ID of payment transaction

alias: string revenuetransaction, machine, location
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Log

Events generated by machines

Log

Count the number of logs

GET /log/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}
Log

Count the number of raw logs

GET /rawlog/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}
Log

Find logs

GET /log
limit: integer x ≤ 100
in query

Limit the number of logs returned

skip: integer 0
in query

Skips the first 'N' items of the results

where[<col>][<op>]: value: string
in query

Filter criteria. It supports multiple values: e.g. where[occurredAt][>]=2018-05-15T00:00:00&where[machine]=1094

sort: string
in query

The sort column e.g. sort[occurredAt]=desc

useArchive: boolean
in query

It will use archived data in combination with the last data available. If True: only limit and where are used. limit becomes mandatory, max limit is 1000 and where accepts only a machine id (mandatory) and id with > operator (optional. Defaults to: where.id > -1)

200 OK
Log

Successful operation

type
Log
401 Unauthorized

Unauthorized

403 Forbidden

Forbidden. Sent when the limit provided or the results size is greater than the max limit allowed

Response Example (200 OK)
[
  {
    "id": 5801104,
    "remote": 89773649,
    "machine": 80,
    "location": 2,
    "code": "CM_REBOOT",
    "errorIdentity": 3,
    "type": 1,
    "isResolvable": false,
    "occurredAt": "2019-03-12T05:36:58+01:00",
    "timeZone": "Europe/Amsterdam",
    "duration": null,
    "extraData": "{\"uptime\": 67}",
    "date": 1552365418,
    "timestamp": 1552365418,
    "resolvedAt": null,
    "state": null,
    "createdAt": "2019-03-12T04:36:59Z"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}
Log

Find one log

GET /log/{id}
id: integer
in path

ID of the log

200 OK
Log

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": 5801104,
  "remote": 89773649,
  "machine": 80,
  "location": 2,
  "code": "CM_REBOOT",
  "errorIdentity": 3,
  "type": 1,
  "isResolvable": false,
  "occurredAt": "2019-03-12T05:36:58+01:00",
  "timeZone": "Europe/Amsterdam",
  "duration": null,
  "extraData": "{\"uptime\": 67}",
  "date": 1552365418,
  "timestamp": 1552365418,
  "resolvedAt": null,
  "state": null,
  "createdAt": "2019-03-12T04:36:59Z"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}
Log

Find raw logs

GET /rawlog
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  null
]
Response Example (401 Unauthorized)
{
  "message": "string"
}
Log

Find log status

GET /logstatus
machine: integer
in query

The id of the machine

200 OK
Log

Successful operation

type
Log
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": 5801104,
    "remote": 89773649,
    "machine": 80,
    "location": 2,
    "code": "CM_REBOOT",
    "errorIdentity": 3,
    "type": 1,
    "isResolvable": false,
    "occurredAt": "2019-03-12T05:36:58+01:00",
    "timeZone": "Europe/Amsterdam",
    "duration": null,
    "extraData": "{\"uptime\": 67}",
    "date": 1552365418,
    "timestamp": 1552365418,
    "resolvedAt": null,
    "state": null,
    "createdAt": "2019-03-12T04:36:59Z"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}
Log

Top log events

GET /log/summary/top

Returns a list of (translated) events and the amount of concurrences.

machines: array
in query

Limit the results based on machines ids

locations: array
in query

Limit the results based on location ids

limit: integer
in query

Limit the results, defaults to 10, max 30

200 OK

Successful operation

type
object[]
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "code": "string",
    "error": "string",
    "summary": "integer"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}
Log

Populate log's associations/collections

GET /log/{parentid}/{alias}
parentid: integer
in path

ID of log

alias: string machine, errorIdentity, location
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Report

Reports based on revenue transactions, payment transactions, logs or shifts

Get the logs resolution report

POST /report/logsResolution

Report request object

Request Example
{
  "machines": [
    87,
    94,
    80
  ],
  "period1": {
    "referenceDate": "2019-03-11T11:40:43+01:00",
    "startDate": {
      "year": 0,
      "month": 1,
      "day": 1,
      "week": null,
      "hour": 0,
      "minute": 0,
      "second": 0
    },
    "endDate": {
      "year": 0,
      "month": 0,
      "day": 0,
      "week": null,
      "hour": 23,
      "minute": 59,
      "second": 59
    }
  }
}

successful operation

400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "period1": {
    "data": [
      {
        "code": "ED017",
        "erroridentity": 34,
        "error": "ED017",
        "quantity": 518,
        "duration": 2987
      },
      {
        "code": "ED014",
        "erroridentity": 31,
        "error": "ED014",
        "quantity": 214,
        "duration": 6629
      }
    ],
    "endDate": "2019-03-11 23:59:59",
    "startDate": "2019-01-01 00:00:00"
  },
  "period2": {
    "data": [
      {
        "code": "ED017",
        "erroridentity": 34,
        "error": "ED017",
        "quantity": 23,
        "duration": 342
      },
      {
        "code": "ED014",
        "erroridentity": 31,
        "error": "ED014",
        "quantity": 57,
        "duration": 567
      }
    ],
    "endDate": "2018-03-11 23:59:59",
    "startDate": "2018-01-01 00:00:00"
  }
}
Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get the logs frequency report

POST /report/logsFrequency

Report request object

Request Example
{
  "machines": [
    87,
    94,
    80
  ],
  "period1": {
    "referenceDate": "2019-03-11T11:40:43+01:00",
    "startDate": {
      "year": 0,
      "month": 1,
      "day": 1,
      "week": null,
      "hour": 0,
      "minute": 0,
      "second": 0
    },
    "endDate": {
      "year": 0,
      "month": 0,
      "day": 0,
      "week": null,
      "hour": 23,
      "minute": 59,
      "second": 59
    }
  }
}

successful operation

400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "period1": {
    "data": [
      {
        "code": "CM_OFFLINE",
        "erroridentity": 1,
        "error": "CM_OFFLINE",
        "quantity": 220
      },
      {
        "code": "ED014",
        "erroridentity": 31,
        "error": "ED014",
        "quantity": 152
      }
    ],
    "endDate": "2019-03-11 23:59:59",
    "startDate": "2019-01-01 00:00:00"
  },
  "period2": {
    "data": [
      {
        "code": "CM_OFFLINE",
        "erroridentity": 1,
        "quantity": 357,
        "error": "CM_OFFLINE"
      },
      {
        "code": "ED014",
        "erroridentity": 31,
        "error": "ED014",
        "quantity": 45
      }
    ],
    "endDate": "2018-03-11 23:59:59",
    "startDate": "2018-01-01 00:00:00"
  }
}
Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get the report revenuetransaction

POST /report/revenuetransaction

Report request object

Request Example
{
  "machines": [
    87,
    94,
    80
  ],
  "period1": {
    "referenceDate": "2019-03-11T11:40:43+01:00",
    "startDate": {
      "year": 0,
      "month": 1,
      "day": 1,
      "week": null,
      "hour": 0,
      "minute": 0,
      "second": 0
    },
    "endDate": {
      "year": 0,
      "month": 0,
      "day": 0,
      "week": null,
      "hour": 23,
      "minute": 59,
      "second": 59
    }
  }
}

successful operation

400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "period1": {
    "data": [
      {
        "productId": 1,
        "name": "Kaffee klein",
        "internalRef": "KAF-KL",
        "revenue": 7080,
        "quantity": 906,
        "currency": "EUR"
      },
      {
        "productId": 2,
        "name": "Capuccino",
        "internalRef": "CAP",
        "revenue": 5500,
        "quantity": 700,
        "currency": "EUR"
      }
    ],
    "endDate": "2019-03-11 23:59:59",
    "startDate": "2019-01-01 00:00:00"
  },
  "period2": {
    "data": [
      {
        "productId": 1,
        "name": "Kaffee klein",
        "revenue": 7080,
        "quantity": 906,
        "currency": "EUR"
      },
      {
        "productId": 4,
        "name": "Capuccino klein",
        "revenue": 7000,
        "quantity": 750,
        "currency": "EUR"
      }
    ],
    "endDate": "2018-03-11 23:59:59",
    "startDate": "2018-01-01 00:00:00"
  }
}
Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get the report paymenttransaction

POST /report/paymenttransaction

Report request object

Request Example
{
  "machines": [
    87,
    94,
    80
  ],
  "period1": {
    "referenceDate": "2019-03-11T11:40:43+01:00",
    "startDate": {
      "year": 0,
      "month": 1,
      "day": 1,
      "week": null,
      "hour": 0,
      "minute": 0,
      "second": 0
    },
    "endDate": {
      "year": 0,
      "month": 0,
      "day": 0,
      "week": null,
      "hour": 23,
      "minute": 59,
      "second": 59
    }
  }
}

successful operation

400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "period1": {
    "data": [
      {
        "type": "card",
        "quantity": 49,
        "revenue": 81000,
        "reportGroup": null,
        "currency": "AMD"
      }
    ],
    "endDate": "2019-03-11 23:59:59",
    "startDate": "2019-01-01 00:00:00"
  }
}
Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get the payments generated by the shifts closed within the provided time periods

POST /report/closedshiftspayment

Report request object

Request Example
{
  "machines": [
    87,
    94,
    80
  ],
  "period1": {
    "referenceDate": "2019-03-11T11:40:43+01:00",
    "startDate": {
      "year": 0,
      "month": 1,
      "day": 1,
      "week": null,
      "hour": 0,
      "minute": 0,
      "second": 0
    },
    "endDate": {
      "year": 0,
      "month": 0,
      "day": 0,
      "week": null,
      "hour": 23,
      "minute": 59,
      "second": 59
    }
  }
}
200 OK

successful operation

type
object
400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "period1": {
    "startDate": "string",
    "endDate": "string",
    "data": [
      {
        "location": "string",
        "payment": "string",
        "quantity": "integer",
        "reportGroup": "string",
        "revenue": "integer",
        "shift": "integer",
        "type": "string"
      }
    ]
  },
  "period2": {
    "startDate": "string",
    "endDate": "string",
    "data": [
      {
        "location": "string",
        "payment": "string",
        "quantity": "integer",
        "reportGroup": "string",
        "revenue": "integer",
        "shift": "integer",
        "type": "string"
      }
    ]
  }
}
Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get the revenue generated by the shifts closed within the provided time periods

POST /report/closedshiftsrevenue

Report request object

Request Example
{
  "machines": [
    87,
    94,
    80
  ],
  "period1": {
    "referenceDate": "2019-03-11T11:40:43+01:00",
    "startDate": {
      "year": 0,
      "month": 1,
      "day": 1,
      "week": null,
      "hour": 0,
      "minute": 0,
      "second": 0
    },
    "endDate": {
      "year": 0,
      "month": 0,
      "day": 0,
      "week": null,
      "hour": 23,
      "minute": 59,
      "second": 59
    }
  }
}
200 OK

successful operation

type
object
400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "period1": {
    "startDate": "string",
    "endDate": "string",
    "data": [
      {
        "shift": "integer",
        "productId": "integer",
        "name": "string",
        "barcode": "string",
        "reportName": "string",
        "quantity": "integer",
        "revenue": "integer",
        "sum": "integer",
        "currency": "string"
      }
    ]
  },
  "period2": {
    "startDate": "string",
    "endDate": "string",
    "data": [
      {
        "shift": "integer",
        "productId": "integer",
        "name": "string",
        "barcode": "string",
        "reportName": "string",
        "quantity": "integer",
        "revenue": "integer",
        "sum": "integer",
        "currency": "string"
      }
    ]
  }
}
Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Download raw transactions

GET /report-export/transactions

Get a CSV file containing the raw transactions on which a report is based, the date-range must be within 6 months of the current date

Report request object

Request Example
{
  "machines": [
    87,
    94,
    80
  ],
  "period1": {
    "referenceDate": "2019-03-11T11:40:43+01:00",
    "startDate": {
      "year": 0,
      "month": 1,
      "day": 1,
      "week": null,
      "hour": 0,
      "minute": 0,
      "second": 0
    },
    "endDate": {
      "year": 0,
      "month": 0,
      "day": 0,
      "week": null,
      "hour": 23,
      "minute": 59,
      "second": 59
    }
  }
}
200 OK

OK

400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find own reports

GET /report
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "period1": "integer",
    "period2": "integer",
    "user": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Create report

POST /report
name: string
period1: object
startDate: string
endDate: string
type: fixed date
period2: object

Optional period

startDate: string
endDate: string
type: fixed date
locationGroup: array

Optional filter

locations: array

Optional filter

machineGroups: array

Optional filter

machines: array

Optional filter

Request Example
{
  "name": "string",
  "period1": {
    "startDate": "string",
    "endDate": "string",
    "type": "fixed date"
  },
  "period2": {
    "startDate": "string",
    "endDate": "string",
    "type": "fixed date"
  },
  "locationGroup": "array",
  "locations": "array",
  "machineGroups": "array",
  "machines": "array"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Delete report

DELETE /report/{id}
id: integer
in path

The id of the report

200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one report

GET /report/{id}
id: integer
in path

The id of the report

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "period1": "integer",
  "period2": "integer",
  "user": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update report

PUT /report/{id}

Update a report. All properties in the request body are optional.

name: string
period1: object
startDate: string
endDate: string
type: fixed date
period2: object
startDate: string
endDate: string
type: fixed date
locationGroup: array
locations: array
machineGroups: array
machineModels: array
machineTypes: array
machines: array
manufactures: array
id: integer
in path

The id of the report

Request Example
{
  "name": "string",
  "period1": {
    "startDate": "string",
    "endDate": "string",
    "type": "fixed date"
  },
  "period2": {
    "startDate": "string",
    "endDate": "string",
    "type": "fixed date"
  },
  "locationGroup": "array",
  "locations": "array",
  "machineGroups": "array",
  "machineModels": "array",
  "machineTypes": "array",
  "machines": "array",
  "manufactures": "array"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Add associations

POST /report/{parentid}/{alias}/{id}
parentid: integer
in path

ID of report

alias: string locations, manufacturers, machineTypes, machineModels, machineGroups, machines
in path

Resource to add

id: integer
in path

ID of the association to add

201 Created

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (201 Created)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Remove associations

DELETE /report/{parentid}/{alias}/{id}
parentid: integer
in path

ID of report

alias: string locations, manufacturers, machineTypes, machineModels, machineGroups, machines
in path

Resource to remove

id: integer
in path

ID of the association to remove

204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (401 Unauthorized)
{
  "message": "string"
}

User report

User reports

Create a new user report for the authenticated user

POST /userreport
name: string
Request Example
{
  "name": "string"
}
201 Created

successful operation

type
object
400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

Response Example (201 Created)
{
  "id": "integer"
}
Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Returns the user reports of the authenticated user

GET /userreport
isDraft: boolean
in query

Filter by draft userreports

200 OK

successful operation

type
Response Example (200 OK)
[
  {
    "id": "integer",
    "user": "integer",
    "name": "string",
    "createAt": "string (date-time-utc)",
    "updateAt": "string (date-time-utc)"
  }
]

Returns a single user report

GET /userreport/{id}
id: integer
in path

ID of the user report

200 OK

successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

NotFound

Response Example (200 OK)
{
  "id": "integer",
  "user": "integer",
  "name": "string",
  "createAt": "string (date-time-utc)",
  "updateAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Create a new user report for the authenticated user

PUT /userreport/:id
name: string
id: integer
in path

ID of the user report

Request Example
{
  "name": "string"
}
204 No Content

successful operation

400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

NotFound

Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Create a new user report for the authenticated user

DELETE /userreport/:id
id: integer
in path

ID of the user report

204 No Content

successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

NotFound

Response Example (401 Unauthorized)
{
  "message": "string"
}

Create a new default chart in a user report

POST /userreport/:id/chart
name: string
type: DefaultChartTypes
criteria: ChartCriteria
position: integer
id: integer
in path

ID of user report

Request Example
{
  "name": "string",
  "type": "string",
  "criteria": {
    "select": [
      {
        "expr": "string",
        "op": "string",
        "as": "string"
      }
    ],
    "from": "string",
    "where": [
      {
        "field": "string",
        "op": "string",
        "value": "string"
      }
    ],
    "orderBy": [
      "string"
    ],
    "timeFrames": {
      "items": {
        "type": "string",
        "viewType": "string",
        "startAt": "date-time",
        "endAt": "date-time",
        "hoursToSub": "integer",
        "column": "string",
        "description": "string"
      }
    }
  },
  "position": "integer"
}
201 Created

successful operation

type
object
400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

NotFound

Response Example (201 Created)
{
  "id": "integer"
}
Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Gets the chart data for a user report

GET /userreport/:id/chart
id: integer
in path

ID of user report

200 OK

successful operation

type
201 Created

successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

NotFound

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "type": "string",
    "criteria": {
      "select": [
        {
          "expr": "string",
          "op": "string",
          "as": "string"
        }
      ],
      "from": "string",
      "where": [
        {
          "field": "string",
          "op": "string",
          "value": "string"
        }
      ],
      "orderBy": [
        "string"
      ],
      "timeFrames": {
        "items": {
          "type": "string",
          "viewType": "string",
          "startAt": "date-time",
          "endAt": "date-time",
          "hoursToSub": "integer",
          "column": "string",
          "description": "string"
        }
      }
    },
    "report": "integer",
    "reportType": "string",
    "createAt": "string (date-time-utc)",
    "updateAt": "string (date-time-utc)"
  }
]
Response Example (201 Created)
{
  "id": "integer",
  "name": "string",
  "type": "string",
  "criteria": {
    "select": [
      {
        "expr": "string",
        "op": "string",
        "as": "string"
      }
    ],
    "from": "string",
    "where": [
      {
        "field": "string",
        "op": "string",
        "value": "string"
      }
    ],
    "orderBy": [
      "string"
    ],
    "timeFrames": {
      "items": {
        "type": "string",
        "viewType": "string",
        "startAt": "date-time",
        "endAt": "date-time",
        "hoursToSub": "integer",
        "column": "string",
        "description": "string"
      }
    }
  },
  "report": "integer",
  "reportType": "string",
  "createAt": "string (date-time-utc)",
  "updateAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Create a new user report for the authenticated user

PUT /userreport/duplicate

The name of the new user report

name: string
id: integer
in query

The id of the user report to duplicate

Request Example
{
  "name": "string"
}
204 No Content

successful operation

400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

NotFound

Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get a chart or a Chart field

GET /chart/:id/:field?
id: integer
in path

ID of the chart

field: string
in path

Field of the chart to be returned

200 OK

successful operation

400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

NotFound

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "type": "string",
  "criteria": {
    "select": [
      {
        "expr": "string",
        "op": "string",
        "as": "string"
      }
    ],
    "from": "string",
    "where": [
      {
        "field": "string",
        "op": "string",
        "value": "string"
      }
    ],
    "orderBy": [
      "string"
    ],
    "timeFrames": {
      "items": {
        "type": "string",
        "viewType": "string",
        "startAt": "date-time",
        "endAt": "date-time",
        "hoursToSub": "integer",
        "column": "string",
        "description": "string"
      }
    }
  },
  "report": "integer",
  "reportType": "string",
  "createAt": "string (date-time-utc)",
  "updateAt": "string (date-time-utc)"
}
Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update a chart. If status=inProgress, the chart results will be recalculated

PUT /chart/:id

undefined

id: integer
in path

ID of user report

Request Example
{
  "id": "integer",
  "name": "string",
  "type": "string",
  "criteria": {
    "select": [
      {
        "expr": "string",
        "op": "string",
        "as": "string"
      }
    ],
    "from": "string",
    "where": [
      {
        "field": "string",
        "op": "string",
        "value": "string"
      }
    ],
    "orderBy": [
      "string"
    ],
    "timeFrames": {
      "items": {
        "type": "string",
        "viewType": "string",
        "startAt": "date-time",
        "endAt": "date-time",
        "hoursToSub": "integer",
        "column": "string",
        "description": "string"
      }
    }
  },
  "report": "integer",
  "reportType": "string",
  "createAt": "string (date-time-utc)",
  "updateAt": "string (date-time-utc)"
}
204 No Content

successful operation

400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

NotFound

Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get a chart

DELETE /chart/:id
id: integer
in path

ID of user report

204 No Content

successful operation

400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

NotFound

Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

User report chart

User Report charts

Chart template

Chart templates

Returns the chart templates

GET /charttemplate
200 OK

successful operation

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "type": "string",
    "criteria": {
      "select": [
        {
          "expr": "string",
          "op": "string",
          "as": "string"
        }
      ],
      "from": "string",
      "where": [
        {
          "field": "string",
          "op": "string",
          "value": "string"
        }
      ],
      "orderBy": [
        "string"
      ],
      "timeFrames": {
        "items": {
          "type": "string",
          "viewType": "string",
          "startAt": "date-time",
          "endAt": "date-time",
          "hoursToSub": "integer",
          "column": "string",
          "description": "string"
        }
      }
    },
    "createAt": "string (date-time-utc)",
    "updateAt": "string (date-time-utc)"
  }
]

Count the number of chart templates

GET /charttemplate/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Returns a single chart template

GET /charttemplate/{id}
id: integer
in path

ID of the chart template

200 OK

successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

NotFound

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "type": "string",
  "criteria": {
    "select": [
      {
        "expr": "string",
        "op": "string",
        "as": "string"
      }
    ],
    "from": "string",
    "where": [
      {
        "field": "string",
        "op": "string",
        "value": "string"
      }
    ],
    "orderBy": [
      "string"
    ],
    "timeFrames": {
      "items": {
        "type": "string",
        "viewType": "string",
        "startAt": "date-time",
        "endAt": "date-time",
        "hoursToSub": "integer",
        "column": "string",
        "description": "string"
      }
    }
  },
  "createAt": "string (date-time-utc)",
  "updateAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Alert observer

Describes the criteria that to generate alert

Count the number of alert observers

GET /alertobserver/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find alert observers

GET /alertobserver
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "error": "integer",
    "observer": "string",
    "occurs": "integer",
    "timer": "integer",
    "timerType": "integer",
    "alertGroup": "integer",
    "sentAt": "string (date-time)",
    "type": "string",
    "paymentMethod": "string",
    "openingHours": "integer",
    "userGroup": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new alert observer

POST /alertobserver

Alert observer object that needs to be added to the store

name: string
type: string event, transaction
observer: string occurrence, non_resolution, non_occurrence
timer: integer
timerType: integer 1, 2, 3, 4
alertGroup: integer
error: integer
occurs: integer
paymentMethod: string cash, card, code, virtual, token
machines: integer[]
integer
openingHours: boolean
Request Example
{
  "name": "string",
  "type": "string",
  "observer": "string",
  "timer": "integer",
  "timerType": "integer",
  "alertGroup": "integer",
  "error": "integer",
  "occurs": "integer",
  "paymentMethod": "string",
  "machines": [
    "integer"
  ],
  "openingHours": "boolean"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Remove an alert observer

DELETE /alertobserver/{id}
id: integer
in path

ID of the alert observer

204 No Content

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one alert observer

GET /alertobserver/{id}
id: integer
in path

ID of the alert observer

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "error": "integer",
  "observer": "string",
  "occurs": "integer",
  "timer": "integer",
  "timerType": "integer",
  "alertGroup": "integer",
  "sentAt": "string (date-time)",
  "type": "string",
  "paymentMethod": "string",
  "openingHours": "integer",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update an alert observer

PUT /alertobserver/{id}

Alert observer object that needs to be updated in the store

name: string
type: string event, transaction
observer: string occurrence, non_resolution, non_occurrence
timer: integer
timerType: integer 1, 2, 3, 4
alertGroup: integer
error: integer
occurs: integer
paymentMethod: string cash, card, code, virtual, token
machines: integer[]
integer
openingHours: boolean
id: integer
in path

ID of the alert observer

Request Example
{
  "name": "string",
  "type": "string",
  "observer": "string",
  "timer": "integer",
  "timerType": "integer",
  "alertGroup": "integer",
  "error": "integer",
  "occurs": "integer",
  "paymentMethod": "string",
  "machines": [
    "integer"
  ],
  "openingHours": "boolean"
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Reset the occurrence counter of the given alert observer

PUT /machine/{machine}/alertobserver/{id}/reset
machine: integer
in path

ID of the machine

id: integer
in path

ID of the alert observer

204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate alert observer's associations/collections

GET /alertobserver/{parentid}/{alias}
parentid: integer
in path

ID of alert observer

alias: string error, alertGroup, machines, userGroup
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Alert group

Group of alert recipients

Count the number of alert groups

GET /alertgroup/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find alert groups

GET /alertgroup
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "userGroup": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new alert group

POST /alertgroup

Alert group object that needs to be added to the store

name: string
Request Example
{
  "name": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find an alert group

GET /alertgroup/{id}
id: integer
in path

ID of alert group

200 OK

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update an alert group

PUT /alertgroup/{id}

Alert group object that needs to be updated

name: string
id: integer
in path

ID of alert group

Request Example
{
  "name": "string"
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (204 No Content)
{
  "id": "integer",
  "name": "string",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate alert group's associations/collections

GET /alertgroup/{parentid}/{alias}
parentid: integer
in path

ID of alert group

alias: string userGroup, recipients
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Alert recipient

Recipient to warn in case of alert

Find alert recipients

GET /alertrecipient
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "email": "string",
    "active": "integer",
    "language": "integer",
    "alertGroup": "integer",
    "userGroup": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new alert recipient

POST /alertrecipient

Alert recipient object that needs to be added to the store

name: string
email: string
language: integer
alertGroup: integer
active: boolean
Request Example
{
  "name": "string",
  "email": "string",
  "language": "integer",
  "alertGroup": "integer",
  "active": "boolean"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Count the number of alert recipients

GET /alertrecipient/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one alert recipient

GET /alertrecipient/{id}
id: integer
in path

ID of the alert recipient

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "email": "string",
  "alertGroup": "integer",
  "language": "integer",
  "active": "integer",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update an alert recipient

PUT /alertrecipient/{id}

Alert recipient object that needs to be updated in the store

name: string
email: string
language: integer
alertGroup: integer
active: boolean
id: integer
in path

ID of the alert recipient

Request Example
{
  "name": "string",
  "email": "string",
  "language": "integer",
  "alertGroup": "integer",
  "active": "boolean"
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Remove an alert observer

DELETE /alertrecipient/{id}
id: integer
in path

ID of the alert recipient

204 No Content

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate alert recipient's associations/collections

GET /alertrecipient/{parentid}/{alias}
parentid: integer
in path

ID of alert recipient

alias: string language, alertGroup, userGroup
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Product

Products served by machines

Add a new flavour to a assortment

POST /machine/{machine}/flavour
name: string
reportName: string
price: integer
plu: integer
machine: integer
in path

ID of the machine

Request Example
{
  "name": "string",
  "reportName": "string",
  "price": "integer",
  "plu": "integer"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Get the flavours of an assortment

GET /machine/{machine}/flavour
machine: integer
in path

ID of the machine

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer",
  "plu": "integer",
  "name": "string",
  "price": "string",
  "barcode": "string",
  "machine": "integer",
  "reportName": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get the quantity of flavours of an assortment

GET /machine/{machine}/flavour/count
machine: integer
in path

ID of the machine

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update an existing flavour

PUT /machine/{machine}/flavour/{id}
name: string
reportName: string
price: integer
machine: integer
in path

ID of the machine

id: integer
in path

ID of the flavour

Request Example
{
  "name": "string",
  "reportName": "string",
  "price": "integer"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Delete a flavour

DELETE /machine/{machine}/flavour/{id}
machine: integer
in path

ID of the machine

id: integer
in path

ID of the flavour

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new extra product to a assortment

POST /machine/{machine}/extra
name: string
reportName: string
price: integer
plu: integer
machine: integer
in path

ID of the machine

Request Example
{
  "name": "string",
  "reportName": "string",
  "price": "integer",
  "plu": "integer"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Get the extra products of an assortment

GET /machine/{machine}/extra
machine: integer
in path

ID of the machine

200 OK

Successful operation

400 Bad Request

Bad Request

Response Example (200 OK)
{
  "id": "integer",
  "plu": "integer",
  "name": "string",
  "price": "string",
  "barcode": "string",
  "machine": "integer",
  "reportName": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

Get the amount of extra products

GET /machine/{machine}/extra/count
machine: integer
in path

ID of the machine

200 OK

Successful operation

400 Bad Request

Bad Request

Response Example (200 OK)
{
  "count": "integer"
}

Delete an extra product

DELETE /machine/{machine}/extra/{id}
machine: integer
in path

ID of the machine

id: integer
in path

ID of the extra product

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

FInd products

GET /product

Get the product of a certain machine.

machine: integer
in query

The id of the machine

200 OK

Successful operation

400 Bad Request

Missing parameter

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer",
  "plu": "integer",
  "name": "string",
  "price": "string",
  "barcode": "string",
  "machine": "integer",
  "reportName": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new product

POST /machine/{machine}/product

Product object that needs to be added to the store

name: string
machine: integer
plu: integer
price: number
reportName: string
barcode: string
machine: integer
in path

ID of the machine

Request Example
{
  "name": "string",
  "machine": "integer",
  "plu": "integer",
  "price": "number",
  "reportName": "string",
  "barcode": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update a product

PUT /machine/{machine}/product/{id}

Product object that needs to be updated in the store

name: string
machine: integer
plu: integer
price: number
reportName: string
barcode: string
machine: integer
in path

ID of the machine

id: integer
in path

ID of the product

Request Example
{
  "name": "string",
  "machine": "integer",
  "plu": "integer",
  "price": "number",
  "reportName": "string",
  "barcode": "string"
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Remove a product

DELETE /machine/{machine}/product/{id}
machine: integer
in path

ID of the machine

id: integer
in path

ID of the product

204 No Content

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (401 Unauthorized)
{
  "message": "string"
}

Count the number of product on a machine

GET /product/count
machine: integer
in query

The id of the machine

200 OK

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Assortment

The machines' product assortment

Convert assortment preview

POST /assortment/{machine}/convert-preview

Returns current and the formatted assorment

flavourPLU: integer
extraProductPLU: integer
machine: integer
in path

The ID of the machine

Request Example
{
  "flavourPLU": "integer",
  "extraProductPLU": "integer"
}
200 OK

successful operation

type
object
400 Bad Request

Missing parameter

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "baseProducts": [
    {
      "id": "integer",
      "plu": "integer",
      "name": "string",
      "price": "string",
      "barcode": "string",
      "machine": "integer",
      "reportName": "string",
      "createdAt": "string (date-time-utc)",
      "updatedAt": "string (date-time-utc)"
    }
  ],
  "productFlavours": [
    {
      "id": "integer",
      "plu": "integer",
      "name": "string",
      "price": "string",
      "barcode": "string",
      "machine": "integer",
      "reportName": "string",
      "createdAt": "string (date-time-utc)",
      "updatedAt": "string (date-time-utc)"
    }
  ],
  "extraProducts": [
    {
      "id": "integer",
      "plu": "integer",
      "name": "string",
      "price": "string",
      "barcode": "string",
      "machine": "integer",
      "reportName": "string",
      "createdAt": "string (date-time-utc)",
      "updatedAt": "string (date-time-utc)"
    }
  ]
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Convert assorment

POST /assortment/{machine}/convert

Convert the current assortment into a new format, see convert preview

flavourPLU: integer
extraProductPLU: integer
machine: integer
in path

The ID of the machine

Request Example
{
  "flavourPLU": "integer",
  "extraProductPLU": "integer"
}
200 OK

successful operation

400 Bad Request

Missing parameter

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Import assortment

POST /assortment/{machine}/import

Override assortment with given products

object
plu: integer
name: string
reportName: string
price: integer
barcode: string
machine: integer
in path

The ID of the machine

Request Example
[
  {
    "plu": "integer",
    "name": "string",
    "reportName": "string",
    "price": "integer",
    "barcode": "string"
  }
]
200 OK

successful operation

400 Bad Request

Missing parameter

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Copy assortment

POST /assortment/copy

Copy the assortment of a machine to a given group of machines

machine: integer
in query

Machine ID

machine: integer
in query

Machine group ID

200 OK

successful operation

400 Bad Request

Missing parameter

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Error profile

Machine error profiles

Count the number of error profiles

GET /errorprofile/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find error profiles

GET /errorprofile
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "machineType": "integer",
    "manufacturer": "integer",
    "userGroup": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new error profile

POST /errorprofile

Error profile object that needs to be added to the store

name: string
machineType: integer
manufacturer: integer
Request Example
{
  "name": "string",
  "machineType": "integer",
  "manufacturer": "integer"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one error profile

GET /errorprofile/{id}
id: integer
in path

ID of the error profile

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "machineType": "integer",
  "manufacturer": "integer",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update an error profile

PUT /errorprofile/{id}

Error profile object that needs to be updated in the store

name: string
machineType: integer
manufacturer: integer
id: integer
in path

ID of the error profile

Request Example
{
  "name": "string",
  "machineType": "integer",
  "manufacturer": "integer"
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate error profile's associations/collections

GET /errorprofile/{parentid}/{alias}
parentid: integer
in path

ID of error profile

alias: string machineType, manufacturer, errorCodes, userGroup
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Remove associations

DELETE /errorprofile/{parentid}/{alias}/{id}
parentid: integer
in path

ID of error profile

alias: string translations
in path

Resource to remove

id: integer
in path

ID of the association to remove

204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (401 Unauthorized)
{
  "message": "string"
}

Add associations

POST /errorprofile/{parentid}/{alias}/{id}
parentid: integer
in path

ID of error profile

alias: string errorCodes
in path

Resource to add

id: integer
in path

ID of the association to add

201 Created

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (201 Created)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Create new transaction profile

PUT /transactionprofile/{id}

Transaction profile object to be added

id: integer
reportRule: string first_letter, first_block
paymentTypesMap: object

It contains pairs of payment method -> payment type. See [GET /transactionprofile/paymenttypes] for more details

Request Example
{
  "id": "integer",
  "reportRule": "string",
  "paymentTypesMap": "object"
}
204 No Content

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (204 No Content)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Error identity

Normalized errors/events descriptions

Count the number of error identities

GET /erroridentity/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find error identities

GET /erroridentity
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "error": "string",
    "machineType": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new error identity

POST /erroridentity

Error identity object that needs to be added to the store

machineType: integer
error: string
Request Example
{
  "machineType": "integer",
  "error": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one error identity

GET /erroridentity/{id}
id: integer
in path

ID of the error identity

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "error": "string",
  "machineType": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update an error identity

PUT /erroridentity/{id}

Error identity object that needs to be updated in the store

machineType: integer
error: string
id: integer
in path

ID of the error identity

Request Example
{
  "machineType": "integer",
  "error": "string"
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate error identity's associations/collections

GET /erroridentity/{parentid}/{alias}
parentid: integer
in path

ID of error identity

alias: string machineType, translations
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Remove associations

DELETE /erroridentity/{parentid}/{alias}/{id}
parentid: integer
in path

ID of error identity

alias: string translations
in path

Resource to remove

id: integer
in path

ID of the association to remove

204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (401 Unauthorized)
{
  "message": "string"
}

Add associations

POST /erroridentity/{parentid}/{alias}/{id}
parentid: integer
in path

ID of error identity

alias: string translations
in path

Resource to add

id: integer
in path

ID of the association to add

201 Created

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (201 Created)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Error code

Mapping between error profile and error identity

Find error codes

GET /errorcode
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "code": "string",
    "errorIdentity": "integer",
    "errorProfile": "integer",
    "userGroup": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new error code

POST /errorcode

Error code object that needs to be added to the store

errorIdentity: integer
errorProfile: integer
code: string
Request Example
{
  "errorIdentity": "integer",
  "errorProfile": "integer",
  "code": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Remove an error code

DELETE /errorcode/{id}
id: integer
in path

ID of the error code

204 No Content

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one error code

GET /errorcode/{id}
id: integer
in path

ID of the error code

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "code": "string",
  "errorIdentity": "integer",
  "errorProfile": "integer",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update an error code

PUT /errorcode/{id}

Error code object that needs to be updated in the store

errorIdentity: integer
errorProfile: integer
code: string
id: integer
in path

ID of the error code

Request Example
{
  "errorIdentity": "integer",
  "errorProfile": "integer",
  "code": "string"
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate error code's associations/collections

GET /errorcode/{parentid}/{alias}
parentid: integer
in path

ID of error code

alias: string errorIdentity, errorProfile, userGroup
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Transaction profile

Machine transaction profiles

Create new transaction profile

POST /transactionprofile

Transaction profile object to be added

reportRule: string first_letter, first_block
paymentTypesMap: object

It contains pairs of payment method -> payment type. See [GET /transactionprofile/paymenttypes] for more details

Request Example
{
  "reportRule": "string",
  "paymentTypesMap": "object"
}
201 Created

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (201 Created)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Returns the supported report rules

GET /transactionprofile/reportrules
200 OK

Successful operation

type
string[]
Response Example (200 OK)
[
  "string"
]

Returns the supported payment types

GET /transactionprofile/paymenttypes
200 OK

Successful operation

type
string[]
Response Example (200 OK)
[
  "string"
]

Returns the default transaction profile values

GET /transactionprofile/defaults
200 OK

Successful operation

type
object
Response Example (200 OK)
{
  "reportRule": "string",
  "paymentTypesMap": "object"
}

Returns the transaction profile with the provided ID

GET /transactionprofile/{id}
200 OK

Successful operation

type
object
Response Example (200 OK)
{
  "id": "integer",
  "reportRule": "string",
  "paymentTypesMap": "object"
}

Dashboard

User dashboards

Find user's dashboards

GET /dashboard
id: integer
in path

ID of the dashboard

200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "user": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get dashboard's widgets

GET /dashboard/:dashboard/widget
dashboard: integer
in path

ID of the dashboard

200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "widgetType": "integer",
    "dashboard": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new widget dashboard

POST /dashboard/:dashboard/widget

Widget object that needs to be added to the store

name: string
widgetType: number
dashboard: integer
in path

ID of the dashboard

Request Example
{
  "name": "string",
  "widgetType": "number"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update widget's settings

PUT /widget/{id}/settings

Widget object that needs to be updated

settings: string
widget: integer
in path

ID of widget

Request Example
{
  "settings": "string"
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (401 Unauthorized)
{
  "message": "string"
}

Get the current widget's settings

GET /widget/{id}/settings
id: integer
in path

ID of the widget

200 OK

Successful operation

type
array
401 Unauthorized

Unauthorized

Response Example (200 OK)
"array"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get widget types

GET /widgettype
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "configurable": "boolean",
    "defaultApp": "boolean",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Remove a widget

DELETE /widget/{id}
id: integer
in path

ID of the widget

204 No Content

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (401 Unauthorized)
{
  "message": "string"
}

Update a widget

PUT /widget/{id}

Widget object that needs to be updated

name: string
dashboard: integer
widgetType: integer
id: integer
in path

ID of widget

Request Example
{
  "name": "string",
  "dashboard": "integer",
  "widgetType": "integer"
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (204 No Content)
{
  "id": "integer",
  "name": "string",
  "widgetType": "integer",
  "dashboard": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one widget

GET /widget/{id}
id: integer
in path

ID of the widget

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "widgetType": "integer",
  "dashboard": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Export

Endpoints to export certain resources' data

CSV export

GET /{resource}/format/csv

CSV export the requested resource.

resource: enum alertgroup, alertobserver, alertrecipient, errorcode, erroridentity, errorprofile, language, location, locationgroup, log, machine, machinegroup, machinemodel, machinetype, manufacturer, paymenttransaction, product, productextra, productflavour, revenuetransaction, shift, user, usergroup
in path

(no description)

columns: array
in query

The columns to export. format: [{property: string, alias: 'name in csv'}]

where: object
in query

The criteria object, machine property is required

sort: object
in query

The sort column e.g. {name: 'ASC}

filename: array
in query

Fallbacks to export

timezone: array
in query

The timezone of the user (for returning the correct datetime in datetime columns)

exportAll: boolean
in query

Export all product combinations

200 OK

successful operation

400 Bad Request

Missing parameter

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Download raw transactions

GET /report-export/transactions

Get a CSV file containing the raw transactions on which a report is based, the date-range must be within 6 months of the current date

Report request object

Request Example
{
  "machines": [
    87,
    94,
    80
  ],
  "period1": {
    "referenceDate": "2019-03-11T11:40:43+01:00",
    "startDate": {
      "year": 0,
      "month": 1,
      "day": 1,
      "week": null,
      "hour": 0,
      "minute": 0,
      "second": 0
    },
    "endDate": {
      "year": 0,
      "month": 0,
      "day": 0,
      "week": null,
      "hour": 23,
      "minute": 59,
      "second": 59
    }
  }
}
200 OK

OK

400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Image

The images

Find images

GET /image
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "thumbnail": "string",
    "original": "string",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new image

POST /image

Image object that needs to be added to the store

thumbnail: string
original: string
Request Example
{
  "thumbnail": "string",
  "original": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Remove an image

DELETE /image/{id}
id: integer
in path

ID of the image

204 No Content

Successful operation

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one image

GET /image/{id}
id: integer
in path

ID of the image

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "thumbnail": "string",
  "original": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update an image

PUT /image/{id}

Image object that needs to be updated in the store

thumbnail: string
original: string
id: integer
in path

ID of the image

Request Example
{
  "thumbnail": "string",
  "original": "string"
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Language

Supported languages

Count the number of languages

GET /language/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find languages

GET /language
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "language": "string",
    "locale": "string",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new language

POST /language

Language object that needs to be added to the store

name: string
language: string
locale: string
Request Example
{
  "name": "string",
  "language": "string",
  "locale": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one language

GET /language/{id}
id: integer
in path

ID of the language

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "name": "string",
  "language": "string",
  "locale": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update a language

PUT /language/{id}

Language object that needs to be updated in the store

name: string
language: string
locale: string
id: integer
in path

ID of the language

Request Example
{
  "name": "string",
  "language": "string",
  "locale": "string"
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Currency

Supporetd currencies

Count the number of currencies

GET /currency/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find currencies

GET /currency
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "code": "string",
    "rate": "number",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Permission

Group permissions

Translation

The translations

Find translations

GET /translation
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "key": "string",
    "value": "string",
    "language": "integer",
    "userGroup": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new translation

POST /translation

Translation object that needs to be added to the store

key: string
language: integer
value: string
Request Example
{
  "key": "string",
  "language": "integer",
  "value": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one translation

GET /translation/{id}
id: integer
in path

ID of the translation

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "key": "string",
  "value": "string",
  "language": "integer",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update a translation

PUT /translation/{id}

Translation object that needs to be updated in the store

key: string
language: integer
value: string
id: integer
in path

ID of the translation

Request Example
{
  "key": "string",
  "language": "integer",
  "value": "string"
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Populate translation's associations/collections

GET /translation/{parentid}/{alias}
parentid: integer
in path

ID of translation

alias: string language, userGroup
in path

Resource to populate

200 OK

Successful operation

type
object
400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
"object"
Response Example (401 Unauthorized)
{
  "message": "string"
}

Campaign

Create a new user campaign for the user group of the authenticated user

POST /campaign
name: string
totalVouchers: integer
type: enum discount, gift, dynamic
valueType: enum cents cents
redemptionLimit: integer
resetFrequency: enum day, week, month, never
expiresOn: date
timeZone: string Europe/Amsterdam
Request Example
{
  "name": "string",
  "totalVouchers": "integer",
  "type": "enum",
  "valueType": "enum",
  "redemptionLimit": "integer",
  "resetFrequency": "enum",
  "expiresOn": "date",
  "timeZone": "string"
}
201 Created

successful operation

type
object
400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (201 Created)
{
  "id": "integer"
}
Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get campaigns

GET /campaign
limit: integer x ≤ 100
in query

Limit the number of logs returned

skip: integer 0
in query

Skips the first 'N' items of the results

where[<col>][<op>]: value: string
in query

Filter criteria. It supports multiple values: e.g. where[occurredAt][>]=2018-05-15T00:00:00&where[machine]=1094

sort: string asc
in query

The sort column e.g. sort[occurredAt]=desc

200 OK

successful operation

type
401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (200 OK)
[
  {
    "name": "string",
    "totalVouchers": "integer",
    "type": "enum",
    "valueType": "enum",
    "voucherValue": "integer",
    "redemptionLimit": "integer",
    "resetFrequency": "enum",
    "expiresOn": "date",
    "currency": "string",
    "timeZone": "string",
    "status": "enum",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Count the number of campaigns the user has access to (=the number of campaigns the usergroup has)

GET /campaign/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get campaign by Id

GET /campaign/{id}
id: integer
in path

The id of the campaign

200 OK

successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (200 OK)
{
  "name": "string",
  "totalVouchers": "integer",
  "type": "enum",
  "valueType": "enum",
  "voucherValue": "integer",
  "redemptionLimit": "integer",
  "resetFrequency": "enum",
  "expiresOn": "date",
  "currency": "string",
  "timeZone": "string",
  "status": "enum",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update campaign

PUT /campaign/{id}
name: string
valueType: enum cents cents
redemptionLimit: integer
resetFrequency: enum day, week, month, never
expiresOn: date
currency: string EUR
timeZone: string Europe/Amsterdam
id: integer
in path

The id of the campaign

Request Example
{
  "name": "string",
  "valueType": "enum",
  "redemptionLimit": "integer",
  "resetFrequency": "enum",
  "expiresOn": "date",
  "currency": "string",
  "timeZone": "string"
}
204 No Content

Successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (401 Unauthorized)
{
  "message": "string"
}

Delete campaign

DELETE /campaign/{id}
id: integer
in path

The id of the campaign

204 No Content

Successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (401 Unauthorized)
{
  "message": "string"
}

Get campaign validation rules

GET /campaign/{id}/validation
id: integer
in path

The id of the campaign

200 OK

Successful operation

type
object[]
401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (200 OK)
[
  {
    "field": "string",
    "value": "string"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update campaign validation rules

PUT /campaign/{id}/validation
id: integer
in path

The id of the campaign

Request Example
[
  {
    "field": "string",
    "value": "string"
  }
]
204 No Content

Successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (401 Unauthorized)
{
  "message": "string"
}

Get campaign stats

GET /campaign/{id}/stats
id: integer
in path

The id of the campaign

200 OK

Successful operation

type
object
401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (200 OK)
{
  "totalVouchers": "integer",
  "redemptionCount": "integer",
  "voucherValue": "integer",
  "redemptionCost": "integer",
  "totalRevenue": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Campaign Voucher

Return the vouchers of a campaign

GET /campaign/{id}/voucher
id: integer
in path

The id of the campaign

200 OK

successful operation

type
401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (200 OK)
[
  {
    "id": "string",
    "code": "string",
    "campaign": "integer",
    "type": "string",
    "value": "integer",
    "valueType": "string",
    "currency": "string",
    "initialValue": "integer",
    "redemptionLimit": "integer",
    "redemptionCount": "integer",
    "totalRedemptionCount": "integer",
    "lastRedemptionAt": "string (date-time-utc)",
    "lastRedemptionLocation": "string",
    "prefix": "string",
    "resetFrequency": "string",
    "lastResetAt": "string (date-time-utc)",
    "expiresOn": "string (date-time-utc)",
    "timeZone": "string",
    "lockOwner": "string",
    "lockedTill": "string (date-time-utc)",
    "status": "string",
    "amountRedeemed": "integer",
    "totalAmountRedeemed": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get the number of vouchers a campaign

GET /campaign/{id}/voucher/count
id: integer
in path

The id of the campaign

200 OK

Successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get the number of active vouchers a campaign

GET /campaign/{id}/voucher/count/active
id: integer
in path

The id of the campaign

200 OK

Successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Campaign Voucher pdf

Triggers the generation of the campaign vouchers as a PDF file

POST /campaign/{id}/voucher/pdf
id: integer
in path

The id of the campaign

201 Created

Successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (401 Unauthorized)
{
  "message": "string"
}

Returns the campaign vouchers as a PDF file

GET /campaign/{id}/voucher/pdf
id: integer
in path

The id of the campaign

201 Created

Successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (401 Unauthorized)
{
  "message": "string"
}

Triggers the generation of specific voucher from campaign as a PDF file

POST /campaign/{id}/voucher/{voucher_id}/pdf
id: integer
in path

The id of the campaign

voucher_id: string
in path

The id of the voucher

201 Created

Successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (401 Unauthorized)
{
  "message": "string"
}

Returns single voucher as a PDF file

GET /campaign/{id}/voucher/{voucher_id}/pdf
id: integer
in path

The id of the campaign

id: string
in path

The id of the voucher

201 Created

Successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (401 Unauthorized)
{
  "message": "string"
}

Debtor

Count the number of debtors

GET /debtor/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find debtors

GET /debtor
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "externalId": "integer",
    "name": "string",
    "description": "string",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new debtor

POST /debtor

Debtor object that needs to be added to the store, with a unique externalId and name

externalId: integer
name: string
description: string
Request Example
{
  "externalId": "integer",
  "name": "string",
  "description": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one debtor

GET /debtor/{id}
id: integer
in path

ID of the debtor

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "externalId": "integer",
  "name": "string",
  "description": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update a debtor

PUT /debtor/{id}

Debtor object that needs to be updated in the store, with a unique externalId and name

externalId: integer
name: string
description: string
id: integer
in path

ID of the debtor

Request Example
{
  "externalId": "integer",
  "name": "string",
  "description": "string"
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Gateway

Get the available software versions for Houdini gateways

GET /gateway/versions

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
[
  {
    "name": "string",
    "description": "string"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Execute a Gateway command

POST /gateway/{hostname}/command/{command}/exec

Parameters of the command

params: array
hostname: integer
in path

Hostname of the machine

command: string
in path

Command to execute

Request Example
{
  "params": "array"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Execute a command on multiple Gateways

POST /gateway/command/{command}/exec

Parameters of the command

params: array
command: string
in path

Command to execute

Request Example
{
  "params": "array"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Integration

Count the number of integrations owned by the user's user group

GET /integration/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find base details of integrations owned by the user's user group

GET /integration
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "type": "string",
    "name": "string",
    "active": "boolean",
    "state": "string",
    "throttle": "integer",
    "maxRetries": "integer",
    "retryThrottle": "integer",
    "stopOnFailure": "boolean",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new integration

POST /integration

Integration object that needs to be added to the store, with a unique name within the user's user group

externalId: integer
name: string
description: string
Request Example
{
  "externalId": "integer",
  "name": "string",
  "description": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find one integration

GET /integration/{id}
id: integer
in path

ID of the integration

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "type": "string",
  "name": "string",
  "active": "boolean",
  "state": "string",
  "throttle": "integer",
  "maxRetries": "integer",
  "retryThrottle": "integer",
  "stopOnFailure": "boolean",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update an integration

PUT /integration/{id}

Integration object that needs to be updated in the store, with a unique name within the user's user group

externalId: integer
name: string
description: string
id: integer
in path

ID of the integration

Request Example
{
  "externalId": "integer",
  "name": "string",
  "description": "string"
}
204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Delete an integration and all of its logged errors

DELETE /integration/{id}
id: integer
in path

ID of the integration

204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Get the number of errors of one integration

GET /integration/{id}/errors/count
id: integer
in path

ID of the integration

200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get the errors of one integration

GET /integration/{id}/errors
id: integer
in path

ID of the integration

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Response Example (200 OK)
{
  "id": "integer",
  "state": "string",
  "machine": "integer",
  "revenuetransaction": "integer",
  "message": "string",
  "details": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Trigger an integration, like when in the failed state if an integration is configured to stop on errors

PUT /integration/{id}/sync
id: integer
in path

ID of the integration

204 No Content

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Invoice

Count the number of invoices

GET /invoice/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find invoices

GET /invoice
limit: integer x ≤ 100
in query

Limit the number of logs returned

skip: integer 0
in query

Skips the first 'N' items of the results

where[<col>][<op>]: value: string
in query

Filter criteria. It supports multiple values: e.g. where[occurredAt][>]=2018-05-15T00:00:00&where[machine]=1094

sort: string asc
in query

The sort column e.g. sort[occurredAt]=desc

Request Example
"integer"
200 OK

Successful operation

type
401 Unauthorized

Unauthorized

403 Forbidden

Forbidden. Sent when the limit provided or the results size is greater than the max limit allowed

Response Example (200 OK)
[
  {
    "id": "integer",
    "remote": "integer",
    "price": "integer",
    "occurredAt": "string (date-time-utc)",
    "machine": "integer",
    "location": "integer",
    "timestamp": "integer",
    "currency": "string",
    "timezone": "string",
    "name": "string",
    "token": "string",
    "salestype": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Machine state

Returns a machine state

GET /machinestate/{machineId}
machineId: integer
in path

ID of the machine

200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "machineId": "integer",
  "state": "object"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Navigation history

Count the number of navigation history entries

GET /navigationhistory/count
200 OK

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "count": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find navigation history entries

GET /navigationhistory

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "title": "string",
    "rootFragment": "string",
    "urlFragment": "string",
    "queryString": "string",
    "createdAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Add a new navigation history

POST /navigationhistory

Navigation history object that needs to be added to the store

title: string
urlFragment: string
queryString: string
Request Example
{
  "title": "string",
  "urlFragment": "string",
  "queryString": "string"
}
200 OK

Successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "id": "integer"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find last navigation history entries

GET /navigationhistory/last-viewed

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "integer",
    "title": "string",
    "rootFragment": "string",
    "urlFragment": "string",
    "queryString": "string",
    "createdAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Voucher

Validates a voucher

POST /voucher/{code}/validate
deviceId: string

Id of the device that wants to validate the voucher

lockDuration: number

Lock time in seconds. If provided an the campaign where the voucher belongs has a redemptionLimit (vouchers are not unlimitted), it reserves the usage of the voucher to 'deviceId' during the amount of seconds provided. If the campaign has no redemptionLimit, lockDuration will be ignored. During the lock period, only the deviceId that owns the lock can release it explicitly. There are 3 ways a lock can be released: a) set 'lockDuration' to 0 or null by re-validating the voucher from the device that owns lock. b) redeemed the voucher from the device that owns lock. c) wait till the lock expires. If 'lockDuration' is not provided, the voucher won't be reserved to 'deviceId'.

demand: object

Used on 'gift' vouchers only. If the campaign is type 'gift', and 'demand' is not provided, the current voucher balance will be returned as 'discount.amountOff'

amount: integer

Amount to subtract from the voucher value.

code: string
in path

Code of the voucher. Codes are unique per campaign, but they can't identify a Voucher.

Request Example
{
  "deviceId": "string",
  "lockDuration": "number",
  "demand": {
    "amount": "integer"
  }
}

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "code": "string",
  "campaignType": "string",
  "voucherId": "string",
  "valid": "boolean",
  "reason": "string",
  "discount": {
    "type": "string"
  },
  "validFor": {
    "products": "object",
    "productsRegExp": "string"
  }
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Redeems a voucher

POST /voucher/{code}/redeem
deviceId: string

Id of the device that wants to validate the voucher

order: object
id: string

Id of the order/transaction where the code's redemption's been applied.

amount: integer
items: object[]
object
productId: string

Id of the product. In case the campaign accepts specific products, this value will be checked at the code redemption.

quantity: integer

Number of products with id=productId in this order

price: integer

Price in cents of one product unit

demand: object

Mandatory if it's a 'gift' voucher. Otherwise, it's not used.

amount: integer

Amount to subtract from the voucher value.

code: string
in path

Code of the voucher. Codes are unique per campaign, but they can't identify a Voucher.

Request Example
{
  "deviceId": "string",
  "order": {
    "id": "string",
    "amount": "integer",
    "items": [
      {
        "productId": "string",
        "quantity": "integer",
        "price": "integer"
      }
    ]
  },
  "demand": {
    "amount": "integer"
  }
}

Successful operation

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "code": "string",
  "campaignType": "string",
  "voucherId": "string",
  "redeemed": "boolean",
  "reason": "string",
  "discount": {
    "type": "string",
    "amountOff": "integer"
  }
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Create a new voucher

POST /voucher
campaign: integer

Id of the campaign where the voucher will be created.

type: enum discount, gift, inherit

Type of voucher. If type=inherit, 'value' and the rest of the properties are inherited from the campaign.

value: integer

Value of the voucher in the units specified by 'valueType'. If voucher type is 'discount' or 'gift', it's a required field. Not applicable to vouchers of type 'inherit'.

valueType: enum cents cents

Not applicable to vouchers of type 'inherit'

code: string

Code (optional) - custom voucher code (usually printed as QR on a coupon) used as an identifier between client (scanner) and the voucher system. If empty, random alphanumeric code will be generated.

prefix: string 00000

The prefix of the code of the voucher. I.e. prefix 'ABC' would generate a code with the following structure: 'ABC-{CODE}'. Validations: Pattern = [A-Z], Max length = 5

redemptionLimit: integer

Number of times a voucher can be redeemed. Not applicable to vouchers of type 'inherit'

resetFrequency: enum day, week, month, never never

How frequent the voucher counters (and value in case of gift vouchers) will be reset. Not applicable to vouchers of type 'inherit'

expiresOn: date

Not applicable to vouchers of type 'inherit'

timeZone: string Europe/Amsterdam

Used by 'expiresOn' and 'resetFrequency'. Not applicable to vouchers of type 'inherit'

validationRules: object[]

It contains voucher validation rules. For instance: {field: 'location', value: '10'} would enable the voucher to be used in all gateways in location with id '10'. {field: 'locationExternalRef', value: 'xyz_123'} would enable the voucher to be used in all gateways with location external ref 'xyz_123'. [{field: 'product', value: '5'}, {field: 'product', value: '7'}] would allow the voucher to be used for buying products with PLU (or product ID on the client side) 5 or 7. These client-side validations rules are returned as response to '/voucher/{code}/validate'

object
field: enum location, locationExternalRef, machine, product
value: string
count: integer 1

Number of vouchers with the provided properties to be created. Voucher creation is an atomic operation. If the total amount of vouchers requested can't be created, no voucher will be created. If count > 1 the response body will be empty. Max value: 5000

text1: string

Text line 1 to be rendered in the pdf

text2: string

Text line 2 to be rendered in the pdf

text3: string

Text line 3 to be rendered in the pdf

text4: string

Text line 4 to be rendered in the pdf

style: string

Css style to be used when rendering the pdf. I.e.: {"voucherText1Lbl": {"fontSize": "28px"}, "voucherText2Lbl": {"fontSize": "24px"}, "voucherText3Lbl": {"fontSize": "18px"}}. Notice the html elements sensitive to be customized are: voucherText1Lbl, voucherText2Lbl, voucherText3Lbl

Request Example
{
  "campaign": "integer",
  "type": "enum",
  "value": "integer",
  "valueType": "enum",
  "code": "string",
  "prefix": "string",
  "redemptionLimit": "integer",
  "resetFrequency": "enum",
  "expiresOn": "date",
  "timeZone": "string",
  "validationRules": [
    {
      "field": "enum",
      "value": "string"
    }
  ],
  "count": "integer",
  "text1": "string",
  "text2": "string",
  "text3": "string",
  "text4": "string",
  "style": "string"
}
201 Created

Successful operation (only if the total amount of vouchers could be created)

400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (201 Created)
{
  "id": "string",
  "code": "string",
  "campaign": "integer",
  "type": "string",
  "value": "integer",
  "valueType": "string",
  "currency": "string",
  "initialValue": "integer",
  "redemptionLimit": "integer",
  "redemptionCount": "integer",
  "totalRedemptionCount": "integer",
  "lastRedemptionAt": "string (date-time-utc)",
  "lastRedemptionLocation": "string",
  "prefix": "string",
  "resetFrequency": "string",
  "lastResetAt": "string (date-time-utc)",
  "expiresOn": "string (date-time-utc)",
  "timeZone": "string",
  "lockOwner": "string",
  "lockedTill": "string (date-time-utc)",
  "status": "string",
  "amountRedeemed": "integer",
  "totalAmountRedeemed": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Find voucher

GET /voucher
limit: integer x ≤ 100
in query

Limit the number of logs returned

skip: integer 0
in query

Skips the first 'N' items of the results

where[<col>][<op>]: value: string
in query

Filter criteria. It supports multiple values: e.g. where[occurredAt][>]=2018-05-15T00:00:00&where[machine]=1094

sort: string asc
in query

The sort column e.g. sort[occurredAt]=desc

200 OK

Successful operation

type
401 Unauthorized

Unauthorized

Response Example (200 OK)
[
  {
    "id": "string",
    "code": "string",
    "campaign": "integer",
    "type": "string",
    "value": "integer",
    "valueType": "string",
    "currency": "string",
    "initialValue": "integer",
    "redemptionLimit": "integer",
    "redemptionCount": "integer",
    "totalRedemptionCount": "integer",
    "lastRedemptionAt": "string (date-time-utc)",
    "lastRedemptionLocation": "string",
    "prefix": "string",
    "resetFrequency": "string",
    "lastResetAt": "string (date-time-utc)",
    "expiresOn": "string (date-time-utc)",
    "timeZone": "string",
    "lockOwner": "string",
    "lockedTill": "string (date-time-utc)",
    "status": "string",
    "amountRedeemed": "integer",
    "totalAmountRedeemed": "integer",
    "createdAt": "string (date-time-utc)",
    "updatedAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Update the given voucher

PUT /voucher/{id}
campaign: integer

Id of the campaign where the voucher will be created.

type: enum discount, gift

Type of voucher.

value: integer

Value of the voucher in the units specified by 'valueType'.

valueType: enum cents cents

Value type description

redemptionLimit: integer

Number of times a voucher can be redeemed. Not applicable to vouchers of type 'inherit'

resetFrequency: enum day, week, month, never never

How frequent the voucher counters (and value in case of gift vouchers) will be reset.

expiresOn: date
timeZone: string Europe/Amsterdam

Used by 'expiresOn' and 'resetFrequency'.

validationRules: object[]

It contains voucher validation rules. For instance: {field: 'location', value: '10'} would enable the voucher to be used in all gateways in location with id '10'. {field: 'locationExternalRef', value: 'xyz_123'} would enable the voucher to be used in all gateways with location external ref 'xyz_123'. [{field: 'product', value: '5'}, {field: 'product', value: '7'}] would allow the voucher to be used for buying products with PLU (or product ID on the client side) 5 or 7. These client-side validations rules are returned as response to '/voucher/{code}/validate'

object
field: enum location, locationExternalRef, machine, product
value: string
text1: string

Text line 1 to be rendered in the pdf

text2: string

Text line 2 to be rendered in the pdf

text3: string

Text line 3 to be rendered in the pdf

text4: string

Text line 4 to be rendered in the pdf

voucherComments: string

Note about this voucher

style: string

Css style to be used when rendering the pdf. I.e.: {"voucherText1Lbl": {"fontSize": "28px"}, "voucherText2Lbl": {"fontSize": "24px"}, "voucherText3Lbl": {"fontSize": "18px"}}. Notice the html elements sensitive to be customized are: voucherText1Lbl, voucherText2Lbl, voucherText3Lbl

id: integer
in path

The id of the voucher

Request Example
{
  "campaign": "integer",
  "type": "enum",
  "value": "integer",
  "valueType": "enum",
  "redemptionLimit": "integer",
  "resetFrequency": "enum",
  "expiresOn": "date",
  "timeZone": "string",
  "validationRules": [
    {
      "field": "enum",
      "value": "string"
    }
  ],
  "text1": "string",
  "text2": "string",
  "text3": "string",
  "text4": "string",
  "voucherComments": "string",
  "style": "string"
}
201 Created

Successful operation

400 Bad Request

BadRequest

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (400 Bad Request)
{
  "message": "string"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get Voucher

GET /voucher/{id}
id: integer
in path

The id of the voucher

200 OK

successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (200 OK)
{
  "id": "string",
  "code": "string",
  "campaign": "integer",
  "type": "string",
  "value": "integer",
  "valueType": "string",
  "currency": "string",
  "initialValue": "integer",
  "redemptionLimit": "integer",
  "redemptionCount": "integer",
  "totalRedemptionCount": "integer",
  "lastRedemptionAt": "string (date-time-utc)",
  "lastRedemptionLocation": "string",
  "prefix": "string",
  "resetFrequency": "string",
  "lastResetAt": "string (date-time-utc)",
  "expiresOn": "string (date-time-utc)",
  "timeZone": "string",
  "lockOwner": "string",
  "lockedTill": "string (date-time-utc)",
  "status": "string",
  "amountRedeemed": "integer",
  "totalAmountRedeemed": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Deletes a voucher

DELETE /voucher/{id}
id: integer
in path

The id of the voucher

204 No Content

Successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (401 Unauthorized)
{
  "message": "string"
}

Get Voucher history (validate, redeem, delete)

GET /voucher/{id}/history
id: integer
in path

The id of the voucher

200 OK

successful operation

type
object[]
401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (200 OK)
[
  {
    "id": "integer",
    "voucher": "string",
    "requester": "string",
    "requesterLocation": "string",
    "action": "enum",
    "success": "boolean",
    "request": "string (json)",
    "response": "string (json)",
    "currency": "string",
    "createdAt": "string (date-time-utc)"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get voucher validation rules

GET /voucher/{id}/validation
id: integer
in path

The id of the voucher

200 OK

Successful operation

type
object[]
401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (200 OK)
[
  {
    "field": "string",
    "value": "string"
  }
]
Response Example (401 Unauthorized)
{
  "message": "string"
}

Get Voucher with logoImg populated as the proper img url

GET /voucher/{id}/image
id: integer
in path

The id of the voucher

200 OK

successful operation

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Example (200 OK)
{
  "id": "string",
  "code": "string",
  "campaign": "integer",
  "type": "string",
  "value": "integer",
  "valueType": "string",
  "currency": "string",
  "initialValue": "integer",
  "redemptionLimit": "integer",
  "redemptionCount": "integer",
  "totalRedemptionCount": "integer",
  "lastRedemptionAt": "string (date-time-utc)",
  "lastRedemptionLocation": "string",
  "prefix": "string",
  "resetFrequency": "string",
  "lastResetAt": "string (date-time-utc)",
  "expiresOn": "string (date-time-utc)",
  "timeZone": "string",
  "lockOwner": "string",
  "lockedTill": "string (date-time-utc)",
  "status": "string",
  "amountRedeemed": "integer",
  "totalAmountRedeemed": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}
Response Example (401 Unauthorized)
{
  "message": "string"
}

Voucher Export

Voucher CSV export

GET /voucher/format/csv

CSV export vouchers.

columns: array
in query

The columns to export. format: [{property: string, alias: 'name in csv'}]

where: object
in query

The criteria object

sort: object
in query

The sort column e.g. {name: 'ASC}

200 OK

successful operation

400 Bad Request

Missing parameter

401 Unauthorized

Unauthorized

Response Example (401 Unauthorized)
{
  "message": "string"
}

Schema Definitions

Count: object

count: integer
Example
{
  "count": "integer"
}

ApiError: object

message: string
Example
{
  "message": "string"
}

ReturnCreate: object

id: integer
Example
{
  "id": "integer"
}

AggregatedPaymentTransaction: object

payment: string
location: integer
shift: integer
amount: integer
currency: string
quantity: integer
paymentType: string
reportGroup: string
id: integer
createdAt: string
updatedAt: string
Example
{
  "payment": "string",
  "location": "integer",
  "shift": "integer",
  "amount": "integer",
  "currency": "string",
  "quantity": "integer",
  "paymentType": "string",
  "reportGroup": "string",
  "id": "integer",
  "createdAt": "string",
  "updatedAt": "string"
}

AggregatedRevenueTransaction: object

name: string
barcode: string
price: integer
productId: integer
location: integer
shift: integer
amount: integer
currency: string
quantity: integer
id: integer
createdAt: string
updatedAt: string
Example
{
  "name": "string",
  "barcode": "string",
  "price": "integer",
  "productId": "integer",
  "location": "integer",
  "shift": "integer",
  "amount": "integer",
  "currency": "string",
  "quantity": "integer",
  "id": "integer",
  "createdAt": "string",
  "updatedAt": "string"
}

AlertGroup: object

id: integer
name: string
userGroup: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

AlertObserver: object

id: integer
name: string
error: integer
observer: string
occurs: integer
timer: integer
timerType: integer
alertGroup: integer
sentAt: string (date-time)
type: string
paymentMethod: string
openingHours: integer
userGroup: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "error": "integer",
  "observer": "string",
  "occurs": "integer",
  "timer": "integer",
  "timerType": "integer",
  "alertGroup": "integer",
  "sentAt": "string (date-time)",
  "type": "string",
  "paymentMethod": "string",
  "openingHours": "integer",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

AlertRecipient: object

id: integer
name: string
email: string
alertGroup: integer
language: integer
active: integer
userGroup: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "email": "string",
  "alertGroup": "integer",
  "language": "integer",
  "active": "integer",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

Debtor: object

id: integer
externalId: integer
name: string
description: string
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "externalId": "integer",
  "name": "string",
  "description": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

Currency: object

id: integer
code: string
rate: number
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "code": "string",
  "rate": "number",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

ErrorCode: object

id: integer
code: string
errorIdentity: integer
errorProfile: integer
userGroup: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "code": "string",
  "errorIdentity": "integer",
  "errorProfile": "integer",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

ErrorIdentity: object

id: integer
error: string
machineType: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "error": "string",
  "machineType": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

ErrorProfile: object

id: integer
name: string
machineType: integer
manufacturer: integer
userGroup: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "machineType": "integer",
  "manufacturer": "integer",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

Image: object

id: integer
thumbnail: string
original: string
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "thumbnail": "string",
  "original": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

Integration: object

id: integer
type: string httptransactions, mplusinvoices
name: string
active: boolean

Whether the integration is enabled to run

state: string idle, syncing, pendingRetry, failed

The state of the integration

throttle: integer

The time (ms) between handling two records

maxRetries: integer

The maximum number of retries in case of an error

retryThrottle: integer

The minimum time between two retries (ms; exponential)

stopOnFailure: boolean

Whether handling of subsequent records should pause if one record failed

createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "type": "string",
  "name": "string",
  "active": "boolean",
  "state": "string",
  "throttle": "integer",
  "maxRetries": "integer",
  "retryThrottle": "integer",
  "stopOnFailure": "boolean",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

IntegrationError: object

id: integer
state: string failed, pendingRetry, resolved

The state of the integration error

machine: integer

The machine for which the error occurred

revenuetransaction: integer

The revenue transaction for which the error occurred

message: string

The error message

details: string

Any additional details, like possibly the message that was sent to the remote server

createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "state": "string",
  "machine": "integer",
  "revenuetransaction": "integer",
  "message": "string",
  "details": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

Language: object

id: integer
name: string
language: string
locale: string
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "language": "string",
  "locale": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

Location: object

id: integer
name: string
address: string
postcode: string
city: string
country: string
activeShift: integer
latitude: string
longitude: string
placeId: string
timeZone: string
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "address": "string",
  "postcode": "string",
  "city": "string",
  "country": "string",
  "activeShift": "integer",
  "latitude": "string",
  "longitude": "string",
  "placeId": "string",
  "timeZone": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

LocationGroup: object

id: integer
name: string
userGroup: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

Log: object

id: integer

Id of the log

remote: integer

Reserved. Internal use only

machine: integer

Id of the machine that generated the transaction

location: integer

Id of the machine location

code: string
errorIdentity: integer

Id of the event identity mapping this code

type: integer 1 = Occurrence, 2 = Resolution

Type of log

isResolvable: boolean

True if this event can be resolved. False otherwise

occurredAt: string (date-time-iso)

Local time of the transaction. It is based on the location of the machine at the moment of the transaction

timeZone: string

Time zone of the machine at the moment of the transaction. It's based on the machine location

duration: integer

In case of a resolution, it contains the time in seconds between the first occurrence after the previous resolution and this resolution

extraData: string

Option Json string containing extra data attached to the log

date: integer

Reserved. Internal use only

timestamp: integer

Reserved. Internal use only

resolvedAt: string

Deprecated

state: string

Deprecated

createdAt: string (date-time-utc)

Moment when this log was registered in Alchemy

Example
{
  "id": 5801104,
  "remote": 89773649,
  "machine": 80,
  "location": 2,
  "code": "CM_REBOOT",
  "errorIdentity": 3,
  "type": 1,
  "isResolvable": false,
  "occurredAt": "2019-03-12T05:36:58+01:00",
  "timeZone": "Europe/Amsterdam",
  "duration": null,
  "extraData": "{\"uptime\": 67}",
  "date": 1552365418,
  "timestamp": 1552365418,
  "resolvedAt": null,
  "state": null,
  "createdAt": "2019-03-12T04:36:59Z"
}

RawLog: object

remote: integer
timestamp: integer
date: integer
state: string
code: string
mode: string
extraData: string
timeflag: number
machine: integer
location: integer
occurredAt: string (date-time)
Example

Gateway: object

id: integer
hostname: string
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "hostname": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

GatewayVersion: object

name: string
description: string
Example
{
  "name": "string",
  "description": "string"
}

Machine: object

id: integer
name: string
hostname: string
gateway: integer
location: integer
machineModel: integer
machineType: integer
manufacturer: integer
lastRevenuetransaction: integer
lastLog: integer
lastIotevent: integer
tag: string
notes: string
virtualPrices: integer
active: integer
currency: integer
debtor: integer
logSynced: integer
revenuetransactionSynced: integer
ioteventSynced: integer
ruleSet: string
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "hostname": "string",
  "gateway": "integer",
  "location": "integer",
  "machineModel": "integer",
  "machineType": "integer",
  "manufacturer": "integer",
  "lastRevenuetransaction": "integer",
  "lastLog": "integer",
  "lastIotevent": "integer",
  "tag": "string",
  "notes": "string",
  "virtualPrices": "integer",
  "active": "integer",
  "currency": "integer",
  "debtor": "integer",
  "logSynced": "integer",
  "revenuetransactionSynced": "integer",
  "ioteventSynced": "integer",
  "ruleSet": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

MachineConfigTemplate: object

id: integer
name: string
apn: string
config: string
sharing: string
mode: string
encryption: string
encryptionKey: string
ssid: string
Example
{
  "id": "integer",
  "name": "string",
  "apn": "string",
  "config": "string",
  "sharing": "string",
  "mode": "string",
  "encryption": "string",
  "encryptionKey": "string",
  "ssid": "string"
}

MachineGroup: object

id: integer
name: string
userGroup: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

MachineModel: object

id: integer
name: string
manufacturer: integer
machineType: integer
errorProfile: integer
image: integer
userGroup: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "manufacturer": "integer",
  "machineType": "integer",
  "errorProfile": "integer",
  "image": "integer",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

MachineType: object

id: integer
name: string
image: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "image": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

Manufacturer: object

id: integer
name: string
userGroup: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

NavigationHistory: object

id: integer
title: string
rootFragment: string
urlFragment: string
queryString: string
createdAt: string (date-time-utc)
Example
{
  "id": "integer",
  "title": "string",
  "rootFragment": "string",
  "urlFragment": "string",
  "queryString": "string",
  "createdAt": "string (date-time-utc)"
}

OpeningHour: object

day: integer
startTime: string
endTime: string
Example
{
  "day": "integer",
  "startTime": "string",
  "endTime": "string"
}

Invoice: object

id: integer
remote: integer
price: integer
occurredAt: string (date-time-utc)
machine: integer
location: integer
timestamp: integer
currency: string
timezone: string
name: string
token: string
salestype: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "remote": "integer",
  "price": "integer",
  "occurredAt": "string (date-time-utc)",
  "machine": "integer",
  "location": "integer",
  "timestamp": "integer",
  "currency": "string",
  "timezone": "string",
  "name": "string",
  "token": "string",
  "salestype": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

PaymentTransaction: object

id: integer

Id of the payment transaction

revenuetransaction: integer

Id of the revenue transaction this payment belongs to

machine: integer

Id of the machine that generated the transaction

location: integer

Id of the machine location

occurredAt: string (date-time-iso)

Local time of the transaction. It is based on the location of the machine at the moment of the transaction

timeZone: string

Time zone of the machine at the moment of the transaction. It's based on the machine location

method: string

Payment method. It is used to determine the payment type

type: string cash, card, card1, card2, code, virtual, test

Payment type

price: integer

Amount of the payment

currency: integer

Currency of the payment

exclude: integer

Reserved. Internal use only

reportGroup: string

Reserved. Internal use only

createdAt: string (date-time-utc)

Moment when this transaction was registered in Alchemy

updatedAt: string (date-time-utc)

Moment when this transaction was updated in Alchemy (createdAt = updatedAt)

Example
{
  "id": 3287746,
  "revenuetransaction": 3184234,
  "machine": 80,
  "location": 2,
  "occurredAt": "2019-02-06T07:06:17+01:00",
  "timeZone": "Europe/Amsterdam",
  "method": "virtual",
  "type": "virtual",
  "price": 10,
  "currency": "EUR",
  "exclude": 0,
  "reportGroup": null,
  "createdAt": "2019-02-06T06:12:16Z",
  "updatedAt": "2019-02-06T06:12:16Z"
}

Permission: object

id: integer
action: string
model: string
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "action": "string",
  "model": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

Product: object

id: integer
plu: integer
name: string
price: string
barcode: string
machine: integer
reportName: string
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "plu": "integer",
  "name": "string",
  "price": "string",
  "barcode": "string",
  "machine": "integer",
  "reportName": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

ProductExtra: object

id: integer
plu: integer
name: string
price: string
barcode: string
machine: integer
reportName: string
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "plu": "integer",
  "name": "string",
  "price": "string",
  "barcode": "string",
  "machine": "integer",
  "reportName": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

ProductFlavour: object

id: integer
plu: integer
name: string
price: string
barcode: string
machine: integer
reportName: string
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "plu": "integer",
  "name": "string",
  "price": "string",
  "barcode": "string",
  "machine": "integer",
  "reportName": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

Recipient: object

id: integer
name: string
email: string
active: integer
language: integer
alertGroup: integer
userGroup: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "email": "string",
  "active": "integer",
  "language": "integer",
  "alertGroup": "integer",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

Report: object

id: integer

Id of the report

name: string

Name of the report

period1: integer

Id of the report period 1

period2: integer

Id of the report period 2

user: integer

Id of the user who created the report

createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "period1": "integer",
  "period2": "integer",
  "user": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

ReportRequest: object

machines: integer[]
integer
locations: integer[]
integer
machineGroups: integer[]
integer
locationGroups: integer[]
integer
period1: object
referenceDate: string (date-time-iso)

The date of the user with timezone offset

startDate: ReportRequestDate
endDate: ReportRequestDate
period2: object
referenceDate: string (date-time-iso)

The date of the user with timezone offset

startDate: ReportRequestDate
endDate: ReportRequestDate
Example
{
  "machines": [
    87,
    94,
    80
  ],
  "period1": {
    "referenceDate": "2019-03-11T11:40:43+01:00",
    "startDate": {
      "year": 0,
      "month": 1,
      "day": 1,
      "week": null,
      "hour": 0,
      "minute": 0,
      "second": 0
    },
    "endDate": {
      "year": 0,
      "month": 0,
      "day": 0,
      "week": null,
      "hour": 23,
      "minute": 59,
      "second": 59
    }
  }
}

ReportRequestDate: object

year: integer

If > 0, it overwrites the year of the referenceDate

month: integer

If > 0, it overwrites the month of the referenceDate. 'week' and 'month' are mutually exclusive

week: integer

If > 0, it overwrites the week of the year (weeks of the year start with 0). 'week' and 'month' are mutually exclusive

day: integer

If > 0, it adds the given number of days to the resulting reference date (year-month OR year-weekOfYear)

hour: integer

It overwrites the hour of the referenceDate

minute: integer

It overwrites the minute of the referenceDate

second: integer

It overwrites the second of the referenceDate

Example
{
  "year": 0,
  "month": 1,
  "day": 1,
  "week": null,
  "hour": 0,
  "minute": 0,
  "second": 0
}

LogsResolutionReport: object

period1: object
startDate: string (date-time)
endDate: string (date-time)
data: array
items: object
code: string

Log code

erroridentity: integer

Id of the event identity mapping this code

error: string

Event name

quantity: integer

Number of resolved logs with this code

duration: integer

Average resolution time (in seconds)

period2: object
startDate: string (date-time)
endDate: string (date-time)
data: object[]
object
code: string

Log code

erroridentity: integer

Id of the event identity mapping this code

error: string

Event name

quantity: integer

Number of resolved logs with this code

duration: integer

Average resolution time (in seconds)

Example
{
  "period1": {
    "data": [
      {
        "code": "ED017",
        "erroridentity": 34,
        "error": "ED017",
        "quantity": 518,
        "duration": 2987
      },
      {
        "code": "ED014",
        "erroridentity": 31,
        "error": "ED014",
        "quantity": 214,
        "duration": 6629
      }
    ],
    "endDate": "2019-03-11 23:59:59",
    "startDate": "2019-01-01 00:00:00"
  },
  "period2": {
    "data": [
      {
        "code": "ED017",
        "erroridentity": 34,
        "error": "ED017",
        "quantity": 23,
        "duration": 342
      },
      {
        "code": "ED014",
        "erroridentity": 31,
        "error": "ED014",
        "quantity": 57,
        "duration": 567
      }
    ],
    "endDate": "2018-03-11 23:59:59",
    "startDate": "2018-01-01 00:00:00"
  }
}

LogsFrequencyReport: object

period1: object
startDate: string
endDate: string
data: object[]
object
code: string

Log code

erroridentity: integer

Id of the event identity mapping this code

error: string

Event name

quantity: integer

Number of logs with this code

period2: object
startDate: string
endDate: string
data: object[]
object
code: string

Log code

erroridentity: integer

Id of the event identity mapping this code

error: string

Event name

quantity: integer

Number of logs with this code

Example
{
  "period1": {
    "data": [
      {
        "code": "CM_OFFLINE",
        "erroridentity": 1,
        "error": "CM_OFFLINE",
        "quantity": 220
      },
      {
        "code": "ED014",
        "erroridentity": 31,
        "error": "ED014",
        "quantity": 152
      }
    ],
    "endDate": "2019-03-11 23:59:59",
    "startDate": "2019-01-01 00:00:00"
  },
  "period2": {
    "data": [
      {
        "code": "CM_OFFLINE",
        "erroridentity": 1,
        "quantity": 357,
        "error": "CM_OFFLINE"
      },
      {
        "code": "ED014",
        "erroridentity": 31,
        "error": "ED014",
        "quantity": 45
      }
    ],
    "endDate": "2018-03-11 23:59:59",
    "startDate": "2018-01-01 00:00:00"
  }
}

RevenueTransactionsReport: object

period1: object
startDate: string
endDate: string
data: object[]
object
productId: integer

PLU of the product

name: string

Name of the product

internalRef: string

Internal reference of the product

revenue: integer

Total revenue of this product

quantity: integer

Number of transactions of this product

currency: string

Currency used in this transactions group

period2: object
startDate: string
endDate: string
data: object[]
object
productId: integer

PLU of the product

name: string

Name of the product

internalRef: string

Internal reference of the product

revenue: integer

Total revenue of this product

quantity: integer

Number of transactions of this product

currency: string

Currency used in this transactions group

Example
{
  "period1": {
    "data": [
      {
        "productId": 1,
        "name": "Kaffee klein",
        "internalRef": "KAF-KL",
        "revenue": 7080,
        "quantity": 906,
        "currency": "EUR"
      },
      {
        "productId": 2,
        "name": "Capuccino",
        "internalRef": "CAP",
        "revenue": 5500,
        "quantity": 700,
        "currency": "EUR"
      }
    ],
    "endDate": "2019-03-11 23:59:59",
    "startDate": "2019-01-01 00:00:00"
  },
  "period2": {
    "data": [
      {
        "productId": 1,
        "name": "Kaffee klein",
        "revenue": 7080,
        "quantity": 906,
        "currency": "EUR"
      },
      {
        "productId": 4,
        "name": "Capuccino klein",
        "revenue": 7000,
        "quantity": 750,
        "currency": "EUR"
      }
    ],
    "endDate": "2018-03-11 23:59:59",
    "startDate": "2018-01-01 00:00:00"
  }
}

PaymentTransactionsReport: object

period1: object
startDate: string
endDate: string
data: object[]
object
type: string

Type of payment transaction

quantity: integer

Number of payment transactions of this type

revenue: integer

Total revenue of payment transactions of this type

reportGroup: string

Report group of the transactions

currency: string

Currency used in this transactions group

period2: object
startDate: string
endDate: string
data: object[]
object
type: string

Type of payment transaction

quantity: integer

Number of payment transactions of this type

revenue: integer

Total revenue of payment transactions of this type

reportGroup: string

Report group of the transactions

currency: string

Currency used in this transactions group

Example
{
  "period1": {
    "data": [
      {
        "type": "card",
        "quantity": 49,
        "revenue": 81000,
        "reportGroup": null,
        "currency": "AMD"
      }
    ],
    "endDate": "2019-03-11 23:59:59",
    "startDate": "2019-01-01 00:00:00"
  }
}

RevenueTransaction: object

id: integer

Id of the transaction

product: integer

PLU of the product

name: string

Name of the product

internalRef: string

Internal reference of the product (if defined)

machine: integer

Id of the machine that generated the transaction

location: integer

Id of the machine location

occurredAt: string (date-time-iso)

Local time of the transaction. It is based on the location of the machine at the moment of the transaction

timeZone: string

Time zone of the machine at the moment of the transaction. It's based on the machine location

originalPrice: integer

Price of the product set in the machine

price: integer

Price of the product set in Alchemy

barcode: string

Barcode of the product

currency: string

Currency in which the product was payed

timestamp: integer

Timestamp in seconds of transaction

token: string

Token if this transaction (if any)

salestype: integer

If 1, it's a test transaction

numPaymentTransactions: integer

Amount of payments contained in this transaction

remote: integer

Reserved. Internal use only

pricelist: integer

Reserved. Internal use only

userGroup: integer

Reserved. Internal use only

createdAt: string (date-time-utc)

Moment when this transaction was registered in Alchemy

updatedAt: string (date-time-utc)

Moment when this transaction was updated in Alchemy (createdAt = updatedAt)

Example
{
  "id": 3184234,
  "product": 1,
  "name": "Kaffee klein",
  "internalRef": "KAF-KL",
  "machine": 80,
  "location": 2,
  "occurredAt": "2019-02-06T07:06:17+01:00",
  "timeZone": "Europe/Amsterdam",
  "originalPrice": 0,
  "price": 10,
  "barcode": null,
  "currency": "EUR",
  "timestamp": 1549433177,
  "token": "^^C:R/-0",
  "salestype": 0,
  "numPaymentTransactions": 1,
  "remote": 40314354,
  "pricelist": 0,
  "usergroup": 0,
  "createdAt": "2019-02-06T06:12:16Z",
  "updatedAt": "2019-02-06T06:12:16Z"
}

Shift: object

id: integer
location: integer
firstTransaction: integer
lastTransaction: integer
previousShift: integer
closed: string
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "location": "integer",
  "firstTransaction": "integer",
  "lastTransaction": "integer",
  "previousShift": "integer",
  "closed": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

Translation: object

id: integer
key: string
value: string
language: integer
userGroup: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "key": "string",
  "value": "string",
  "language": "integer",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

UnmappedErrorCode: object

id: integer
errorProfile: number
code: string
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "errorProfile": "number",
  "code": "string",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

User: object

id: integer
username: string
email: string
language: integer
userGroup: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "username": "string",
  "email": "string",
  "language": "integer",
  "userGroup": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

UserGroup: object

id: integer
name: string
parent: integer
admin: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "parent": "integer",
  "admin": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

Dashboard: object

id: integer
user: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "user": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

Widget: object

id: integer
name: string
widgetType: integer
dashboard: integer
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "widgetType": "integer",
  "dashboard": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

WidgetType: object

id: integer
name: string
configurable: boolean
defaultApp: boolean
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "configurable": "boolean",
  "defaultApp": "boolean",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

UserReport: object

id: integer
user: integer
name: string
createAt: string (date-time-utc)
updateAt: string (date-time-utc)
Example
{
  "id": "integer",
  "user": "integer",
  "name": "string",
  "createAt": "string (date-time-utc)",
  "updateAt": "string (date-time-utc)"
}

Chart: object

id: integer
name: string
type: string
criteria: ChartCriteria
report: integer
reportType: string
createAt: string (date-time-utc)
updateAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "type": "string",
  "criteria": {
    "select": [
      {
        "expr": "string",
        "op": "string",
        "as": "string"
      }
    ],
    "from": "string",
    "where": [
      {
        "field": "string",
        "op": "string",
        "value": "string"
      }
    ],
    "orderBy": [
      "string"
    ],
    "timeFrames": {
      "items": {
        "type": "string",
        "viewType": "string",
        "startAt": "date-time",
        "endAt": "date-time",
        "hoursToSub": "integer",
        "column": "string",
        "description": "string"
      }
    }
  },
  "report": "integer",
  "reportType": "string",
  "createAt": "string (date-time-utc)",
  "updateAt": "string (date-time-utc)"
}

ChartCriteria: object

select: object[]
object
expr: string
op: string
as: string
from: string
where: object[]
object
field: string
op: string
value: string
orderBy: string[]
string
timeFrames: array
Example
{
  "select": [
    {
      "expr": "string",
      "op": "string",
      "as": "string"
    }
  ],
  "from": "string",
  "where": [
    {
      "field": "string",
      "op": "string",
      "value": "string"
    }
  ],
  "orderBy": [
    "string"
  ],
  "timeFrames": {
    "items": {
      "type": "string",
      "viewType": "string",
      "startAt": "date-time",
      "endAt": "date-time",
      "hoursToSub": "integer",
      "column": "string",
      "description": "string"
    }
  }
}

ChartTemplate: object

id: integer
name: string
type: string
criteria: ChartCriteria
createAt: string (date-time-utc)
updateAt: string (date-time-utc)
Example
{
  "id": "integer",
  "name": "string",
  "type": "string",
  "criteria": {
    "select": [
      {
        "expr": "string",
        "op": "string",
        "as": "string"
      }
    ],
    "from": "string",
    "where": [
      {
        "field": "string",
        "op": "string",
        "value": "string"
      }
    ],
    "orderBy": [
      "string"
    ],
    "timeFrames": {
      "items": {
        "type": "string",
        "viewType": "string",
        "startAt": "date-time",
        "endAt": "date-time",
        "hoursToSub": "integer",
        "column": "string",
        "description": "string"
      }
    }
  },
  "createAt": "string (date-time-utc)",
  "updateAt": "string (date-time-utc)"
}

Campaign: object

name: string
totalVouchers: integer
type: enum
valueType: enum cents cents
voucherValue: integer
redemptionLimit: integer
resetFrequency: enum day, week, month, never
expiresOn: date
currency: string EUR
timeZone: string Europe/Amsterdam
status: enum creating, active, inactive, expired, deleting
createdAt: string (date-time-utc)
updatedAt: string (date-time-utc)
Example
{
  "name": "string",
  "totalVouchers": "integer",
  "type": "enum",
  "valueType": "enum",
  "voucherValue": "integer",
  "redemptionLimit": "integer",
  "resetFrequency": "enum",
  "expiresOn": "date",
  "currency": "string",
  "timeZone": "string",
  "status": "enum",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

Voucher: object

id: string

Id of the voucher. It's unique in the system.

code: string

Code of the voucher. This field is the one that will be represented as QR code in a voucher. Codes are unique per campaign, but they can't identify a Voucher.

campaign: integer

Id of the campaign the voucher belongs to

type: string discount, gift, inherit

Type of voucher. Discount vouchers have a fixed value, and each redemption gives the same discount. Gift vouchers instead act as a wallet, where each redemption will subtract a determined amount from the voucher value.

value: integer

Value of the voucher in the unit specified by 'valueType'

valueType: string cents

Unit of the voucher value

currency: string

Internal property. It's set when the voucher is redeemed for the first time. The currency assigned is the one of the gateway where voucher's been redeemed. If the voucher already has a currency set and a new redemption has been exected from a machine with a different currency, the voucher currency becomes '*' and can't be reverted.

initialValue: integer

Internal property. Initial value of the voucher. Set automatically when creating a gift voucher via POST /voucher. Used to reset the value of the voucher when it's reset (see resetFrequency).

redemptionLimit: integer

Max. times the voucher can be redeemed.

redemptionCount: integer

Internal property. Number of times the voucher has been redeemed since its creation or last reset.

totalRedemptionCount: integer

Internal property. Total number of times the voucher has been redeemed.

lastRedemptionAt: string (date-time-utc)

Internal property. Timestamp of the voucher last redemption.

lastRedemptionLocation: string

Internal property. Location where the voucher was redeemed the last time.

prefix: string

Prefix used to generate the voucher code

resetFrequency: string day, week, month, never

When the voucher counters are reset. If 'daily', counters are reset when a new day starts (hour 00:00). If 'week', counters are reset when a new week starts (Monday 00:00). If 'month', counters are reset when a new month starts (1st 00:00). The voucher counters reset are: redemptionCount, amountRedeemed, value (if a gift voucher)

lastResetAt: string (date-time-utc)

Internal property. Timestamp of the voucher last reset.

expiresOn: string (date-time-utc)

Expiration date of the voucher with a precision of days.

timeZone: string

Timezone used when resetting voucher counters and maintain their status (check 'resetFrequency' and 'status')

lockOwner: string

Internal property.

lockedTill: string (date-time-utc)

Internal property.

status: string active, inactive, expired, deleted

Current status of the voucher.

amountRedeemed: integer

Internal property. Total amount redeemed since the voucher creation or last reset.

totalAmountRedeemed: integer

Internal property. Total amount redeemed since the voucher creation.

createdAt: string (date-time-utc)

Internal property.

updatedAt: string (date-time-utc)

Internal property.

Example
{
  "id": "string",
  "code": "string",
  "campaign": "integer",
  "type": "string",
  "value": "integer",
  "valueType": "string",
  "currency": "string",
  "initialValue": "integer",
  "redemptionLimit": "integer",
  "redemptionCount": "integer",
  "totalRedemptionCount": "integer",
  "lastRedemptionAt": "string (date-time-utc)",
  "lastRedemptionLocation": "string",
  "prefix": "string",
  "resetFrequency": "string",
  "lastResetAt": "string (date-time-utc)",
  "expiresOn": "string (date-time-utc)",
  "timeZone": "string",
  "lockOwner": "string",
  "lockedTill": "string (date-time-utc)",
  "status": "string",
  "amountRedeemed": "integer",
  "totalAmountRedeemed": "integer",
  "createdAt": "string (date-time-utc)",
  "updatedAt": "string (date-time-utc)"
}

VoucherValidateResponse: object

code: string

Code of the voucher. Codes are unique per campaign, but they can't identify a Voucher.

campaignType: string

Type of campaign of this voucher (for hybrid campaigns, it will show the voucher type instead)

voucherId: string

Id of the voucher linked to the provided code. Returned only if the Code is valid

valid: boolean

If true, the voucher is valid. Otherwise the voucher is not valid.

reason: string

Set only when valid=false. It explains the reason why the voucher is not valid.

discount: object
type: string cents
validFor: object

It contains extra voucher validations to be checked at the client side. At the moment the entity those validations can apply to is 'product'. Besides the validation made by the client, the server will also check that the voucher is valid for the items in the redemption order. For example, if a voucher is valid for product with id '5' only (Id of the product on machine/device), at the time of redemption the 'order.items' must contain the product with id '5' only.

products: object

Hashmap containing <Product PLU/Client Product ID>: as : indicating weather a product is valid or not for this voucher. If the object is not provided, this voucher should be accepted by the client to buy any product. I.e.: { '5': true, '7': true } would indicate the voucher is valid to be redeemed for products 5 AND 7 only.

productsRegExp: string

Regular expression representation of the 'products'. I.e.: { '5': true, '7': true } => '5|7'. If 'products' is not provided, its value is: '.*'

Example
{
  "code": "string",
  "campaignType": "string",
  "voucherId": "string",
  "valid": "boolean",
  "reason": "string",
  "discount": {
    "type": "string"
  },
  "validFor": {
    "products": "object",
    "productsRegExp": "string"
  }
}

VoucherRedeemResponse: object

code: string

Code of the voucher. Codes are unique per campaign, but they can't identify a Voucher.

campaignType: string

Type of campaign of this voucher (for hybrid campaigns, it will show the voucher type instead)

voucherId: string

Id of the voucher linked to the provided code. Returned only if the Code's been redeemed

redeemed: boolean

If true, the voucher has been redeemed. Otherwise the voucher could not be redeemed.

reason: string

Set only when redeemed=false. It explains the reason why the voucher could not be redeemed.

discount: object
type: string cents
amountOff: integer
Example
{
  "code": "string",
  "campaignType": "string",
  "voucherId": "string",
  "redeemed": "boolean",
  "reason": "string",
  "discount": {
    "type": "string",
    "amountOff": "integer"
  }
}

MachineState: object

machineId: integer
state: object
Example
{
  "machineId": "integer",
  "state": "object"
}

ChartViews: string

string table, bars, lines, pie

DefaultChartTypes: string

string revenue_full, revenue_grouped, payment_types, offline_machines, machine_cleaning, machine_alarms, machine_issues