---
title: "Bulk update variants"
method: PATCH
path: "/v1/variants"
tags: ["Variants"]
---

# Bulk update variants

`PATCH /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`

Updates multiple variants in a single request. Each item must include an id and the fields to update. Returns per-item results.

## Request body

- BulkUpdateRequestDto
  - `items` BulkUpdateItemDto[], required: Array of items to update
    - `id` string, required: The ID of the item to update
    - `data` object, required: The data payload with fields to update
    - `clientRef` string: Client-provided reference key for correlating request items with response results
  - `options` BulkOptionsDto
    - `onError` 'continue' | 'abort': How to handle item-level failures. "continue" processes all items and reports per-item status. "abort" stops on the first failure.

## Response `200`

Bulk update completed. Each item in the results array indicates success or failure.

- object
  - `summary` BulkSummaryDto
    - `total` number, required: Total number of items in the bulk operation
    - `succeeded` number, required: Number of items that succeeded
    - `failed` number, required: Number of items that failed
    - `skipped` number: Number of items skipped (abort policy only)
  - `results` union[]
    - union
      - object
        - `index` number
        - `status` 'success'
        - `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.
        - `clientRef` string
      - BulkItemErrorResultDto
        - `index` number, required: Zero-based index of the item in the request array
        - `status` 'error', required: Result status
        - `error` BulkItemErrorDetail, required
          - `statusCode` number, required: HTTP-style status code for this item
          - `message` string, required: Error message
        - `clientRef` string: Client-provided reference key echoed back

## Other responses

- `400`: Bad request. The bulk request itself is invalid.

---

[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)
