SmVend API Spec (1.0.0)

Download OpenAPI specification:Download

This is the first version of the SmVend service API. The documentation will be continuously updated and improved, but we will maintain backward compatibility with all previously published API versions. If you have discovered any errors or inaccuracies in the documentation, please email us at [email protected].

Authentication

In the current version of the API, authentication is implemented using the x-organization-key parameter in the request headers. You can obtain this key from the Settings -> Integration -> API section of your SmVend account's. x-organization-key is the publicKey property from the pair of generated keys.

In the future, we will add request signing for additional security in API interactions.
If you want to get data for a specific user, pass the user ID in the x-user-id header.

apiAuth

Security Scheme Type: API Key
Header parameter name: x-organization-key

Controller

Get controller matrix

Authorizations:
apiAuth
Request Body schema: application/json
required
controllerId
required
string

Controller ID in UUID v4 format

Responses

Request samples

Content type
application/json
{
  • "controllerId": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "result": {
    }
}

Update controller matrix

Authorizations:
apiAuth
Request Body schema: application/json
required
id
required
string

Controller matrix ID in UUID v4 format (!= controller id)

columnsNumber
required
number

Number of columns in matrix

rowsNumber
required
number

Number of rows in matrix

required
Array of objects

Products in matrix

required
Array of objects

An array of the maximum number of ingredients from the products of the matrix

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "columnsNumber": 0,
  • "rowsNumber": 0,
  • "products": [
    ],
  • "resources": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "result": {
    }
}

Send deposit to controller

Authorizations:
apiAuth
Request Body schema: application/json
required
controllerId
required
string

Controller ID in UUID v4 format

deposit
required
number

Deposit in cents

Responses

Request samples

Content type
application/json
{
  • "controllerId": "string",
  • "deposit": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "result": {
    }
}

Issue product

Authorizations:
apiAuth
Request Body schema: application/json
required
controllerId
required
string
position
required
number

Responses

Request samples

Content type
application/json
{
  • "controllerId": "string",
  • "position": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "result": {
    }
}

Send remote payment to controller

Authorizations:
apiAuth
Request Body schema: application/json
required
controllerId
required
string

Controller ID in UUID v4 format

amount
required
number

Payment value in cents

Responses

Request samples

Content type
application/json
{
  • "controllerId": "string",
  • "amount": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "result": {
    }
}

Get controller config

Authorizations:
apiAuth
Request Body schema: application/json
required
controllerId
required
string

Controller ID in UUID v4 format

Responses

Request samples

Content type
application/json
{
  • "controllerId": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "result": {
    }
}

Update controller config

It is recommended to send only the modified values in the config property.

Authorizations:
apiAuth
Request Body schema: application/json
required
Any of
type
required
string
Value: "coffee"
controllerConfigId
required
string

Config ID in UUID v4 format (!= controller id)

required
object

Coffee command config

Responses

Request samples

Content type
application/json
{
  • "type": "impulse",
  • "controllerConfigId": "string",
  • "config": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "result": {
    }
}

Get controller connection status

Authorizations:
apiAuth
Request Body schema: application/json
required
controllerId
required
string

Controller ID in UUID v4 format

Responses

Request samples

Content type
application/json
{
  • "controllerId": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "result": {
    }
}

Reports

Get list of controllers

Authorizations:
apiAuth
Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "id": "string",
  • "result": {
    }
}

Get list of sales

Authorizations:
apiAuth
Request Body schema: application/json
required
required
object

Pagination object

required
object

The time range for which the data needs to be retrieved

required
object

Controller filters

object

Sort object

Responses

Request samples

Content type
application/json
{
  • "pagination": {
    },
  • "dateRange": {
    },
  • "filters": {
    },
  • "sort": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "result": {
    }
}

Get list of events

Authorizations:
apiAuth
Request Body schema: application/json
required
required
object

Pagination object

required
object
"relevant" (string) or "irrelevant" (string)

Event status (relevant or irrelevant)

"info" (string) or "warning" (string) or "danger" (string)

Event level (info, warning, danger)

"user" (string) or "controller" (string)

Event source type (user or controller)

required
object

The time range for which the data needs to be retrieved

Responses

Request samples

Content type
application/json
{
  • "pagination": {
    },
  • "filters": {
    },
  • "status": "relevant",
  • "level": "info",
  • "source": "user",
  • "dateRange": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "result": {
    }
}

Get dictionary of events

Authorizations:
apiAuth
Request Body schema: application/json
required
required
"en" (string) or "es" (string) or "de" (string) or "fr" (string) or "ru" (string)

Responses

Request samples

Content type
application/json
{
  • "language": "en"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "result": {
    }
}

Encashment

Get encashments list

Authorizations:
apiAuth
Request Body schema: application/json
required
required
object

Pagination object

required
object

The time range for which the data needs to be retrieved

required
object
object

Sort object

Responses

Request samples

Content type
application/json
{
  • "pagination": {
    },
  • "dateRange": {
    },
  • "filters": {
    },
  • "sort": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "result": {
    }
}

Create encashment

Authorizations:
apiAuth
Request Body schema: application/json
required
controllerId
required
string

Controller ID in UUID v4 format

Responses

Request samples

Content type
application/json
{
  • "controllerId": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "result": {
    }
}