> ## Documentation Index
> Fetch the complete documentation index at: https://developers.criteo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# [Advertiser] View Advertiser Categories

export const EndpointBadge = ({method = "GET", children}) => {
  const METHOD_STYLES = {
    GET: {
      bg: "mint-bg-[#2AB673]"
    },
    POST: {
      bg: "mint-bg-[#3064E3]"
    },
    PUT: {
      bg: "mint-bg-[#C28C30]"
    },
    PATCH: {
      bg: "mint-bg-[#DA622B]"
    },
    DELETE: {
      bg: "mint-bg-[#CB3A32]"
    },
    API: {
      bg: "mint-bg-black"
    }
  };
  const key = method.toUpperCase();
  const styles = METHOD_STYLES[key] ?? METHOD_STYLES.API;
  return <div className="relative mt-7">
      <span className={`absolute -top-2 -left-2 z-10 ${styles.bg} text-white px-2.5 py-0.5 rounded-full text-xs font-bold tracking-wide`}>
        {key}
      </span>
      {children}
    </div>;
};

## **Retrieving All Categories at the Advertiser Level**

For the Advertiser API, all categories for the specified advertiser will be returned.

This will include multiple instances of a category if that category is associated with more than one of the advertiser's campaigns.

<EndpointBadge method="get">
  ```http theme={null}
  https://api.criteo.com/legacy/marketing/v1/advertisers/{advertiserId}/categories
  ```
</EndpointBadge>

<CodeGroup>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.criteo.com/legacy/marketing/v1/advertisers/12345/categories \
    --header 'Accept: application/json'
  ```
</CodeGroup>

 

The following is an example of what's returned:

<CodeGroup>
  ```json JSON theme={null}
  [
    {
        "categoryHashCode": 15304,
        "categoryName": "my-category",
        "catalogId": 45678,
        "catalogName": "My Catalog",
        "advertiserId": 12345,
        "advertiserName": "Advertiser A",
        "campaignId": 555555,
        "campaignName": "Lower Funnel",
        "averagePrice": 538.90,
        "numberOfProducts": 125,
        "categoryBid": { "bidValue": 0.75, "bidCurrency": "USD", "bidType": "CPC" },
        "enabled": true
    },
    {
      "categoryHashCode": 15304,
      "categoryName": "my-category",
      "catalogId": 45678,
      "catalogName": "My Catalog",
      "advertiserId": 12345,
      "advertiserName": "Advertiser A",
      "campaignId": 666666,
      "campaignName": "Prospecting",
      "averagePrice": 538.90,
      "numberOfProducts": 125,
      "categoryBid": { "bidValue": 0.1, "bidCurrency": "USD", "bidType": "CPC" },
      "enabled": true
    }
  ]
  ```
</CodeGroup>

 

## **Retrieving a Specific Category at the Advertiser Level**

To retrieve the category information related to a specific campaign, you can look up that category by its `categoryHashCode`.

<EndpointBadge method="get">
  ```http theme={null}
  https://api.criteo.com/legacy/marketing/v1/advertisers/{advertiserId}/categories/{categoryHashCode}
  ```
</EndpointBadge>

<CodeGroup>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.criteo.com/legacy/marketing/v1/advertisers/12345/categories/15304 \
    --header 'Accept: application/json'
  ```
</CodeGroup>

<CodeGroup>
  ```json JSON theme={null}
  {
      "categoryHashCode": 15304,
      "categoryName": "my-category",
      "catalogId": 45678,
      "catalogName": "My Catalog",
      "advertiserId": 12345,
      "advertiserName": "Advertiser A",
      "campaignId": 555555,
      "campaignName": "Lower Funnel",
      "averagePrice": 538.90,
      "numberOfProducts": 125,
      "categoryBid": { "bidValue": 0.75, "bidCurrency": "USD", "bidType": "CPC" },
      "enabled": true
  }
  ```
</CodeGroup>

<Warning>
  **Single Category Record Returned**

  If a category is associated with multiple campaigns, only the first record (associated with a single campaign) will be returned. To retrieve a specific category for a specific campaign, use the All Categories call above and filter the results instead.
</Warning>
