# Get All Portfolios

## <span style="color: rgb(2, 106, 73);">**API: getAllPortfolios**</span>

###  **Description**

This endpoint retrieves a list of all available portfolios and their corresponding names. Portfolios represent different business segments or client groups in the call center system. Each portfolio is associated with a unique code and a descriptive name.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goUsers/goAPI.php

<p class="callout info align-left">**Note:** Replace `DOMAIN` with the specific domain you want to query.</p>

### **📝 Required Parameters**  


<table border="1" id="bkmrk-parameter-value-desc" style="border-collapse: collapse; width: 100%; height: 178.667px;"><colgroup><col style="width: 23.0031%;"></col><col style="width: 20.0234%;"></col><col style="width: 56.9715%;"></col></colgroup><thead><tr style="height: 29.6px;"><td style="height: 29.6px;">**Parameter**</td><td style="height: 29.6px;">**Value**</td><td style="height: 29.6px;">**Description**</td></tr></thead><tbody><tr style="height: 29.6px;"><td style="height: 29.6px;">goAction</td><td style="height: 29.6px;">**getAllPortfolios**</td><td style="height: 29.6px;">Action to perform.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goUser</td><td style="height: 29.6px;">MyUser</td><td style="height: 29.6px;">API authorized user.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goPass</td><td style="height: 29.6px;">MyPass</td><td style="height: 29.6px;">Password for the API authorized user.</td></tr><tr style="height: 30.6667px;"><td style="height: 30.6667px;">responsetype</td><td style="height: 30.6667px;">json/xml</td><td style="height: 30.6667px;">Format of the response (`json` recommended).</td></tr></tbody></table>

**Note:** This endpoint uses body parameters for authentication instead of tokens or headers.

### **Request Examples:**

#### **GET:** 

```bash
curl -X GET "https://DOMAIN.croco-dial.net/goAPIv2/goUsers/goAPI.php?goAction=getAllPortfolios&goUser=MyUser&goPass=MyPass&responsetype=json"
```

#### **POST:**

If you prefer to send the data as form parameters:

```bash
curl -X POST "https://DOMAIN.croco-dial.net/goAPIv2/goUsers/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=getAllPortfolios" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json" 
```

####  **Example Response** 

```json
{
    "result": "success",
    "data": [
        {
            "portfolio": "ABC",
            "portfolio_name": "Alpha Business Corp"
        },
        {
            "portfolio": "XYZ",
            "portfolio_name": "Xylon Technologies"
        },
        {
            "portfolio": "MNO",
            "portfolio_name": "Monolith Solutions"
        },
        {
            "portfolio": "PQR",
            "portfolio_name": "Pioneer Realty Group"
        }
    ]
}

```