Variant

Create a new variant

Creates a new variant record.

post/v1/variant

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/variant
  • Auth: API key in header x-api-key

Request body

productIdstring required

Product ID of the variant.

skustring

SKU of the variant.

isOnSaleboolean

Whether the variant is on sale.

barcodestring

Barcode of the variant.

pricenumber required

Regular price of the variant in the lowest currency unit.

salePricenumber

Sale price of the variant in the lowest currency unit.

externalIdstring

External ID of the variant.

allowBackorderboolean

Whether the variant allows backorder.

notSoldInPosboolean

This variant is not sold at the POS, on top of its product. Missing = as the product.

notSoldOnlineboolean

This variant is not sold online, on top of its product. Missing = as the product.

costPricenumber

Cost price of the variant in the lowest currency unit.

imagesstring[]

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.

minorUnitsnumber

The Minor Units of the Variant to convert the amount from minor units to major units.

unitIdstring

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.

stockVariantIdstring

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.

Example request

{
  "productId": "o1p2q3r4s5t6u7v8w9x0y1z2",
  "sku": "1234567890",
  "isOnSale": true,
  "barcode": "1234567890",
  "price": 10000,
  "salePrice": 9000,
  "externalId": "1234567890",
  "allowBackorder": true,
  "costPrice": 8000,
  "images": [
    "https://example.com/image1.jpg",
    "https://example.com/image2.jpg"
  ],
  "currency": "USD",
  "minorUnits": 2,
  "metadata": [
    {
      "key": "key1",
      "value": "value1"
    },
    {
      "key": "key2",
      "value": "value2"
    }
  ],
  "attributes": [
    {
      "name": "color",
      "value": "red"
    }
  ],
  "unitId": "KGM",
  "stockVariantId": "68d4a2c7b1e35f9a4c67a101"
}

Response

The variant has been successfully created.

idstring

Unique identifier for the Variant.

createdAtstring date-time

Timestamp when the Variant was created.

updatedAtstring date-time

Timestamp when the Variant was last updated.

companyIdstring

Company ID associated with the Variant.

productIdstring

Product ID of the variant.

skustring

SKU of the variant.

isOnSaleboolean

Whether the variant is on sale.

barcodestring

Barcode of the variant.

pricenumber

Regular price of the variant in the lowest currency unit.

salePricenumber

Sale price of the variant in the lowest currency unit.

externalIdstring

External ID of the variant.

allowBackorderboolean

Whether the variant allows backorder.

notSoldInPosboolean

This variant is not sold at the POS, on top of its product. Missing = as the product.

notSoldOnlineboolean

This variant is not sold online, on top of its product. Missing = as the product.

costPricenumber

Cost price of the variant in the lowest currency unit.

imagesstring[]

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.

minorUnitsnumber

The Minor Units of the Variant to convert the amount from minor units to major units.

unitIdstring

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.

stockVariantIdstring

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.

Example response

{
  "id": "o1p2q3r4s5t6u7v8w9x0y1z2",
  "createdAt": "2025-12-07T19:31:48.436+00:00",
  "updatedAt": "2025-12-07T19:35:48.436+00:00",
  "companyId": "o1p2q3r4s5t6u7v8w9x0y1z2",
  "productId": "o1p2q3r4s5t6u7v8w9x0y1z2",
  "sku": "1234567890",
  "isOnSale": true,
  "barcode": "1234567890",
  "price": 10000,
  "salePrice": 9000,
  "externalId": "1234567890",
  "allowBackorder": true,
  "costPrice": 8000,
  "images": [
    "https://example.com/image1.jpg",
    "https://example.com/image2.jpg"
  ],
  "currency": "USD",
  "minorUnits": 2,
  "metadata": [
    {
      "key": "key1",
      "value": "value1"
    },
    {
      "key": "key2",
      "value": "value2"
    }
  ],
  "attributes": [
    {
      "name": "color",
      "value": "red"
    }
  ],
  "unitId": "KGM",
  "stockVariantId": "68d4a2c7b1e35f9a4c67a101"
}

Changes

No recorded changes to this operation across all 1 revision of this API.