Factuarea APIDevelopers

List all returns

List the returns of your company with cursor-based pagination, filters, free-text search and sorting by creation, number, request date or refundable amount. - Filters include status, origin document (origin_id requires origin_type, otherwise 422), sales order (sales_order_id), reason (any line), warehouse, business contact, number and cycle dates; ids of another company return an empty page. - search matches the return number, the origin number, the business contact name and the line descriptions. - A return still requested has NO number: it is stamped on approval.

GET
/companies/{company}/returns

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 objects to return, between 1 and 100 (default 25).

Default25
Range1 <= value <= 100
starting_after?string

Cursor for forward pagination: pass the id of the last object on the previous page (the next_cursor of the previous response).

Formatuuid
ending_before?string

Cursor for backward pagination: pass the id of the first object on the current page.

Formatuuid
status?string

Return status: requested, approved, received, refunded or rejected. Exact match on status.

Value in"requested" | "approved" | "received" | "refunded" | "rejected"
status[in]?string

Return status: requested, approved, received, refunded or rejected. Comma-separated list. Any of the values matches.

origin_type?string

Kind of document the goods went out on: delivery_note, invoice or sales_order. Exact match on origin_type.

Value in"delivery_note" | "invoice" | "sales_order"
origin_type[in]?string

Kind of document the goods went out on: delivery_note, invoice or sales_order. Comma-separated list. Any of the values matches.

origin_id?string

UUID of the origin document; requires origin_type with a single value; an origin of another company returns an empty list. Exact match on origin_id.

Formatuuid
reason?string

Reason of the return (closed set of four): a return matches when ANY of its lines has it. Exact match on reason.

Value in"merchandise_returned" | "order_cancelled" | "customer_request" | "product_defective"
reason[in]?string

Reason of the return (closed set of four): a return matches when ANY of its lines has it. Comma-separated list. Any of the values matches.

sales_order_id?string

Public ID of a sales order: its returns and those of its delivery notes and invoices. An order of another company returns an empty page. Exact match on sales_order_id.

Formatuuid
warehouse_id?string

Public ID of the warehouse the goods are taken back into. A foreign warehouse yields an empty page. Exact match on warehouse_id.

Formatuuid
warehouse_id[in]?string

Public ID of the warehouse the goods are taken back into. A foreign warehouse yields an empty page. Comma-separated list. Any of the values matches.

business_contact_id?string

Public ID of the business contact the return belongs to, with the same rules as the warehouse. Exact match on business_contact_id.

Formatuuid
business_contact_id[in]?string

Public ID of the business contact the return belongs to, with the same rules as the warehouse. Comma-separated list. Any of the values matches.

number?string

Return number, up to 255 characters. Stamped when the return is approved, so one awaiting a decision has none. Exact match on number.

number[in]?string

Return number, up to 255 characters. Stamped when the return is approved, so one awaiting a decision has none. Comma-separated list. Any of the values matches.

number[contains]?string

Return number, up to 255 characters. Stamped when the return is approved, so one awaiting a decision has none. Partial case-insensitive match (LIKE %term%) on number.

requested_at?string

Moment the return was requested (ISO 8601). A bare day matches the whole of that day. Exact match on requested_at.

Formatdate-time
requested_at[gte]?string

Moment the return was requested (ISO 8601). A bare day matches the whole of that day. Greater than or equal to the given value.

Formatdate-time
requested_at[lte]?string

Moment the return was requested (ISO 8601). A bare day matches the whole of that day. Less than or equal to the given value.

Formatdate-time
requested_at[gt]?string

Moment the return was requested (ISO 8601). A bare day matches the whole of that day. Strictly greater than the given value.

Formatdate-time
requested_at[lt]?string

Moment the return was requested (ISO 8601). A bare day matches the whole of that day. Strictly less than the given value.

Formatdate-time
approved_at?string

Moment the return was approved (ISO 8601), same day semantics. A return awaiting a decision or rejected never matches. Exact match on approved_at.

Formatdate-time
approved_at[gte]?string

Moment the return was approved (ISO 8601), same day semantics. A return awaiting a decision or rejected never matches. Greater than or equal to the given value.

Formatdate-time
approved_at[lte]?string

Moment the return was approved (ISO 8601), same day semantics. A return awaiting a decision or rejected never matches. Less than or equal to the given value.

Formatdate-time
approved_at[gt]?string

Moment the return was approved (ISO 8601), same day semantics. A return awaiting a decision or rejected never matches. Strictly greater than the given value.

Formatdate-time
approved_at[lt]?string

Moment the return was approved (ISO 8601), same day semantics. A return awaiting a decision or rejected never matches. Strictly less than the given value.

Formatdate-time
received_at?string

Moment the goods came back in (ISO 8601), with the same day semantics. A return whose goods have not arrived never matches this filter. Exact match on received_at.

Formatdate-time
received_at[gte]?string

Moment the goods came back in (ISO 8601), with the same day semantics. A return whose goods have not arrived never matches this filter. Greater than or equal to the given value.

Formatdate-time
received_at[lte]?string

Moment the goods came back in (ISO 8601), with the same day semantics. A return whose goods have not arrived never matches this filter. Less than or equal to the given value.

Formatdate-time
received_at[gt]?string

Moment the goods came back in (ISO 8601), with the same day semantics. A return whose goods have not arrived never matches this filter. Strictly greater than the given value.

Formatdate-time
received_at[lt]?string

Moment the goods came back in (ISO 8601), with the same day semantics. A return whose goods have not arrived never matches this filter. Strictly less than the given value.

Formatdate-time
refunded_at?string

Moment the money went back (ISO 8601), with the same day semantics. Only a refunded return carries it. Exact match on refunded_at.

Formatdate-time
refunded_at[gte]?string

Moment the money went back (ISO 8601), with the same day semantics. Only a refunded return carries it. Greater than or equal to the given value.

Formatdate-time
refunded_at[lte]?string

Moment the money went back (ISO 8601), with the same day semantics. Only a refunded return carries it. Less than or equal to the given value.

Formatdate-time
refunded_at[gt]?string

Moment the money went back (ISO 8601), with the same day semantics. Only a refunded return carries it. Strictly greater than the given value.

Formatdate-time
refunded_at[lt]?string

Moment the money went back (ISO 8601), with the same day semantics. Only a refunded return carries it. Strictly less than the given value.

Formatdate-time
rejected_at?string

Moment the return was rejected (ISO 8601), same day semantics. Only rejected returns carry it. Exact match on rejected_at.

Formatdate-time
rejected_at[gte]?string

Moment the return was rejected (ISO 8601), same day semantics. Only rejected returns carry it. Greater than or equal to the given value.

Formatdate-time
rejected_at[lte]?string

Moment the return was rejected (ISO 8601), same day semantics. Only rejected returns carry it. Less than or equal to the given value.

Formatdate-time
rejected_at[gt]?string

Moment the return was rejected (ISO 8601), same day semantics. Only rejected returns carry it. Strictly greater than the given value.

Formatdate-time
rejected_at[lt]?string

Moment the return was rejected (ISO 8601), same day semantics. Only rejected returns carry it. Strictly less than the given value.

Formatdate-time
sort?string

Sort order: created, number, requested, refundable_amount ascending, or with a - prefix for descending (default -created).

Value in"created" | "-created" | "number" | "-number" | "requested" | "-requested" | "refundable_amount" | "-refundable_amount"
search?string

Free-text search over the return number, the origin number, the customer name (business_contact_name) and the line descriptions, case-insensitive, up to 255 characters.

Lengthlength <= 255

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