# List option values

> Retrieve the values of a product option.
{/* generated:versioned-pages - edit _pm-authored, not this file */}

`GET /api/product_options/{productOptionId}/option_values`

Retrieves the collection of Option Value resources.

Returns the values of a given option, ordered by `position`. Set the `Flowkiwi-Locale` header to read translatable `value` strings in a given locale.

## Headers

| Name              | Type     | Required | Description                                                                                                      |
| ----------------- | -------- | -------- | ---------------------------------------------------------------------------------------------------------------- |
| `Flowkiwi-Locale` | `string` | -        | Specifies the locale for properties that support localization. If not provided, the default locale will be used. |

## Path parameters

| Name              | Type     | Required | Description                      |
| ----------------- | -------- | -------- | -------------------------------- |
| `productOptionId` | `string` | Yes      | ProductOptionResource identifier |

## Query parameters

| Name               | Type       | Required | Description                                                                                                                                                                                                                                                                          |
| ------------------ | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `properties[]`     | `string[]` | -        | Allows you to reduce the response to contain only the properties you need. If your desired property is nested, you can address it using nested arrays. Example: properties[]={propertyName}&properties[]={anotherPropertyName}&properties[{nestedPropertyParent}][]={nestedProperty} |
| `id[]`             | `string[]` | -        | Only the items with one of these ids, each a UUID or the item IRI.                                                                                                                                                                                                                   |
| `value`            | `string`   | -        | Filter on the translated "value" field (case-insensitive partial match, uses the Flowkiwi-Locale header).                                                                                                                                                                            |
| `order[value]`     | `string`   | -        | Order by translated field "value" (uses the Flowkiwi-Locale header)                                                                                                                                                                                                                  |
| `order[createdAt]` | `string`   | -        | Option Value order[createdAt]                                                                                                                                                                                                                                                        |
| `order[updatedAt]` | `string`   | -        | Option Value order[updatedAt]                                                                                                                                                                                                                                                        |

## Response

**200** - Option Value collection

| Property     | Type             | Required | Description |
| ------------ | ---------------- | -------- | ----------- |
| `search`     | `object`         | -        |             |
| `totalItems` | `integer`        | -        |             |
| `member`     | `Option.Value[]` | Yes      |             |

## Errors

**403** - Access denied. The caller is missing one or more permissions required for this operation.

| Property             | Type               | Required | Description                                                                                                            |
| -------------------- | ------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------- |
| `@context`           | `string \| object` | -        |                                                                                                                        |
| `@id`                | `string`           | Yes      |                                                                                                                        |
| `@type`              | `string`           | Yes      |                                                                                                                        |
| `detail`             | `string`           | -        |                                                                                                                        |
| `missingPermissions` | `string[]`         | -        | Permissions that the caller is missing for this operation. Present only when the 403 is caused by a denied permission. |
| `status`             | `integer`          | -        |                                                                                                                        |
| `title`              | `string`           | -        |                                                                                                                        |
| `type`               | `string`           | -        |                                                                                                                        |

## Examples

### Example request

```bash
curl -X GET 'https://<tenant>.product-management.flowkiwi.net/api/product_options/<option_id>/option_values' \
  -H 'Authorization: Bearer {access_token}' \
  -H 'Flowkiwi-Api-Version: unstable' \
  -H 'Accept: application/ld+json'
```

### Example response

```json
{
  "member": [
    {
      "@context": "/api/contexts/Option%20Value",
      "@id": "/api/product_options/019af941-6b7c-7d8e-9f0a-2b3c4d5e6f70/option_values/9632f7c0-886a-51ea-84c5-4310834b35dd",
      "@type": "Option Value",
      "createdAt": "2024-01-01T00:00:00+00:00",
      "id": "9632f7c0-886a-51ea-84c5-4310834b35dd",
      "position": 0,
      "productOption": "/api/products/019af93e-420e-79f8-800b-6680f03dce20/product_options/019af941-6b7c-7d8e-9f0a-2b3c4d5e6f70",
      "updatedAt": "2024-01-01T00:00:00+00:00",
      "value": "Blue",
      "variants": [
        "/api/products/019af93e-420e-79f8-800b-6680f03dce20/variants/8efa43a2-193b-5183-9344-0e0e06207044",
        "/api/products/019af93e-420e-79f8-800b-6680f03dce20/variants/b0f846ae-ac7d-50f0-b7fa-2feb443ec772"
      ]
    }
  ],
  "totalItems": 1
}
```
