---
title: "One account's book, style by style"
method: GET
path: "/api/v1/order-book/account-styles"
tags: ["order_book"]
---

# One account's book, style by style

`GET /api/v1/order-book/account-styles`

## Request

- Base URL: `https://api.app.tightly.io`
- URL: `https://api.app.tightly.io/api/v1/order-book/account-styles`
- Auth: HTTP bearer

One account's book, style by style: prebook, at-once and undated quantities, the booked quantity and value, last price, line count, ship window, cancel date, status, Commitments and a `split` block naming the prebook anchor.

`trading_partner_id` is required. Supply `season_code` for a seasonal book, or omit it with an explicit continuity `commitment_id` to read only lines stamped to that commitment. `as_of` and `season_start` narrow. Read it before writing a line.

Grouped by product; unmatched style references remain visible. Use get_order_book_style_lines for one style across all accounts.

`booked_value_usd` is summed over the same lines get_order_book_accounts sums, each at its own price, so the styles under one account add to its figure to the cent. A held unit has no price: it counts in `booked_qty` and adds nothing here. `held_qty_from_account`, `held_by_name` and `held_at` say how many of those units the account held by answering a showing, and who, and when it landed. Cancelled lines count toward nothing; `has_cancelled` is reported and `booked_qty` is null, not 0.

`predicted_qty` is what we expect this account's doors to sell of the style, beside what it has booked, so the difference is one subtraction on one row. Null where unsized, absent where the sizing could not be read, never 0.

Sold with Essentials+: without Tightly Connect the answer is 403 `plan_excludes`.

Scope: `order_book:read`.

## Query parameters

- `trading_partner_id` string, required
- `season_code` string
- `commitment_id` string
- `as_of` string, date-time
- `season_start` string, date

## Headers

- `Tightly-Version` string

## Response `200`

The account's book. Each `styles[]` row carries `product_id`, `style_ref` and `product_title`, `booked_qty` and `booked_value_usd`, `last_booked_at` and `last_price`, `lines`, `has_cancelled`, `sources`, the soft share (`soft_qty`, `soft_lines`, `status`, `statuses`), the row's dates (`first_ship_window_start`, `next_cancel_date`) and its `commitment_ids`, where its committed money stands (`firmness`: `firm`, `walkable`, `unknown`, `mixed`, or null with no committed line; `firmness_bases`; `firm_value_usd`, `walkable_value_usd`, `unknown_value_usd`, classified as `/order-book/firmness` sums them), plus this style's prebook / at-once quantities and, where the portal facts were readable, `held_qty_from_account`, `held_by_name` and `held_at`, and, where the sizing was readable, `predicted_qty`. The header carries `season_code` as actually read, `as_of`, the `split` block with its anchor and undated disclosure, and `scope_reason`.

- object
  - `data` object
    - `as_of` string, date-time
    - `currency` object: What the figures below are in. `functional` is the book's own currency and the denomination every amount here carries. `_usd` in a key name is the book's functional currency for historical reasons, never a claim of dollars. `transaction` is what the lines were agreed in where they agree on one, and null where they do not; `reporting` is what a reader of this organisation asked to see, with `rate` the dated rate between the last two, served, never applied, and dated to this read's `as_of` so a re-read of a past instant cannot move. `basis` is one of same, converted or unconverted, and `reason` carries the absence word where the block cannot say something.
    - `scope_reason` string, nullable
    - `season_code` string: The season actually read; empty for an explicit continuity commitment.
    - `split` object: The anchor the rows were split against, its declared/derived label, and the lines that could not be placed.
    - `styles` object[]
    - `trading_partner_id` string
  - `message` object: severity, service and desc.

## Other responses

- `400`: A required parameter is missing, or the request could not be read
- `401`: No usable key: malformed, unknown, revoked, expired or stopped. One refusal covers all five, telling a caller which is which maps the surface for them. A request with no Authorization header at all is refused 400 before any key is looked for.
- `403`: The key may not reach this operation. `plan_excludes` when Order book is sold with Essentials+ and this organisation's plan does not include it; `scope_missing` when the key does not hold Order book; `organization_mismatch` when the path names an organisation that is not the key's; `ip_not_allowed` when the caller's address is outside the key's allowlist; `account_mismatch` when a key issued to one account names another in `trading_partner_id`, and the sentence names both accounts.
- `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)
