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

# Update a product extra

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

## Request

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

Updates an existing product extra.

## Path parameters

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

## Request body

- ProductExtraUpdate
  - `name` string: The updated name of the product extra.
  - `price` number, float: The updated price for the product extra.
  - `costPrice` number, float: The updated cost price for the product extra. A value of -1 indicates it is not set.
  - `sku` string: The updated SKU for the product extra.

## Response `200`

Product extra updated successfully.

- ProductExtra
  - `id` integer: Product extra ID.
  - `name` string: Product extra name.
  - `price` number, float: Product extra price.
  - `costPrice` number, float: Product extra cost price. A value of -1 indicates it is not set.
  - `sku` string: Product extra SKU. Used to link to another product.

---

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