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].
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.
controllerId required | string Controller ID in UUID v4 format |
{- "controllerId": "string"
}
{- "id": "string",
- "result": {
- "$case": "success",
- "success": {
- "id": "string",
- "columnsNumber": 0,
- "rowsNumber": 0,
- "products": [
- {
- "columnNumber": 0,
- "rowNumber": 0,
- "productId": "string",
- "price": 0
}
], - "resources": [
- {
- "resourceId": "string",
- "maxRefillQuantity": 0
}
]
}
}
}
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 |
{- "id": "string",
- "columnsNumber": 0,
- "rowsNumber": 0,
- "products": [
- {
- "columnNumber": 0,
- "rowNumber": 0,
- "productId": "string",
- "price": 0
}
], - "resources": [
- {
- "resourceId": "string",
- "maxRefillQuantity": 0
}
]
}
{- "id": "string",
- "result": {
- "$case": "success",
- "success": {
- "success": true
}
}
}
controllerId required | string Controller ID in UUID v4 format |
{- "controllerId": "string"
}
{- "id": "string",
- "result": {
- "$case": "success",
- "success": {
- "type": "coffee",
- "controllerConfigId": "string",
- "config": {
- "re": true,
- "in": true,
- "hl": true,
- "bp": true,
- "qr": true,
- "2f": true,
- "vg": true,
- "vl": true,
- "th": 0,
- "sm": 0,
- "bm": 0,
- "em": 0,
- "cd": 0,
- "cf": 1,
- "qt": 0,
- "da": true,
- "2a": 0,
- "2r": "string",
- "2e": 0,
- "2l": "string",
- "2p": "string",
- "2t": 0,
- "vt": 0,
- "vr": 0,
- "tt": 0,
- "td": "stri",
- "ti": 0,
- "tg": 0,
- "ft": 0,
- "fc": 0,
- "wf": "string",
- "wn": "string",
- "wp": "string",
- "wt": "string",
- "an": "string",
- "al": "string",
- "ap": "string",
- "sa": "string",
- "sp": "string"
}, - "pendingChangeConfigCommand": {
- "controllerType": "impulse",
- "delta": {
- "tm": true,
- "hm": true,
- "dl": true,
- "dc": true,
- "re": true,
- "in": true,
- "hl": true,
- "ib": true,
- "ip": true,
- "ss": true,
- "ai": true,
- "dr": true,
- "2b": true,
- "cp": true,
- "bb": true,
- "vg": true,
- "vl": true,
- "qr": true,
- "n1": 0,
- "n2": 0,
- "t1": 0,
- "t0": 0,
- "qt": 0,
- "2e": 0,
- "ps": 0,
- "p1": 0,
- "p2": 0,
- "p3": 0,
- "bt": 0,
- "b1": 0,
- "b2": 0,
- "b3": 0,
- "2l": "string",
- "2p": "string",
- "wn": "string",
- "wp": "string",
- "an": "string",
- "al": "string",
- "ap": "string"
}
}
}
}
}
It is recommended to send only the modified values in the config
property.
type required | string Value: "coffee" |
controllerConfigId required | string Config ID in UUID v4 format (!= controller id) |
required | object Coffee command config |
{- "type": "impulse",
- "controllerConfigId": "string",
- "config": {
- "tm": true,
- "hm": true,
- "dl": true,
- "dc": true,
- "re": true,
- "in": true,
- "hl": true,
- "ib": true,
- "ip": true,
- "ss": true,
- "ai": true,
- "dr": true,
- "2b": true,
- "cp": true,
- "bb": true,
- "vg": true,
- "vl": true,
- "qr": true,
- "n1": 0,
- "n2": 0,
- "t1": 0,
- "t0": 0,
- "qt": 0,
- "2e": 0,
- "ps": 0,
- "p1": 0,
- "p2": 0,
- "p3": 0,
- "bt": 0,
- "b1": 0,
- "b2": 0,
- "b3": 0,
- "2l": "string",
- "2p": "string",
- "wn": "string",
- "wp": "string",
- "an": "string",
- "al": "string",
- "ap": "string"
}
}
{- "id": "string",
- "result": {
- "$case": "success",
- "success": { }
}
}
controllerId required | string Controller ID in UUID v4 format |
{- "controllerId": "string"
}
{- "id": "string",
- "result": {
- "$case": "success",
- "success": {
- "connectionStatus": "online",
- "lastActive": { }
}
}
}
required | object Pagination object |
required | object The time range for which the data needs to be retrieved |
required | object Controller filters |
object Sort object |
{- "pagination": {
- "currentPage": 0,
- "perPage": 0
}, - "dateRange": {
- "from": 0,
- "to": 0
}, - "filters": {
- "paymentTypes": [
- "cash"
], - "controllerIds": [
- "string"
], - "controllerConnectionStatus": "online",
- "groupIds": [
- "string"
], - "searchString": "string"
}, - "sort": {
- "field": "controllerSerialNumber",
- "direction": -1
}
}
{- "id": "string",
- "result": {
- "$case": "success",
- "success": {
- "items": [
- {
- "controllerId": "string",
- "controllerHumanName": "string",
- "controllerSerialNumber": "string",
- "controllerType": "coffee",
- "controllerLocation": "string",
- "controllerConnectionStatus": "online",
- "insertedMoney": "string",
- "bill": "string",
- "coin": "string",
- "digital": "string",
- "remotePayment": "string",
- "remoteDeposit": "string",
- "cashboxId": "string",
- "controllerTimezone": "string",
- "saleId": "string",
- "controllerCreatedAt": 0,
- "createdAt": 0,
- "paymentTypes": [
- "cash"
], - "quantity": 0,
- "totalPrice": "string",
- "income": "string",
- "change": "string",
- "products": [
- {
- "id": "string",
- "name": "string",
- "quantity": 0
}
], - "fiscalizationStatus": "pending",
- "fiscalizationFailedReason": "string",
- "fiscalizationSuccess": { }
}
], - "total": 0
}
}
}
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 |
{- "pagination": {
- "currentPage": 0,
- "perPage": 0
}, - "filters": {
- "controllerIds": [
- "string"
], - "controllerConnectionStatus": "online",
- "groupIds": [
- "string"
], - "searchString": "string"
}, - "status": "relevant",
- "level": "info",
- "source": "user",
- "dateRange": {
- "from": 0,
- "to": 0
}
}
{- "id": "string",
- "result": {
- "$case": "success",
- "success": {
- "pagination": {
- "currentPage": 0,
- "perPage": 0
}, - "filters": {
- "controllerIds": [
- "string"
], - "controllerConnectionStatus": "online",
- "groupIds": [
- "string"
], - "searchString": "string"
}, - "status": "relevant",
- "level": "info",
- "source": "user",
- "dateRange": {
- "from": 0,
- "to": 0
}
}
}
}
required | "en" (string) or "es" (string) or "de" (string) or "fr" (string) or "ru" (string) |
{- "language": "en"
}
{- "id": "string",
- "result": {
- "$case": "success",
- "success": {
- "dictionary": { }
}
}
}
controllerId required | string Controller ID in UUID v4 format |
{- "controllerId": "string"
}
{- "id": "string",
- "result": {
- "$case": "success",
- "success": { }
}
}