---
title: "One variant's stock and cover, warehouse by warehouse"
method: GET
path: "/api/v1/variants/{variant_id}/drawer-overview"
tags: ["variants"]
---

# One variant's stock and cover, warehouse by warehouse

`GET /api/v1/variants/{variant_id}/drawer-overview`

## Request

- Base URL: `https://api.app.tightly.io`
- URL: `https://api.app.tightly.io/api/v1/variants/{variant_id}/drawer-overview`
- Auth: HTTP bearer

One row per warehouse the variant is held in: `location_id` and `location_name`, `stock_on_hand`, `stock_value`, `incoming_stock`, `weeks_of_cover`, `velocity` (units a day), `health` and `capital_quadrant`.

`weeks_of_cover`, `velocity`, `health` and `capital_quadrant` are null where there is not enough demand history to compute them. Null is "not known yet", never zero.

Beside the locations it carries `is_seasonal`, and the variant's `successors` and `predecessors`, each `{variant_id, product_title, variant_title}`, what replaces this variant and what it replaced. Both are `[]` where no successor relationship is recorded.

This is the per-warehouse view of one variant. For the whole catalogue's stock across warehouses, read the stock resource's table.

Scope: `products:read`.

## Path parameters

- `variant_id` string, required

## Headers

- `Tightly-Version` string

## Response `200`

One row per warehouse, with the variant's successors and predecessors.

- object
  - `data` GetVariantDrawerOverviewPayload
    - `is_seasonal` boolean, nullable
    - `locations` DrawerOverviewLocationItem[]
      - `capital_quadrant` string, nullable
      - `health` string, nullable
      - `incoming_stock` integer
      - `location_id` string, required
      - `location_name` string, required
      - `stock_on_hand` integer, required
      - `stock_value` number, required
      - `velocity` number, nullable
      - `weeks_of_cover` number, nullable
    - `predecessors` VariantMinimalDto[]
      - `product_title` string, nullable
      - `variant_id` string, required
      - `variant_title` string, nullable
    - `successors` VariantMinimalDto[]
      - `product_title` string, nullable
      - `variant_id` string, required
      - `variant_title` string, nullable
  - `message` object: severity, service and desc.

## Other responses

- `401`: No usable key: malformed, unknown, revoked, expired or stopped. One refusal covers all five, because telling a caller which is which maps the surface for them.
- `403`: The key may not reach this operation. `scope_missing` when the key does not hold Products; `ip_not_allowed` when the caller's address is outside the key's allowlist. `plan_excludes` when the organisation's plan does not include the public API itself, which is sold with Essentials and is asked of every key minted under that gate. A key minted before the gate existed is never refused by it, whatever the plan holds. Products is ungated, so that is the only plan reason served here.
- `404`: No variant in this organisation carries that id.
- `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)
