---
title: "Create a product option value"
method: POST
path: "/products/{product_id}/option-values"
---

# Create a product option value

`POST /products/{product_id}/option-values`

## Request

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

Creates a new product option value for a specific product.

## Path parameters

- `product_id` integer, required

## Request body

- ProductOptionValueCreate
  - `name` string, required: The name of the product option value.
  - `option` integer, required: The ID of the product option that the product option value is assigned to.
  - `sortOrder` integer: Optional sort order of the product option value. Values with a lower number appear first.

## Response `201`

Product option value created successfully.

- ProductOptionValue
  - `id` integer: Unique identifier for the product option value.
  - `name` string: The name of the product option value.
  - `option` integer: The ID of the product option that this value is assigned to.
  - `sortOrder` integer: The sort order of the product option value. Values with a lower number appear first.

---

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