Skip to main content
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.

Endpoint

Required scope

ecommerce:stock:read

Headers

Query parameters

Movement types

Example request

Response

200 OK

Each item is one movement. 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 in YYYY-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 the ecommerce: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

Authorization
string
header
required

Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.

Query Parameters

from
string

Desde (YYYY-MM-DD, inclusive, hora de Santiago). Va junto con to

Example:

"2026-11-01"

to
string

Hasta (YYYY-MM-DD, inclusive, hora de Santiago). Va junto con from

Example:

"2026-11-30"

types
string

Tipos separados por coma: sale, sale_cancel, adjustment, set, purchase, import, sync, transfer

Example:

"sale,adjustment"

branch_id
string

Solo movimientos de esta sucursal

Busca por nombre o SKU del producto

limit
number
default:50
Required range: 1 <= x <= 200
offset
number
default:0
Required range: x >= 0

Response

200 - application/json
items
object[]
required
total
number
required
limit
number
required
offset
number
required