# Catalogs

## Prerequisites

* `access_token` from [headless-api-authentication](https://dev.ucommerce.net/readme/headless/headless-api-authentication "mention")
* `cultureCode`, e.g. `en-US` (string)
* `priceGroupId` from the cart or from [price-groups](https://dev.ucommerce.net/readme/headless/reference/price-groups "mention")

## Get Catalogs

### Optional Parameters

* `maxItems`, limits the number of results returned. in [pagination](https://dev.ucommerce.net/readme/headless/pagination "mention")
* `nextPagingToken`, required to fetch the next page. Read more in [pagination](https://dev.ucommerce.net/readme/headless/pagination "mention")

### Request

<pre class="language-bash"><code class="lang-bash">curl -D- -X GET &#x3C;base_url>/api/v1/catalogs?cultureCode=&#x3C;cultureCode>&#x26;priceGroupId=&#x3C;priceGroupId>&#x26;maxItems=&#x3C;maxItems>&#x26;nextPagingToken=&#x3C;nextPagingToken> \
<strong>    -H 'Authorization: Bearer &#x3C;ACCESS_TOKEN>'
</strong>    -H 'Content-Type: application/json' \
</code></pre>

### Response

```json
{
    "nextPagingToken": "{pagingToken | null}",
    "catalogs": [
        {
            "id": "{catalogId}",
            "name": "{catalogName}"
        }
    ]
}
```

## Error Handling

| Error              | Description                                      |
| ------------------ | ------------------------------------------------ |
| BadRequest (400)   | Invalid Price Group; Invalid cultureCode.        |
| Unauthorized (401) | The token is expired.                            |
| Forbidden (403)    | The token does not have access to this endpoint. |

Error Response Example

```json
{
"errors":
    [
        {
            "error-description": "Invalid Price Group.",
            "error": "BadRequest"
        }
    ]
}
```

## Related Articles

{% content-ref url="../error-handling" %}
[error-handling](https://dev.ucommerce.net/readme/headless/error-handling)
{% endcontent-ref %}
