Factuarea APIDevelopers

List the returnable origins

List the delivery notes, invoices and sales orders a return can be requested against, newest first, with cursor-based pagination (limit, starting_after, ending_before). - Each origin gives number, customer, date, return deadline and days left, lines, units already in live returns, warehouse and, for an invoice, the delivery note it covers. - state is ok, expired, all_returned or not_delivered; filter by origin_type and search by number or customer. - Documents of another company never appear; a cursor of another company is rejected with 422.

GET
/companies/{company}/returns/origins

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

origin_type?|

Kind of document to list: delivery_note, invoice or sales_order. Without it the three are listed together.

Value in"delivery_note" | "invoice" | "sales_order" | null
search?|

Free-text search over the document number and the customer name, case-insensitive, up to 255 characters.

Lengthlength <= 255
limit?integer

Number of origins to return, between 1 and 100 (default 25).

Default25
Range1 <= value <= 100
starting_after?string

Cursor for forward pagination: the id of the last origin of the previous page (the next_cursor you received). An id that is not an origin of your company returns 422 invalid_param_value.

Formatuuid
ending_before?string

Cursor for backward pagination: the id of the first origin of the current page. Not combinable with starting_after.

Formatuuid

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