---
title: "Update a product choice"
method: PUT
path: "/products/{product_id}/choices/{id}"
---

# Update a product choice

`PUT /products/{product_id}/choices/{id}`

## Request

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

Updates the custom price and/or cost price for a product choice.

## Path parameters

- `product_id` integer, required
- `id` integer, required

## Request body

- ProductChoiceUpdate
  - `customPrice` number, float: Custom price for this product choice.
  - `costPrice` number, float: Custom cost price for this product choice.

## Response `200`

Product choice updated successfully.

- ProductChoice
  - `id` integer: Unique ID of the product choice.
  - `set` object: The choice set.
    - `id` integer: ID of the choice set.
    - `name` string: Name of the choice set.
  - `value` object: The value from the choice set.
    - `id` integer: ID of the choice value.
    - `name` string: Name of the choice value.
  - `customPrice` number, float: Custom price for this product choice (overrides default).
  - `costPrice` number, float: Custom cost price for this product choice.

## Other responses

- `400`: Invalid request data.
- `401`: Unauthorized.
- `404`: Product or product choice not found.
- `422`: Validation error.

---

[API](https://skmtc.dev/ecommerceapi/apis/product-choices.md) - [All operations](https://skmtc.dev/ecommerceapi/apis/product-choices/llms.txt) - [OpenAPI document](https://skmtc.dev/ecommerceapi/apis/product-choices/revisions/97e33148c0e5?raw)
