GET /v1/ecommerce/stock-movements
List stock movements — sales, cancellations, adjustments, purchases, imports, syncs, and transfers — filtered by date, type, and branch.
GET
Listar movimientos de stock
Returns the paginated history of stock movements. Every change to stock leaves one: a sale, a cancelled sale, a manual adjustment, a transfer between branches, an import, or a sync from a connected store.
Each item is one movement.
Endpoint
Required scope
ecommerce:stock:read
Headers
Query parameters
Movement types
Example request
Response
200 OK
type is one of the values above, quantity is how much moved, and stock_after is the master stock left after it.
400 Bad Request
A date not inYYYY-MM-DD, an unknown value in types, limit outside 1–200, or a negative offset.
DATE_RANGE_INCOMPLETE — only one of from and to was sent. They go together.
401 Unauthorized
Missing, invalid, revoked, or expired token.403 Forbidden
The token does not have theecommerce:stock:read scope.
502 Bad Gateway
ECOMMERCE_UPSTREAM_ERROR — the ecommerce service could not answer.
Operational notes
- This is the audit trail of stock. To explain why a number changed, read the movements of that product instead of comparing two snapshots.
- A transfer does not change the total. It moves stock between the warehouse and branches; the master stock of the product stays the same.
Authorizations
Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.
Query Parameters
Desde (YYYY-MM-DD, inclusive, hora de Santiago). Va junto con to
Example:
"2026-11-01"
Hasta (YYYY-MM-DD, inclusive, hora de Santiago). Va junto con from
Example:
"2026-11-30"
Tipos separados por coma: sale, sale_cancel, adjustment, set, purchase, import, sync, transfer
Example:
"sale,adjustment"
Solo movimientos de esta sucursal
Busca por nombre o SKU del producto
Required range:
1 <= x <= 200Required range:
x >= 0Listar movimientos de stock