Products
Create product variant
Creates a variant of a product. Creating a variant for a physical or service product requires that the product already has at least one attribute.
post/v2/commerce/products/{productId}/variants
Request
- Base URLhttps://api.squarespace.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
productIdstring required
Headers
Authorizationstring required
API key or OAuth access token
User-Agentstring required
User Agent
Request body
Example request
{
"gtin": "01234567890128",
"mpn": "MPN-1234",
"pricing": {
"basePrice": {
"value": 49.99
},
"salePrice": {
"value": 49.99
}
}
}Response
The ProductVariant was created successfully.
Example response
{
"pricing": {
"basePrice": {
"value": 49.99
},
"salePrice": {
"value": 49.99
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.