Skip to main content
POST
/
v1
/
product_variants
/
{entity_id}
Create Product Variant
curl --request POST \
  --url https://clientapi.retailgrid.io/v1/product_variants/{entity_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "product_id": "<string>",
  "sku": "<string>",
  "variant_name": "<string>",
  "size": "<string>",
  "color": "<string>",
  "uom": "<string>",
  "barcode": "<string>",
  "is_active": true,
  "stock": 123,
  "price": 123,
  "regular_price": 123,
  "rrp": 123,
  "unit_cost": 123,
  "currency": "<string>",
  "price_effective_date": "2023-12-25",
  "cost_effective_date": "2023-12-25"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "product_id": "<string>",
  "sku": "<string>",
  "variant_name": "<string>",
  "size": "<string>",
  "color": "<string>",
  "uom": "<string>",
  "barcode": "<string>",
  "is_active": true,
  "stock": "<string>",
  "price": "<string>",
  "regular_price": "<string>",
  "rrp": "<string>",
  "unit_cost": "<string>",
  "currency": "<string>",
  "price_effective_date": "2023-12-25",
  "cost_effective_date": "2023-12-25"
}

Documentation Index

Fetch the complete documentation index at: https://docs.retailgrid.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Retailgrid API keys are prefixed with rg_live_. Pass them as Authorization: Bearer <key>.

Path Parameters

entity_id
string<uuid>
required

Body

application/json
product_id
string
required
sku
string
required
variant_name
string | null
size
string | null
color
string | null
uom
string | null
barcode
string | null
is_active
boolean | null
stock
price
regular_price
rrp
unit_cost
currency
string | null
price_effective_date
string<date> | null
cost_effective_date
string<date> | null

Response

Successful Response

id
string<uuid>
required
product_id
string
required
sku
string
required
variant_name
string | null
size
string | null
color
string | null
uom
string | null
barcode
string | null
is_active
boolean | null
stock
string | null
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
price
string | null
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
regular_price
string | null
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
rrp
string | null
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
unit_cost
string | null
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
currency
string | null
price_effective_date
string<date> | null
cost_effective_date
string<date> | null