---
title: "Get variants of an article"
method: GET
path: "/core/latest/articles/{article-id}/variants"
tags: ["Article"]
---

# Get variants of an article

`GET /core/latest/articles/{article-id}/variants`

## Request

- Base URL: `https://api.klara.ch`
- URL: `https://api.klara.ch/core/latest/articles/{article-id}/variants`
- Auth: one of:
  - API key in header `X-API-KEY`
  - HTTP bearer

## Path parameters

- `article-id` string, required

## Response `200`

Found variants

- Variant[]
  - `id` string: Id of the variant
  - `number` string, required: Article number
  - `barcode` string: Barcode for the variant
  - `accountingTags` string[], required: Tags used for accounting. Articles with the same tag, same VAT case and same VAT rate are grouped together in the posting
  - `articleSets` string[]: Name of the article sets that the variant is included in
  - `defaultQuantity` number: The default quantity of the article
  - `active` boolean: Decide if this variant is active or not
  - `pricePeriods` PricePeriod[]: Price periods for the article variant.<br />If variant only has 1 price, don't include validFrom and validTo in the PricePeriod.<br />If variant have many prices, set value for validFrom for the date that the price is active for each PricePeriod.
    - `validFrom` string, date: The price period is valid from this time
    - `validTo` string, date: The price period is invalid after this time
    - `price` number: The price used for an article within this price period
    - `priceCategories` PriceCategory[]: List of price categories effective for this price period
      - `name` string: Name of the price category
      - `price` number: Effective price of this price category
  - `variantOptionValues` string[]: Values for the options that this article variant represent

## Other responses

- `401`: No Authorization header found or invalid token<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `403`: The current user is not allowed to access this company data<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `404`: Resource not found<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `429`: API rate limit exceeded<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.

---

[API](https://skmtc.dev/klara/apis/klara-public-api.md) · [All operations](https://skmtc.dev/klara/apis/klara-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/klara/apis/klara-public-api/revisions/490b1a879fc2?raw)
