---
updatedAt: 2025-10-03T13:04:29.000Z
agentTools:
  projectIndex: https://docs.quable.com/llms.txt
---

# Predefined Values - Retrieve

# Retrieve Predefined Values

> 👍 **Objective**
>
> This cookbook explains two ways to find Predefined Values from Quable PIM.

<Image title="predefinedValues.png" alt="Predefined values interface" width="auto" src="https://files.readme.io/7e4bcad-predefinedValues.png" />

## Process Overview

Retrieving your list values is accomplished with a simple `GET` request to Quable PIM API. In this call, you can retrieve:

* [all list values](https://docs.quable.com/reference/retrieve-predefined-values#all-list-values)
* [list values for a specific attribute](https://docs.quable.com/reference/retrieve-predefined-values#list-values-for-a-specific-attribute)

## All list values

To retrieve *all* list values, you can send the request without any attributes.

### URL Parameters

| Field       | Value                | Description     |
| ----------- | -------------------- | --------------- |
| Endpoint    | `/predefined-values` | API v5 endpoint |
| HTTP Method | `GET`                |                 |

> 📘 **Note**
>
> This endpoint provides a paginated list of predefined values.

### Example

This example is a call to retrieve 1 page of 30 list values.

```python
import requests

url = "https://{{YOUR-PIM}}.quable.com/api/predefined-values?page=1&limit=30"

payload={}
headers = {
  'Authorization': 'Bearer READ_ACCESS_TOKEN',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
```

The JSON response from Quable PIM includes a single page of 30 list values:

```json
{
    "hydra:member": [
        {
            "attribute": {
                "id": "size"
            },
            "name": {
                "fr_FR": "Large",
                "en_US": "Large"
            },
            "dateCreated": "2021-10-06T14:33:46+00:00",
            "dateModified": "2021-10-06T14:33:46+00:00",
            "id": "attribute=color;code=L"
        },
        {
            "attribute": {
                "id": "color"
            },
            "name": {
                "fr_FR": "Rouge",
                "en_US": "Red"
            },
            "dateCreated": "2021-10-06T14:33:46+00:00",
            "dateModified": "2021-10-06T14:33:46+00:00",
            "id": "attribute=color;code=red"
        },
        {
            "attribute": {
                "id": "color"
            },
            "name": {
                "fr_FR": "Rouge",
                "en_US": "Red"
            },
            "dateCreated": "2021-10-06T14:33:46+00:00",
            "dateModified": "2021-10-06T14:33:46+00:00",
            "id": "attribute=color;code=red"
        }
    ],
    "hydra:totalItems": 3
}
```

## List values for a specific attribute

To retrieve the list values for a specific attribute, you must include the attribute's `id` (code).

### URL Parameters

| Field       | Value                                      | Description     |
| ----------- | ------------------------------------------ | --------------- |
| Endpoint    | `/predefined-values?attribute.id={{code}}` | API v5 endpoint |
| HTTP Method | `GET`                                      |                 |

> 📘 **Note**
>
> This endpoint provides a paginated list of predefined values.

### Request Body

| Field               | Value            | Type          | Description                                                                 |
| ------------------- | ---------------- | ------------- | --------------------------------------------------------------------------- |
| Accepted Attributes | `attribute.id`   | string        | The unique identifier of the predefined value.                              |
|                     | `attribute.id[]` | array(string) | Array of unique identifiers (`attribute.id`) of multiple predefined values. |
|                     | `page`           | integer       | The collection page number.                                                 |
|                     | `limit`          | integer       | The number of items per page.                                               |
|                     | `pagination`     | boolean       | If *True*, pagination is enabled. If *False*, pagination is disabled.       |

### Example

```python
import requests
import json

url = "https://{{YOUR-PIM}}.quable.com/api/predefined-values?attribute.id=color"

payload={}
headers = {
  'Authorization': 'Bearer OAUTH_ACCESS_TOKEN',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
```

The JSON response from Quable PIM includes all of the list values for the specified attribute. The following is an example of a response:

```json
{
    "hydra:member": [
        {
            "attribute": {
                "id": "color"
            },
            "name": {
                "fr_FR": "Rouge",
                "en_US": "Red"
            },
            "dateCreated": "2021-10-06T14:33:46+00:00",
            "dateModified": "2021-10-06T14:33:46+00:00",
            "id": "attribute=color;code=red"
        },
        {
            "attribute": {
                "id": "color"
            },
            "name": {
                "fr_FR": "Rouge",
                "en_US": "Red"
            },
            "dateCreated": "2021-10-06T14:33:46+00:00",
            "dateModified": "2021-10-06T14:33:46+00:00",
            "id": "attribute=color;code=red"
        }
    ],
    "hydra:totalItems": 2
}
```