---
title: "List stock movements of a product"
method: GET
path: "/companies/{company}/products/{product}/stock-movements"
tags: ["Products"]
---

# List stock movements of a product

`GET /companies/{company}/products/{product}/stock-movements`

## Request

- Base URL: `https://api.factuarea.com/v1`
- URL: `https://api.factuarea.com/v1/companies/{company}/products/{product}/stock-movements`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Read the append-only stock ledger of a product, newest movement first.
- Rows carry signed `delta` and `stock_after` (base units); `stock_after` ignores `direction`.
- Cursor-paginated (`limit` + `starting_after`); `direction=in|out` narrows the rows.

## Path parameters

- `company` string, uuid, required
- `product` string, uuid, required

## Query parameters

- `limit` integer
- `starting_after` string, uuid, nullable
- `direction` 'in' | 'out' | 'null', nullable

## Headers

- `Factuarea-Version` string, date

## Response `200`

- object: Cursor-paginated list envelope shared by every v1 listing endpoint. `data` holds the page items; `has_more` signals whether another page exists; `next_cursor` is the cursor to pass back for the following page. Treat it as strictly opaque: send it through verbatim, never parse it and never assume a format — it is not the same across listings, and each listing documents its own cursor parameter. Concrete listings narrow `data` to their resource type via `allOf`.
  - `data` object[], required: Items on the current page.
    - `object` 'stock_movement', required
    - `id` string, uuid, required
    - `delta` string, required: Signed change in BASE units, decimal string with scale 4. Positive = stock in, negative = stock out. Never zero.
    - `stock_after` string, required: Balance right after this movement was applied, decimal string with scale 4. Derived from the COMPLETE ledger, so it does not change when `direction` hides the interleaved rows.
    - `reason` string, required: Why the movement happened. Closed catalog: `invoice_sent`, `invoice_annulled`, `invoice_unsent`, `corrective_created`, `delivery_note_delivered`, `delivery_note_cancelled`, `purchase_invoice_registered`, `purchase_invoice_reverted`, `manual_adjustment`, `initial`, `base_unit_replacement_out`, `base_unit_replacement_in`. The last two are the pair a base unit replacement writes: `_out` empties the old product (in its unit) and `_in` fills the new one (in its unit).
    - `source_type` 'invoice' | 'delivery_note' | 'purchase_invoice' | 'manual' | 'base_unit_replacement', required: Kind of document that caused the movement. `manual` for an adjustment with no source document; `base_unit_replacement` for the transfer of a base unit replacement.
    - `source_id` string, uuid, nullable, required: Id of the source document, `null` for a manual adjustment or when the document is no longer reachable. For `base_unit_replacement` it is the id of the OTHER product of the replacement: the new one on the `_out` row and the old one on the `_in` row.
    - `source_label` string, nullable, required: Human-readable number of the source document. For `base_unit_replacement`, the name of the other product.
    - `performed_by` string, nullable, required: Name of the user who caused the movement. `null` means the system did.
    - `occurred_at` string, date-time, required
    - `base_unit_code` string, required: UN/ECE code of the unit `delta` and `stock_after` are measured in. Always present.
    - `commercial_quantity` string, nullable, required: Commercial magnitude the delta came from, decimal string with scale 4. All-or-nothing with `commercial_unit_code` and `conversion_factor`.
    - `commercial_unit_code` string, nullable, required: UN/ECE code of the commercial unit. All-or-nothing with `commercial_quantity` and `conversion_factor`.
    - `conversion_factor` string, nullable, required: Base units per commercial unit, decimal string with scale 6. All-or-nothing with the other two. Informational: it is NOT applied again here.
    - `variant_id` string, uuid, nullable, required: Managing variant the balance belongs to, `null` when it is the base product.
    - `variant_name` string, nullable, required
  - `has_more` boolean, required: Whether more pages are available after this one.
  - `next_cursor` string, nullable, required: Opaque cursor for the next page, or `null` when `has_more` is `false`. The example below shows the shape used by most listings; others return a different one, so pass the value back verbatim instead of validating it.

## Other responses

- `400`: `parameter_unknown` with `subcode` `retired_active_profile_header`: the retired `X-Active-Profile` header was sent; the company goes in the path. `parameter_invalid_format` on `Factuarea-Version`: the header is not a `YYYY-MM-DD` date. `unsupported_api_version`: the `Factuarea-Version` date is not a supported version.
- `401`: Missing or invalid API key.
- `403`: The request is authenticated but not allowed: the API key lacks the required scope (`insufficient_scope`), the plan does not include the public API or this feature (`addon_not_active`, `feature_not_available_in_plan`), or the module is not available with a test key (`module_not_available_in_sandbox`).
- `404`: The requested resource does not exist or belongs to another company.
- `422`: Validation failed. The `error.param` field identifies which input is invalid.
- `429`: Rate limit exceeded. Retry after the duration in `Retry-After`.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/factuarea/apis/factuarea-public-api.md) · [All operations](https://skmtc.dev/factuarea/apis/factuarea-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/factuarea/apis/factuarea-public-api/revisions/718e77934422?raw)
