Sweet Spot API

Command Palette

Search for a command to run...

POST/v1/product-variants

Creates a new product variant for a product. Use this endpoint when adding variant options (e.g., sizes, colors) to products. Requires ProductVariantWrite permission on the parent product's organization. The variant will be created with the provided details including name, price, SKU, options, and inventory quantity.

Request Body
Fields in the request body
NameTypeRequiredDescription
description
string
RequiredDescription of the variant
discountPercentage
number
OptionalDiscount percentage applied to this variant
externalId
string
OptionalExternal ID from integrated systems (Shopify, etc.)
inventoryQuantity
integer (int32)
RequiredInitial inventory quantity
name
string
RequiredName of the variant
options
RequiredVariant options (size, color, etc.)
price
number (double)
RequiredPrice of this variant
productId
ProductPubId
RequiredProduct this variant belongs to
productImages
array<string>
RequiredURLs to product images for this variant
sku
string
RequiredStock keeping unit (SKU) identifier
Response Data
Fields returned in the response
NameTypeRequiredDescription
createdAt
string (date-time)
RequiredTimestamp when the variant was created
description
string
RequiredDescription of the variant
discountPercentage
number (double)
RequiredDiscount percentage applied to this variant
externalId
string
OptionalExternal ID from integrated systems (Shopify, etc.)
id
ProductVariantPubId
RequiredPublic-facing unique identifier for the product variant
inventoryQuantity
integer (int32)
RequiredCurrent inventory quantity
isActive
boolean
RequiredWhether this variant is currently active
isWaitlisted
boolean
RequiredWhether this variant is currently waitlisted
name
string
RequiredName of the variant
options
RequiredVariant options (size, color, etc.)
price
number (double)
RequiredPrice of this variant
productImages
array<string>
RequiredURLs to product images for this variant
sku
string
RequiredStock keeping unit (SKU) identifier
stripeId
string
RequiredStripe product variant ID for payment processing
updatedAt
string (date-time)
RequiredTimestamp when the variant was last updated
productId
ProductPubId
RequiredPublic ID of the parent product (resolved from internal product_id)