Factuarea APIDevelopers

List the stock movements of the company

Read the append-only stock ledger of the WHOLE company, newest first, to audit inventory without walking the catalog product by product. - Each row is a product ledger row plus product_id, product_name and product_sku. - Filters: product_id and warehouse_id (an id of another company gives an empty page), variant_id (one variant of product_id, so it needs it), reason and source_type (eq/in), source_id (one document, with a single source_type), direction (in/out) and occurred_at[gte|lte]. - Cursor-paginated (limit + starting_after).

GET
/companies/{company}/stock-movements

Authorization

AuthorizationBearer <token>

Your API key as a bearer token: fact_live_… in production, fact_test_… in sandbox. See the authentication guide.

In: header

Path Parameters

company*string

Public identifier (UUID v7) of the company. Get it from GET /v1/me (data.scope[].id).

Formatuuid

Query Parameters

limit?integer

Number of stock movements per page, between 1 and 100 (default 25).

Range1 <= value <= 100
starting_after?|

Cursor for forward pagination: the id of the last stock movement you received. The ledger only moves forward: there is no ending_before.

Formatuuid
direction?|

in returns only incoming movements and out only outgoing ones, across every product of the company (all when omitted).

Value in"in" | "out" | null
product_id?string

Public ID of the product whose movements are listed. A well-formed ID that does not belong to the company yields an empty page; a malformed value is rejected. Exact match on product_id.

Formatuuid
variant_id?string

Public ID of one variant of product_id: only the movements booked to it. Needs product_id (400 otherwise); a variant of another product yields an empty page. Exact match on variant_id.

Formatuuid
warehouse_id?string

Public ID of the warehouse the movements were booked to, with the same rules as the product. Exact match on warehouse_id.

Formatuuid
source_id?string

Public ID of the source document of the movements. Needs exactly one source_type naming a document (400 otherwise); a document of another company yields an empty page. Exact match on source_id.

Formatuuid
reason?string

Reason of the movement, from the closed catalog published on each movement as reason. A value outside the catalog returns 400. Exact match on reason.

Value in"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" | "goods_receipt_posted" | "goods_receipt_reverted" | "stock_transfer_dispatched" | "stock_transfer_received" | "return_received" | "return_reverted" | "stock_transfer_cancelled" | "customer_return_adjustment" | "initial_split"
reason[in]?string

Reason of the movement, from the closed catalog published on each movement as reason. A value outside the catalog returns 400. Comma-separated list. Any of the values matches.

source_type?string

Kind of document or operation that produced the movement, published on each movement as source_type. A value outside the catalog returns 400. Exact match on source_type.

Value in"invoice" | "delivery_note" | "purchase_invoice" | "manual" | "base_unit_replacement" | "goods_receipt" | "stock_transfer" | "return_order"
source_type[in]?string

Kind of document or operation that produced the movement, published on each movement as source_type. A value outside the catalog returns 400. Comma-separated list. Any of the values matches.

occurred_at[gte]?string

Moment the movement took place (ISO 8601). Use occurred_at[gte] and occurred_at[lte] together to bound a period. Greater than or equal to the given value.

Formatdate-time
occurred_at[lte]?string

Moment the movement took place (ISO 8601). Use occurred_at[gte] and occurred_at[lte] together to bound a period. Less than or equal to the given value.

Formatdate-time

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

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json