# List options

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

`GET /api/products/{productId}/product_options`

Retrieves the collection of Product Option resources.

Returns the options declared on a product, ordered by `position`. Set the `Flowkiwi-Locale` header to read translatable `title` values 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                |
| ----------- | -------- | -------- | -------------------------- |
| `productId` | `string` | Yes      | ProductResource 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.                                                                                                                                                                                                                   |
| `title`            | `string`   | -        | Filter on the translated "title" field (case-insensitive partial match, uses the Flowkiwi-Locale header).                                                                                                                                                                            |
| `order[title]`     | `string`   | -        | Order by translated field "title" (uses the Flowkiwi-Locale header)                                                                                                                                                                                                                  |
| `order[createdAt]` | `string`   | -        | Product Option order[createdAt]                                                                                                                                                                                                                                                      |
| `order[updatedAt]` | `string`   | -        | Product Option order[updatedAt]                                                                                                                                                                                                                                                      |

## Response

**200** - Product Option collection

| Property     | Type               | Required | Description |
| ------------ | ------------------ | -------- | ----------- |
| `search`     | `object`           | -        |             |
| `totalItems` | `integer`          | -        |             |
| `member`     | `Product.Option[]` | 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/products/<product_id>/product_options' \
  -H 'Authorization: Bearer {access_token}' \
  -H 'Flowkiwi-Api-Version: unstable' \
  -H 'Accept: application/ld+json'
```

### Example response

```json
{
  "member": [
    {
      "@context": "/api/contexts/Product%20Option",
      "@id": "/api/products/019af93e-420e-79f8-800b-6680f03dce20/product_options/7c7848bb-a939-5408-bb25-6ea69ecdf00d",
      "@type": "Product Option",
      "createdAt": "2024-01-01T00:00:00+00:00",
      "id": "7c7848bb-a939-5408-bb25-6ea69ecdf00d",
      "position": 0,
      "product": "/api/products/019af93e-420e-79f8-800b-6680f03dce20",
      "title": "Color",
      "updatedAt": "2024-01-01T00:00:00+00:00"
    }
  ],
  "totalItems": 1
}
```
