---
title: "Bulk read variants"
method: GET
path: "/v1/variants"
tags: ["Variants"]
---

# Bulk read variants

`GET /v1/variants`

## Request

- Base URL: `https://api.finalpos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.finalpos.com/v1/variants`
- Auth: API key in header `x-api-key`

Retrieves a list of variants. Supports filtering by fields, sorting, and pagination.

## Query parameters

- `skip` number
- `limit` number
- `sortBy` 'createdAt' | 'updatedAt' | 'barcode' | 'price' | 'salePrice' | 'costPrice'
- `sortOrder` 'asc' | 'desc'
- `searchByBarcode` string
- `createdAt` object
  - `gte` string, date-time
  - `lte` string, date-time
  - `gt` string, date-time
  - `lt` string, date-time
- `updatedAt` object
  - `gte` string, date-time
  - `lte` string, date-time
  - `gt` string, date-time
  - `lt` string, date-time
- `productId` string
- `isOnSale` boolean
- `notSoldInPos` boolean
- `notSoldOnline` boolean
- `unitId` string
- `stockVariantId` string

## Response `200`

Successfully retrieved list of items

- object
  - `data` VariantResponseDto[]
    - `id` string: Unique identifier for the Variant.
    - `createdAt` string, date-time: Timestamp when the Variant was created.
    - `updatedAt` string, date-time: Timestamp when the Variant was last updated.
    - `companyId` string: Company ID associated with the Variant.
    - `productId` string: Product ID of the variant.
    - `sku` string: SKU of the variant.
    - `isOnSale` boolean: Whether the variant is on sale.
    - `barcode` string: Barcode of the variant.
    - `price` number: Regular price of the variant in the lowest currency unit.
    - `salePrice` number: Sale price of the variant in the lowest currency unit.
    - `externalId` string: External ID of the variant.
    - `allowBackorder` boolean: Whether the variant allows backorder.
    - `notSoldInPos` boolean: This variant is not sold at the POS, on top of its product. Missing = as the product.
    - `notSoldOnline` boolean: This variant is not sold online, on top of its product. Missing = as the product.
    - `costPrice` number: Cost price of the variant in the lowest currency unit.
    - `images` string[]: Images of the variant.
    - `currency` 'USD' | 'EUR' | 'GBP' | 'CAD' | 'AUD' | 'NZD' | 'CHF' | 'CNY' | 'INR' | 'MXN' | 'BRL' | 'ZAR' | 'SGD' | 'HKD' | 'SEK' | 'NOK' | 'DKK' | 'PLN' | 'THB' | 'MYR' | 'PHP' | 'IDR' | 'AED' | 'SAR' | 'ILS' | 'TRY' | 'RUB' | 'HTG' | 'BND' | 'CRC' | 'BDT' | 'UAH' | 'NGN' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BGN' | 'BMD' | 'BOB' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'COP' | 'CZK' | 'DOP' | 'DZD' | 'EGP' | 'ETB' | 'FJD' | 'GEL' | 'GHS' | 'GTQ' | 'GYD' | 'HNL' | 'IRR' | 'JMD' | 'KES' | 'KGS' | 'KHR' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'MAD' | 'MDL' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MUR' | 'MVR' | 'MZN' | 'NAD' | 'NIO' | 'NPR' | 'PAB' | 'PEN' | 'PGK' | 'PKR' | 'QAR' | 'RON' | 'RSD' | 'SBD' | 'SRD' | 'SYP' | 'TJS' | 'TMT' | 'TOP' | 'TTD' | 'TZS' | 'UYU' | 'UZS' | 'VES' | 'WST' | 'XCD' | 'YER' | 'ZMW' | 'CDF' | 'CUP' | 'ERN' | 'FKP' | 'GIP' | 'GMD' | 'KPW' | 'LRD' | 'LSL' | 'MGA' | 'MWK' | 'SCR' | 'SDG' | 'SHP' | 'SLE' | 'SOS' | 'SSP' | 'STN' | 'SZL' | 'VED' | 'XCG' | 'JPY' | 'KRW' | 'VND' | 'CLP' | 'ISK' | 'HUF' | 'TWD' | 'GNF' | 'BIF' | 'DJF' | 'KMF' | 'PYG' | 'RWF' | 'UGX' | 'VUV' | 'XAF' | 'XOF' | 'XPF' | 'KWD' | 'BHD' | 'OMR' | 'JOD' | 'TND' | 'LYD' | 'IQD': Currency of the Variant. ISO 4217 currency code.
    - `minorUnits` number: The Minor Units of the Variant to convert the amount from minor units to major units.
    - `metadata` MetadataDto[]: Metadata associated with the Variant.
      - `key` string, required: Key of the metadata entry.
      - `value` string, required: Value of the metadata entry.
      - `externalId` string: External ID associated with the metadata entry.
    - `attributes` AttributeEmbeddedDto[]: Attributes associated with the Variant.
      - `name` string, required: Name of the attribute.
      - `values` string[]: Values of the attribute.
      - `value` string: Value of the attribute.
    - `unitId` string: Unit this variant is sold in, and the unit its price is per. Absent means sold by the piece. Seeded units carry their UN/CEFACT Rec 20 code; merchant units are rows in measurement-units and keep their generated id. A code cannot be mistaken for one, so the two never collide.
    - `stockVariantId` string: Sibling variant of the SAME product whose stock this one draws from. Absent means this variant holds its own stock. One hop only — the target must not itself borrow.
  - `meta` object
    - `count` number: Total number of items matching the query filters
    - `skip` number: Number of items skipped
    - `limit` number: Maximum number of items returned

## Other responses

- `400`: Bad request. Returns validation errors or other request-related errors.
- `404`: The resource(s) were not found.

---

[API](https://skmtc.dev/finalpos/apis/final-pos-public-api.md) · [All operations](https://skmtc.dev/finalpos/apis/final-pos-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/finalpos/apis/final-pos-public-api/revisions/6a6842dcb479?raw)
