POST
/v1/product-variantsCreates 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
| Name | Type | Required | Description |
|---|---|---|---|
description | string | Required | Description of the variant |
discountPercentage | number | Optional | Discount percentage applied to this variant |
externalId | string | Optional | External ID from integrated systems (Shopify, etc.) |
inventoryQuantity | integer (int32) | Required | Initial inventory quantity |
name | string | Required | Name of the variant |
options | Required | Variant options (size, color, etc.) | |
price | number (double) | Required | Price of this variant |
productId | ProductPubId | Required | Product this variant belongs to |
productImages | array<string> | Required | URLs to product images for this variant |
sku | string | Required | Stock keeping unit (SKU) identifier |
Response Data
Fields returned in the response
| Name | Type | Required | Description |
|---|---|---|---|
createdAt | string (date-time) | Required | Timestamp when the variant was created |
description | string | Required | Description of the variant |
discountPercentage | number (double) | Required | Discount percentage applied to this variant |
externalId | string | Optional | External ID from integrated systems (Shopify, etc.) |
id | ProductVariantPubId | Required | Public-facing unique identifier for the product variant |
inventoryQuantity | integer (int32) | Required | Current inventory quantity |
isActive | boolean | Required | Whether this variant is currently active |
isWaitlisted | boolean | Required | Whether this variant is currently waitlisted |
name | string | Required | Name of the variant |
options | Required | Variant options (size, color, etc.) | |
price | number (double) | Required | Price of this variant |
productImages | array<string> | Required | URLs to product images for this variant |
sku | string | Required | Stock keeping unit (SKU) identifier |
stripeId | string | Required | Stripe product variant ID for payment processing |
updatedAt | string (date-time) | Required | Timestamp when the variant was last updated |
productId | ProductPubId | Required | Public ID of the parent product (resolved from internal product_id) |
POST
/v1/product-variantsRequest
curl https://api.thesweetspot.com/v1/product-variants \
-X POST \
-H "Content-Type: application/json" \
-d '{
"description": "string",
"discountPercentage": null,
"externalId": null,
"inventoryQuantity": 0,
"name": "string",
"options": [
null
],
"price": 0,
"productId": "string",
"productImages": [
"string"
],
"sku": "string"
}'Response
{
"createdAt": "2025-12-10T18:00:54.155Z",
"description": "string",
"discountPercentage": 0,
"id": null,
"inventoryQuantity": 0,
"isActive": false,
"isWaitlisted": false,
"name": "string",
"options": null,
"price": 0,
"productImages": [
null
],
"sku": "string",
"stripeId": "string",
"updatedAt": "2025-12-10T18:00:54.155Z",
"productId": "string"
}