Assign a choice to a product

Assigns a choice (set + value) to a product, with optional custom price and cost price.

post/products/{product_id}/choices

Request

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

Path parameters

product_idinteger required

ID of the product.

Request body

setinteger required

ID of the choice set.

valueinteger required

ID of the choice value.

customPricenumber float

Custom price for this product choice (optional).

costPricenumber float

Custom cost price for this product choice (optional).

Response

Product choice assigned successfully.

idinteger

Unique ID of the product choice.

customPricenumber float

Custom price for this product choice (overrides default).

costPricenumber float

Custom cost price for this product choice.

Changes

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