---
title: "Create a product extra"
method: POST
path: "/products/{product_id}/extras"
---

# Create a product extra

`POST /products/{product_id}/extras`

## Request

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

Creates a new product extra.

## Path parameters

- `product_id` integer, required

## Request body

- ProductExtraCreate
  - `name` string, required: The name of the product extra.
  - `price` number, float, required: The price for the product extra.
  - `costPrice` number, float: The cost price for the product extra. A value of -1 indicates it is not set.
  - `sku` string, required: Used to link a product extra to another product.

## Response `201`

Product extra created 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)
