---
title: "list returns"
method: GET
path: "/api/v1/sales/returns"
tags: ["returns"]
---

# list returns

`GET /api/v1/sales/returns`

## Request

- Base URL: `https://api.app.tightly.io`
- URL: `https://api.app.tightly.io/api/v1/sales/returns`
- Auth: HTTP bearer

Every return, newest first, with what is expected back and what has arrived. `state_numbers` counts the WHOLE filtered book per state, not the page you were served, so a heading built on it ties to the rows underneath. Filter by state, origin, order or creation date.

Scope: `returns:read`.

## Query parameters

- `state` 'expected' | 'received' | 'closed' | 'exception' | 'cancelled'
- `origin` 'channel' | 'manual' | 'api' | 'csv' | 'portal'
- `order_id` string
- `since` string, date
- `offset` integer
- `limit` integer

## Headers

- `Tightly-Version` string

## Response `200`

The page, and the counts a heading has to tie to.

- object
  - `data` object
    - `filtered_max_size` integer
    - `rows` object[]
    - `state_numbers` object
  - `message` object: severity, service and desc.

## Other responses

- `400`: A filter names a value that is not one of its own (`state`, `origin`), or a date that could not be read.
- `401`: No usable key: malformed, unknown, revoked, expired or stopped.
- `403`: The key does not hold Returns (`scope_missing`), names another organisation, or is outside its allowlist.
- `429`: The key has spent its allowance for this minute. 600 reads and 120 writes a minute, counted per key, refused calls included. `Retry-After` says how long to wait.
- `503`: The database is briefly out of reach, which is what a failover or a full connection pool looks like from outside. Wait the seconds `Retry-After` names and send the request again. A read is safe to repeat. A write is not, because the connection was lost in the middle of it, so read the object back before sending it a second time. Branch on the status rather than on `code`, which is `POSTGRES_UNAVAILABLE` from one of the two seams that raise this and `SERVICE_UNAVAILABLE` from the other.

---

[API](https://skmtc.dev/tightly/apis/tightly-api.md) · [All operations](https://skmtc.dev/tightly/apis/tightly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tightly/apis/tightly-api/revisions/199f7eb35afb?raw)
