---
title: "One variant with its stock and its suppliers"
method: GET
path: "/api/v1/variants/{variant_id}"
tags: ["variants"]
---

# One variant with its stock and its suppliers

`GET /api/v1/variants/{variant_id}`

## Request

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

One variant as the catalogue holds it, and what is true of it right now: `sku`, `barcode`, `gtin`, `lifecycle` and its alias `status`, description and images, vendor, category, `sell_price`, `unit_cost` and `unit_cost_currency`, the physical fields, `hs_code`, `country_of_origin`, `selected_options`, `custom_fields`, `launch_date`, and the `product_id` and `product_name` it belongs to.

`in_stock`, `incoming_stock` and `inventory_value` are the stock figures, narrowed to one warehouse when `location_id` is sent and totalled across every warehouse when it is not. `inventory_value` is at cost, the variant's or else its product's, and it is null when neither carries one. `health_cover` is per location, `{location, cover, health}`, and `performance_category_by_location` carries the performance category and capital quadrant per location.

`suppliers` is who can supply it, `production_type` says whether it is bought, made or a raw material, and `prepack` carries the full prepack when it is part of one. `last_stockout_date` is null where it has never gone out of stock.

A variant id that does not exist in this organisation is refused 404.

Scope: `products:read`.

## Path parameters

- `variant_id` string, required

## Query parameters

- `location_id` string

## Headers

- `Tightly-Version` string

## Response `200`

The variant, its stock and its suppliers.

- object
  - `data` GetVariantPayload
    - `barcode` string, nullable
    - `brand_id` string, nullable
    - `brand_name` string, nullable
    - `category` string, nullable
    - `category_id` string, nullable
    - `country_of_origin` string, nullable
    - `custom_fields` object, nullable
    - `description` string, nullable
    - `ean` string, nullable
    - `forecast_model` string, nullable
    - `gallery_images` string[], nullable
    - `gtin` string, nullable
    - `has_more_reliable_supplier` boolean, nullable
    - `health_cover` HealthCoverByLocation[], nullable
      - `cover` integer, required
      - `health` string, required
      - `location` string, required
    - `height` number, nullable
    - `hs_code` string, nullable
    - `image_url` string, nullable
    - `in_current_season_plan` boolean, nullable
    - `in_stock` integer, required
    - `incoming_stock` integer, required
    - `inventory_value` number, nullable
    - `is_managed` boolean, required
    - `is_seasonal` boolean, nullable
    - `last_stockout_date` string, nullable
    - `last_updated_at` string, nullable
    - `last_updated_by` string, nullable
    - `launch_date` string, nullable
    - `length` number, nullable
    - `lifecycle` string, nullable
    - `performance_category_by_location` PerformanceCategoryByLocation[], nullable
      - `capital_quadrant` string, nullable
      - `location` string, required
      - `performance_category` string, nullable
    - `predecessors` VariantMinimalDto[]
      - `product_title` string, nullable
      - `variant_id` string, required
      - `variant_title` string, nullable
    - `prepack` object, nullable
    - `prepack_id` string, nullable
    - `product_id` string, required
    - `product_name` string, required
    - `production_type` string, nullable
    - `published_at` string, nullable
    - `published_status` string, nullable
    - `replenishment_mode` string, nullable
    - `replenishment_strategies` string[], nullable
    - `sales_channels` SalesChannelInfo[], nullable
      - `id` string, required
      - `name` string, required
    - `selected_options` object, nullable
    - `sell_price` number, nullable
    - `selling_window_end` string, nullable
    - `selling_window_start` string, nullable
    - `shopify_tags` string[], nullable
    - `shopify_url` string, nullable
    - `sku` string, nullable
    - `status` string, nullable
    - `successors` VariantMinimalDto[]
      - `product_title` string, nullable
      - `variant_id` string, required
      - `variant_title` string, nullable
    - `suppliers` VariantSupplier[], nullable
      - `batch_size` integer, nullable
      - `is_default` boolean, nullable
      - `lead_time` integer, nullable
      - `lead_time_source` string, nullable
      - `location_lead_times` VariantSupplierLocationLeadTime[], nullable
        - `lead_time` integer, nullable
        - `location_id` string, required
        - `location_name` string, nullable
        - `source` string, nullable
      - `min_order_quantity` integer, nullable
      - `otif_score` number, nullable
      - `replenishment_frequency` integer, nullable
      - `replenishment_frequency_source` string, nullable
      - `supplier_id` string, required
      - `supplier_name` string, nullable
      - `unit_cost` number, nullable
      - `unit_cost_source` string, nullable
    - `trading_partners` object[], nullable
    - `unit_cost` number, nullable
    - `unit_cost_currency` string, nullable
    - `uom` string, nullable
    - `upc` string, nullable
    - `variant_id` string, required
    - `variant_name` string, required
    - `variant_title` string, nullable
    - `vendor` string, nullable
    - `weight` number, nullable
    - `weight_unit` string, nullable
    - `width` number, 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)
