Create a new product variation

Creates a new product variation for a specified product.

post/products/{product_id}/variations

Request

  • Base URL
    https://api.ecommerceapi.uk/v1
  • URL
    https://api.ecommerceapi.uk/v1/products/{product_id}/variations
  • Auth
    HTTP basic

Path parameters

product_idinteger required

The unique identifier of the product.

Request body

pricenumber float

The individual price for the product variation.

costPricenumber float

The cost price for the product variation. A value of -1 indicates it is not set.

salePricenumber float

The sale price for the product variation.

rewardPointsnumber float

The reward points earned from purchasing the variation.

skustring

The SKU code for the product variation.

gtinstring

The global trade item number for the product variation.

mpnstring

The manufacturer's part number for the product variation.

weightnumber float

The weight of the product variation.

stockinteger

The stock quantity for the product variation.

imageinteger

The image index for the product variation.

valuesinteger[] required

List of option value IDs assigned to the variation.

Response

Product variation created successfully.

idinteger

Unique identifier for the product variation.

pricenumber float

The individual price for the product variation.

costPricenumber float

The cost price for the product variation.

salePricenumber float

The sale price for the product variation.

rewardPointsnumber float

The reward points earned from purchasing the variation.

skustring

The SKU code for the product variation.

gtinstring

The global trade item number for the product variation.

mpnstring

The manufacturer's part number for the product variation.

weightnumber float

The weight of the product variation.

stockinteger

The stock quantity for the product variation.

imageinteger

The image index for the product variation.

urlstring

The URL for the product variation.

Changes

No recorded changes to this operation across all 1 revision of this API.