API: changes
Changes to /api/v1, newest first. General conventions in How the API works.
November 2026: embedded references and minorUnitDecimals
Breaking change
Responses no longer carry bare ids to refer to other entities: each reference is an object with a
fixed shape (see standard shapes). An integration that reads
productId, deviceId, operationId, categoryId, profileId, allowedDeviceIds and the other
fields in the table must be updated: those fields no longer come in responses.
Nothing you send changes. Filters, write bodies and the :id in the URL stay flat, with
<entity>Id, and accept the id or the natural key.
Rules of the change:
- Same entity, same shape in every endpoint. With no value, the whole object is
null. - A list of references is an array of objects:
allowedDeviceIdsbecomesallowedDevices. - In deliveries, returns, recharges and selection movements the object carries the name at the time of the event; in catalogs, the current name (also if the entity was deleted).
minorUnitDecimalscomes withcurrencywherever there are amounts. Value =amount/ 10^minorUnitDecimals.
Before → after by endpoint
POST and PATCH responses have the same shape as reading the same resource.
| Endpoint | Before | After |
|---|---|---|
GET /account | no currency decimals | adds minorUnitDecimals |
GET /devices, GET /devices/:id | operationId | operation |
GET /devices/:id/planogram | deviceId, slots[].productId, slots[].sku | device, slots[].product |
GET /devices/:id/movements | productId, stockOrderId, deliveryId, returnId | product, stockOrder, delivery, return |
GET /stock-orders, GET /stock-orders/:id and writes | deviceId, operationId, lines[].productId | device, operation, lines[].product |
GET /products, GET /products/:id and writes | categoryId | category; adds minorUnitDecimals |
GET /products/:id/serial-numbers | productId, deviceId | product, device |
GET /profiles, GET /profiles/:id and writes | allowedDeviceIds, lines[].productId | allowedDevices, lines[].product; adds minorUnitDecimals |
GET /tickets, GET /tickets/:id and writes | allowedDeviceIds, items[].productId | allowedDevices, items[].product |
GET /users, GET /users/:id and writes | codes[].profileId | codes[].profile; adds codes[].minorUnitDecimals |
GET /deliveries | operationId, deviceId, productId, productSku, codeId, codeType, userIdentification, ticketId | operation, device, product, user, ticket; adds minorUnitDecimals |
GET /returns | deliveryId, ticketId, operationId, deviceId, productId, productSku, codeId, userIdentification | delivery, ticket, operation, device, product, user |
GET /recharges | operationId, deviceId, codeId, userIdentification | operation, device, user; adds minorUnitDecimals |
GET /balances | userId, codeId, codeType, userIdentification, isActive, isUserActive | user, code, profile; adds minorUnitDecimals |
GET /operations and GET /product-categories do not change.
How to migrate
| If you read | Now read |
|---|---|
a delivery's productSku | product.sku |
a delivery's codeId and codeType | user.code.codeId and user.code.codeType |
userIdentification | user.identification |
a balance's isActive | code.isActive (the code) |
a balance's isUserActive | user.isActive |
allowedDeviceIds | allowedDevices.map(d => d.id) |
a bare xId | x.id |
Example, a delivery:
{
"id": "00000000-0000-7000-8000-a100000001d8",
"operation": { "id": "00000000-0000-7000-8000-0000000000a2", "name": "TEST INGENIERÍA" },
"device": { "id": "00000000-0000-7000-8000-0000000000d2", "serial": "UN20W103447", "name": "Vending Corferias 2" },
"product": { "id": "00000000-0000-7000-8000-0000000000b4", "sku": "AGUA-600", "name": "Agua 600 ml" },
"user": {
"name": "Juan Pérez",
"identification": "1010150461",
"code": { "codeId": "1010150461", "codeType": "NFC" },
"tags": [{ "key": "departamento", "value": "Marketing" }]
},
"ticket": null,
"currency": "COP",
"minorUnitDecimals": 2,
"amount": 250000
}