---
title: "A page of suppliers with their terms, lead times and delivery record"
method: GET
path: "/api/v1/inventory/suppliers/table"
tags: ["suppliers"]
---

# A page of suppliers with their terms, lead times and delivery record

`GET /api/v1/inventory/suppliers/table`

## Request

- Base URL: `https://api.app.tightly.io`
- URL: `https://api.app.tightly.io/api/v1/inventory/suppliers/table`
- Auth: HTTP bearer

A page of suppliers: identity and address, currency, minimum order value, the resolved lead time and where it came from, the primary contact, the per-warehouse lead times, and the OTIF, on-time and in-full rates. `filtered_max_size` is the size of the filtered set and `max_size` the size of the book, so a client can page without counting.

Page with `limit` (1 to 10,000, default 10) and `offset` (0 to 2,147,483,647). Narrow with `filter_args`, a JSON array of `{key, operation, value, group}`, on `id`, `name`, `city`, `country` and `currency` (eq, in), `min_order_value` and `lead_time` (gte, lte), `is_archived` (eq) and `missing_fields` (eq, in). Order with `sort_args`, comma-separated, `-` for descending, over id, name, city, country, postal_code, min_order_value, lead_time, otif_score, on_time, in_full and primary_contact.name, .email and .phone. `search` matches the name and the address.

A row's `lead_time` resolves the supplier's own figure against the organisation default, while each entry in `location_lead_times` resolves that warehouse's override against the same default. The two can differ on one row on purpose. `otif_score`, `on_time` and `in_full` are null until enough delivery lines have been scored to publish a rate.

A row carries no contacts list and no lanes. get_supplier_details is the whole record for one supplier.

Scope: `suppliers:read`.

## Query parameters

- `counts_only` boolean
- `limit` integer
- `offset` integer
- `filter_args` string
- `sort_args` string
- `search` string

## Headers

- `Tightly-Version` string

## Response `200`

One page of supplier rows, with the offset requested, the number of rows served, the size of the filtered set and the size of the whole book.

- object
  - `data` GetSuppliersTablePayload
    - `filtered_max_size` integer, required
    - `max_size` integer, required
    - `offset` integer, required
    - `rows` SupplierDetailsWithContacts[], required
      - `address1` string, nullable
      - `address2` string, nullable
      - `average_lead_time` union
        - InventoryCardItem
          - `info` string, nullable
          - `key` string, required
          - `unit` string, required
          - `value` unknown
        - object, nullable
      - `brands` SupplierBrandRef[]
        - `brand_id` string, required
        - `name` string, required
        - `owned` boolean
      - `city` string, nullable
      - `contacts` ContactPayload[]
        - `city` string, nullable
        - `country` string, nullable
        - `department` string, nullable
        - `description` string, nullable
        - `email` string, nullable
        - `id` string, required
        - `is_primary_contact` boolean, nullable
        - `name` string, nullable
        - `phone` string, nullable
        - `preferred_contact_method` string, nullable
        - `role` string, nullable
        - `supplier_id` string, nullable
        - `supplier_name` string, nullable
      - `container_type_id` integer, nullable
      - `country` string, nullable
      - `currency` string, nullable
      - `domains` string[], nullable
      - `edi` union
        - SupplierEdi
          - `account_number` string, nullable
          - `trading_partner_id` string, nullable
          - `vendor_number` string, nullable
        - object, nullable
      - `id` string, required
      - `in_full` number, nullable
      - `integrations` object, nullable
      - `is_archived` boolean, nullable
      - `kind` string, nullable
      - `lanes` SupplierLane[], nullable
        - `basis` string, nullable
        - `container_name` string, nullable
        - `container_type_id` integer, nullable
        - `freight_per_container_cents` integer, nullable
        - `internal_cbm` number, nullable
        - `lead_time` integer, nullable
        - `lead_time_source` string, nullable
        - `location_id` string, required
        - `location_name` string, nullable
        - `pallet_positions` integer, nullable
        - `payload_kg` integer, nullable
        - `resolved_container_type_id` integer, nullable
        - `road_limit_kg` integer, nullable
        - `usable_pct` number, nullable
      - `lead_time` integer, nullable
      - `lead_time_source` string, nullable
      - `location_lead_times` SupplierLocationLeadTime[], nullable
        - `lead_time` integer, nullable
        - `location_id` string, required
        - `location_name` string, nullable
        - `source` string, nullable
      - `min_order_value` integer, nullable
      - `name` string, required
      - `on_time` number, nullable
      - `otif_score` number, nullable
      - `payment_terms_days` integer, nullable
      - `postal_code` string, nullable
      - `primary_contact` union
        - ContactPayload
          - `city` string, nullable
          - `country` string, nullable
          - `department` string, nullable
          - `description` string, nullable
          - `email` string, nullable
          - `id` string, required
          - `is_primary_contact` boolean, nullable
          - `name` string, nullable
          - `phone` string, nullable
          - `preferred_contact_method` string, nullable
          - `role` string, nullable
          - `supplier_id` string, nullable
          - `supplier_name` string, nullable
        - object, nullable
      - `province` string, nullable
    - `size` integer, required
  - `message` object: severity, service and desc.

## Other responses

- `400`: A pagination bound, a filter key, an operation or a value is not one this table takes.
- `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.
- `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)
