Skip to main content

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: allowedDeviceIds becomes allowedDevices.
  • 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).
  • minorUnitDecimals comes with currency wherever there are amounts. Value = amount / 10^minorUnitDecimals.

Before → after by endpoint​

POST and PATCH responses have the same shape as reading the same resource.

EndpointBeforeAfter
GET /accountno currency decimalsadds minorUnitDecimals
GET /devices, GET /devices/:idoperationIdoperation
GET /devices/:id/planogramdeviceId, slots[].productId, slots[].skudevice, slots[].product
GET /devices/:id/movementsproductId, stockOrderId, deliveryId, returnIdproduct, stockOrder, delivery, return
GET /stock-orders, GET /stock-orders/:id and writesdeviceId, operationId, lines[].productIddevice, operation, lines[].product
GET /products, GET /products/:id and writescategoryIdcategory; adds minorUnitDecimals
GET /products/:id/serial-numbersproductId, deviceIdproduct, device
GET /profiles, GET /profiles/:id and writesallowedDeviceIds, lines[].productIdallowedDevices, lines[].product; adds minorUnitDecimals
GET /tickets, GET /tickets/:id and writesallowedDeviceIds, items[].productIdallowedDevices, items[].product
GET /users, GET /users/:id and writescodes[].profileIdcodes[].profile; adds codes[].minorUnitDecimals
GET /deliveriesoperationId, deviceId, productId, productSku, codeId, codeType, userIdentification, ticketIdoperation, device, product, user, ticket; adds minorUnitDecimals
GET /returnsdeliveryId, ticketId, operationId, deviceId, productId, productSku, codeId, userIdentificationdelivery, ticket, operation, device, product, user
GET /rechargesoperationId, deviceId, codeId, userIdentificationoperation, device, user; adds minorUnitDecimals
GET /balancesuserId, codeId, codeType, userIdentification, isActive, isUserActiveuser, code, profile; adds minorUnitDecimals

GET /operations and GET /product-categories do not change.

How to migrate​

If you readNow read
a delivery's productSkuproduct.sku
a delivery's codeId and codeTypeuser.code.codeId and user.code.codeType
userIdentificationuser.identification
a balance's isActivecode.isActive (the code)
a balance's isUserActiveuser.isActive
allowedDeviceIdsallowedDevices.map(d => d.id)
a bare xIdx.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
}