Factuarea APIDevelopers

List stock movements of a product

Read the append-only stock ledger of a product, from the most recently applied movement to the oldest, so an integration can audit where a balance came from and reconcile inventory against its own system.

  • Each row carries the signed delta and the stock_after balance in BASE units as decimal strings, the reason, the source document, the acting user and the managing variant.
  • stock_after is the balance at the instant the movement was applied and is derived from the COMPLETE ledger, so it does not change when direction hides the interleaved rows.
  • Paginated by cursor (limit + starting_after); optional direction=in|out narrows it to stock in or stock out.
GET
/products/{product}/stock-movements
AuthorizationBearer <token>

In: header

Path Parameters

product*string

Query Parameters

limit?integer

Máximo de movimientos por página (1-100, por defecto 25).

Range1 <= value <= 100
starting_after?|

Id del último movimiento ya recibido; la página empieza justo después.

Formatuuid
direction?|

in = entradas (delta positivo), out = salidas (delta negativo). Ausente = el ledger completo.

Value in"in" | "out" | null

Headers

Factuarea-Version?string

Pin the API version (YYYY-MM-DD, Stripe-style date versioning) for this request; omit to use the key's pinned version, or the latest if none. Unsupported version → 400 unsupported_api_version; malformed → 400 parameter_invalid_format. The effective version is echoed in the Factuarea-Version response header. See the Versioning guide.

Formatdate
X-Active-Profile?string

Operate on behalf of a child company (gestoría master key): pass its public id (UUID v7) and the request runs against that child's data without changing the key's scope, tier or environment (omit to use the key's own company). Invalid UUID → 400 parameter_invalid_uuid; unknown or non-owned id → 404 profile_not_found. See the Acting on behalf guide.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json