---
title: "One supplier's five scorecard figures"
method: GET
path: "/api/v1/inventory/suppliers/{supplier_id}/overview"
tags: ["suppliers"]
---

# One supplier's five scorecard figures

`GET /api/v1/inventory/suppliers/{supplier_id}/overview`

## Request

- Base URL: `https://api.app.tightly.io`
- URL: `https://api.app.tightly.io/api/v1/inventory/suppliers/{supplier_id}/overview`
- Auth: HTTP bearer

Five figures for one supplier, as an array: `average_lead_time` in days, `total_pos_cost`, every purchase order placed with them, in the organisation's currency, and the `otif_score`, `on_time_score` and `in_full_score` rates. Each carries `key`, `unit`, `info` and `value`.

Read the `key`, never the position: the order is stable today and is not part of the contract.

A `value` of null with `info` "Not enough delivery data" means the rate exists but too few delivery lines have been scored to publish it, and on-time carries its own reason for the same case. A null is therefore "not measured yet", never zero.

The same three rates are plain fields on get_supplier_details, which is the door when the address, the contacts or the lanes are wanted in the same call.

Scope: `suppliers:read`.

## Path parameters

- `supplier_id` string, required

## Headers

- `Tightly-Version` string

## Response `200`

Five cards, each `{key, unit, info, value}`. A null `value` is a figure not measured yet, and `info` says why.

- GetSupplierOverviewResponse
  - `data` InventoryCardItem[], nullable
    - `info` string, nullable
    - `key` string, required
    - `unit` string, required
    - `value` unknown
  - `message` ApiMessage
    - `desc` string
    - `service` string
    - `severity` 'SUCCESS' | 'INFO' | 'ERROR' | 'WARNING'

## Other responses

- `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. `scope_missing` when the key does not hold Suppliers; `ip_not_allowed` when the caller's address is outside the key's allowlist. There is no `organization_mismatch` on this resource: no supplier or contact route names an organisation in its path, so there is nothing for a key to disagree with.
- `404`: No supplier of this organisation has 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)
