v1

latestOpenAPI 3.1.02026-07-241660500.9 KB

Create Variant

post/v3/productvariant

Path parameters

idinteger required

Product Id

echoboolean required

Request body

namestring required

Variant name

costinteger

Variant cost

priceinteger

Variance price

primaryIdinteger

SKU

propertiesobject

Use this if you want to add the variant to option. Within the object include this "your option name":"Your variant name"

Response

201

idinteger
dateCreatedstring
dateModifiedstring
namestring
productIdinteger
primaryIdstring
pricestring
coststring
notifyOnLowStockboolean
hideOnNoStockboolean
tagsobject[]
isActiveboolean
isDeletedboolean
onHandinteger
propertiesobject
productPropertiesobject

Example response

{
  "id": 369718,
  "dateCreated": "2020-10-15T18:43:22.377Z",
  "dateModified": "2020-10-15T18:43:22.377Z",
  "name": "variance",
  "productId": 476118,
  "primaryId": "233723872378",
  "price": "0.92",
  "cost": "8.11",
  "isActive": true
}