# A firm's portfolio

Source: https://amanucci.com/nl/docs/developers/api/reports/readPortfolio

## GET /v1/firms/{firmId}/portfolio

A firm's portfolio

The firm's clients side by side, worst first: severity (destructive → warning → success → none), then profit change ascending (no change last), then name. One row per entity your seat's portfolio reaches; its numbers are `readStatements`' own and need `position.read` (null without — the row still lists). `summary` counts every reached entity, not the page. Firm seats only: anything else is the same 404 as a firm that does not exist; a seat that reaches nothing reads an empty list. Pages by cursor (rule 5).

Operation ID: `readPortfolio`

### Parameters

```json
[
  {
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "required": true,
    "name": "firmId",
    "in": "path"
  },
  {
    "schema": {
      "type": "string",
      "enum": [
        "live",
        "filed"
      ],
      "default": "live",
      "description": "`live` reads every posted line and projects the rest of the current period; `filed` reads only a period whose VAT return is filed (`submitted` or `accepted_evidence`) and never projects."
    },
    "required": false,
    "description": "`live` reads every posted line and projects the rest of the current period; `filed` reads only a period whose VAT return is filed (`submitted` or `accepted_evidence`) and never projects.",
    "name": "basis",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "enum": [
        "previous_year",
        "previous_period",
        "none"
      ],
      "default": "previous_year"
    },
    "required": false,
    "name": "compare",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "description": "A calendar quarter (`2026-Q3`), a fiscal year (`FY2026`, named by the year it starts in) or a month-aligned range `<from>..<to>` of at most 36 months. Default: the quarter containing today."
    },
    "required": false,
    "description": "A calendar quarter (`2026-Q3`), a fiscal year (`FY2026`, named by the year it starts in) or a month-aligned range `<from>..<to>` of at most 36 months. Default: the quarter containing today.",
    "name": "period",
    "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": [
        "severity",
        "name.asc",
        "name.desc",
        "profit.desc",
        "profit.asc",
        "change.desc",
        "change.asc",
        "cash.desc",
        "cash.asc",
        "tax.desc",
        "tax.asc"
      ],
      "default": "severity",
      "description": "The order. `severity` (the default): worst first, severity (destructive → warning → success → none), then profit change ascending (no change last), then name. `name.asc` / `.desc` the client's name, case folded first; `profit`, `change` (profit against its comparison), `cash` and `tax` (tax to pay), each `.desc` / `.asc`, a client without the figure last both ways, figures of one currency compared with each other. A cursor resumes only the order that minted it: change it and start at the first page."
    },
    "required": false,
    "description": "The order. `severity` (the default): worst first, severity (destructive → warning → success → none), then profit change ascending (no change last), then name. `name.asc` / `.desc` the client's name, case folded first; `profit`, `change` (profit against its comparison), `cash` and `tax` (tax to pay), each `.desc` / `.asc`, a client without the figure last both ways, figures of one currency compared with each other. A cursor resumes only the order that minted it: change it and start at the first page.",
    "name": "sort",
    "in": "query"
  }
]
```

### Responses

#### 200 One page of the portfolio.

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

#### 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"
    }
  }
}
```
