Skip to main content
POST
/
products
/
{productId}
/
variants
cURL
curl --request POST \
  --url https://api.juo.io/admin/v1/products/{productId}/variants \
  --header 'Content-Type: application/json' \
  --header 'X-Juo-Admin-Api-Key: <api-key>' \
  --data '
{
  "price": 123,
  "compareAtPrice": 123,
  "sku": "<string>",
  "barcode": "<string>",
  "optionValues": [
    {
      "optionName": "<string>",
      "name": "<string>"
    }
  ]
}
'
{
  "id": "<string>",
  "title": "<string>",
  "image": {
    "id": "<string>",
    "url": "<string>",
    "altText": "<string>"
  },
  "price": 123,
  "purchaseOptions": [
    {
      "name": "<string>",
      "price": 123,
      "interval": {
        "intervalCount": 123,
        "interval": "DAY"
      }
    }
  ],
  "product": "<string>",
  "planGroups": [
    "<string>"
  ]
}

Authorizations

X-Juo-Admin-Api-Key
string
header
required

Headers

X-Tenant-ID
string

Unique identifier of the tenant in the system (usually a store identifier)

Path Parameters

productId
string
required

The product identifier

Minimum string length: 1

Body

application/json
price
number
required
compareAtPrice
number
sku
string
barcode
string
optionValues
object[]

Response

201 - application/json

Default Response

id
string
required
Minimum string length: 1
title
string
required
Minimum string length: 1
image
object
required
price
number
required
purchaseOptions
object[]
required
product
required

This field is expandable.

Minimum string length: 1
planGroups
string[]
required

Subscription plan group IDs associated with this variant

Minimum string length: 1