# List items

Source: https://amanucci.com/nl/docs/developers/api/documents/listSalesItems

## GET /v1/entities/{entityId}/sales-items

List items

This entity's items in the walk `order` names, paged by cursor: the live ones, with `archived=true` the archived ones, with `archived=any` both, and whether this caller may add one. `q` searches the name and the description, as a line's picker does.

Operation ID: `listSalesItems`

### Parameters

```json
[
  {
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "required": true,
    "name": "entityId",
    "in": "path"
  },
  {
    "schema": {
      "type": "string",
      "enum": [
        "true",
        "false",
        "any"
      ],
      "description": "`true`: the archived items alone. `any`: live and archived alike, the Items list's All. Absent or `false`: the live ones, the pickers' list."
    },
    "required": false,
    "description": "`true`: the archived items alone. `any`: live and archived alike, the Items list's All. Absent or `false`: the live ones, the pickers' list.",
    "name": "archived",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "description": "An opaque position, taken verbatim from a previous response's `nextCursor`. Never construct one: its encoding is an implementation detail and may change within `/v1` (rule 6 governs FIELDS, not the contents of an opaque token)."
    },
    "required": false,
    "description": "An opaque position, taken verbatim from a previous response's `nextCursor`. Never construct one: its encoding is an implementation detail and may change within `/v1` (rule 6 governs FIELDS, not the contents of an opaque token).",
    "name": "cursor",
    "in": "query"
  },
  {
    "schema": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200,
      "default": 200,
      "description": "How many rows at most. The hard ceiling is 200; a larger value is refused with 422, never silently reduced."
    },
    "required": false,
    "description": "How many rows at most. The hard ceiling is 200; a larger value is refused with 422, never silently reduced.",
    "name": "limit",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "enum": [
        "id",
        "name.asc",
        "name.desc",
        "price.desc",
        "price.asc"
      ],
      "default": "id",
      "description": "The walk. `id` (the default): oldest first, the order items were made in, the walk it always had. `name.asc` / `.desc` by name, case folded first; `price.desc` / `.asc` the unit price VAT excluded (`unitPrice`), the entity's functional currency first and every other after it by code. Rows that share the key come in the order they were made, in the walk's direction. A cursor resumes only the walk that minted it: change the order and start at the first page."
    },
    "required": false,
    "description": "The walk. `id` (the default): oldest first, the order items were made in, the walk it always had. `name.asc` / `.desc` by name, case folded first; `price.desc` / `.asc` the unit price VAT excluded (`unitPrice`), the entity's functional currency first and every other after it by code. Rows that share the key come in the order they were made, in the walk's direction. A cursor resumes only the walk that minted it: change the order and start at the first page.",
    "name": "order",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "A case-insensitive substring, 1..100 characters; `%` and `_` match themselves."
    },
    "required": false,
    "description": "A case-insensitive substring, 1..100 characters; `%` and `_` match themselves.",
    "name": "q",
    "in": "query"
  }
]
```

### Responses

#### 200 One page of items.

```json
{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/SalesItemList"
    }
  }
}
```

#### 401 Dead or absent credential (`unauthenticated`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 403 Authenticated, present, and refused: a missing grant, a missing seat, or a missing step-up.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 404 Absent, or hidden from this asker — the two are indistinguishable (`not-found`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 422 The request did not satisfy the schema (`invalid-input`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 429 Too many requests on this door's bucket (`rate-limited`); refused before any handler ran, `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 503 Temporarily unavailable; `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```
