> ## 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.

# [Budgets] Get Existing Budgets

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 Budgets for a Specific Advertiser**

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

When no advertiser is specified, all budgets under your portfolio will be returned.

Additional filters are available to further refine the budgets returned.

For example, to retrieve all active and non-active budgets for an advertiser, you can use the `onlyActiveCampaigns` filter. If not specified, **only active campaigns** will be returned.

<CodeGroup>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.criteo.com/legacy/marketing/v1/budgets?advertiserIds=1234&onlyActiveCampaigns=false' \
    --header 'Accept: application/json'
  ```
</CodeGroup>

 

The API will return an array of budgets associated with the advertiser ID.

<CodeGroup>
  ```json JSON theme={null}
  [
    {
      "advertiserId": 1234,
      "budgetId": 9999,
      "budgetName": "September 2020 Budget",
      "type": "Capped",
      "totalAmount": 10000,
      "remainingBudget": 500,
      "remainingBudgetUpdated": null,
      "active": true
    },
    {
      "advertiserId": 1234,
      "budgetId": 32222,
      "budgetName": "June 2020 Budget",
      "type": "Capped",
      "totalAmount": null,
      "remainingBudget": 0,
      "remainingBudgetUpdated": null,
      "active": false
    }
  ]
  ```
</CodeGroup>

A full list of all available filters is available on the [Budgets API Technical Reference](/marketing-solutions/v2020.07/reference/budgetsget) page.

     

## **Retrieving Specific Budgets**

You can also request the budget details for a specific budget ID, provided they are owned by advertisers in your portfolio.

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

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