# Agent API

# Get Customer Informacion

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

###  **Description**

The API is responsible for retrieving the client’s information.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goAgent/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: 208.891px;"><colgroup><col style="width: 23%;"></col><col style="width: 20%;"></col><col style="width: 57%;"></col></colgroup><thead><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Parameter**</td><td style="height: 29.7969px;">**Value**</td><td style="height: 29.7969px;">**Description**</td></tr></thead><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">goAction</td><td style="height: 29.7969px;">agent\_summary\_stats</td><td style="height: 29.7969px;">Action to perform</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">goUser</td><td style="height: 29.7969px;">MyUser</td><td style="height: 29.7969px;">API authorized user.</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">goPass</td><td style="height: 29.7969px;">MyPass</td><td style="height: 29.7969px;">Authorized user's password.</td></tr><tr style="height: 30.1094px;"><td style="height: 30.1094px;">responsetype</td><td style="height: 30.1094px;">json/xml</td><td style="height: 30.1094px;">Format of the response (`json` recommended).</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">phone number</td><td style="height: 29.7969px;">Phone\_Number</td><td style="height: 29.7969px;">Insert the client’s phone number.</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">leed id</td><td style="height: 29.7969px;">leed\_id</td><td style="height: 29.7969px;">Call ID.</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/goAgent/goAPI.php?goUser=MyUser&goPass=MyPass&goAction=goGetCustomerInfo&responsetype=json&phone_number=PhoneNumer&lead_id=MyLeadID"
```

#### **POST (Form Data)**

If you prefer to send the data as form parameters:

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

####  **Example Response**

```json
{
    "result": "success",
    "lead_info": {
        "lead_id": 14246,
        "list_id": 22799125,
        "title": "Lic",
        "first_name": "Bruno",
        "middle_initial": "M",
        "last_name": "Macias",
        "phone_number": "8004321000",
        "alt_phone": "5587654321",
        "email": "brunoramiro@email.com",
        "address1": "Av. Reforma 123",
        "address2": "Interior 4B",
        "address3": "Col. Centro",
        "city": "Guadalajara",
        "state": "Jalisco",
        "province": "Ontario",
        "postal_code": "44100",
        "country_code": "MX",
        "gender": "U",
        "date_of_birth": "1825-10-23",
        "status": "PU",
        "user": "Bruno",
        "comments": "Additional information was requested."
    },
    "custom_info": null,
    "is_customer": 0
}
```

### **Data Fields per Agent**

<div class="_tableContainer_16hzy_1" id="bkmrk-field-description-us"><div class="_tableWrapper_16hzy_14 group flex w-fit flex-col-reverse align-left" tabindex="-1"><table border="1" class="w-fit min-w-(--thread-content-width) align-left" data-end="3246" data-start="1862" style="width: 51.6675%; height: 611.672px; border-collapse: collapse; border-color: rgb(206, 212, 217); border-width: 1px;"><thead><tr data-end="1927" data-start="1862" style="height: 29.7969px;"><th style="width: 50.1155%;">Field</th><th style="width: 50.1155%;">Description</th></tr></thead><tbody data-end="3246" data-start="1993"><tr data-end="2058" data-start="1993" style="height: 30.625px;"><td style="width: 50.1155%;">`result`</td><td style="width: 50.1155%;">Indicates the overall status of the API operation (e.g., `success`, `error`, `validation_failed`).</td></tr><tr data-end="2124" data-start="2059" style="height: 30.625px;"><td style="width: 50.1155%;">`lead_info`</td><td style="width: 50.1155%;">Container object that holds the structured information related to the lead.</td></tr><tr data-end="2190" data-start="2125" style="height: 30.625px;"><td style="width: 50.1155%;">`lead_id`</td><td style="width: 50.1155%;">Unique identifier assigned to the lead within the system. Used as the primary reference for subsequent operations.</td></tr><tr data-end="2256" data-start="2191" style="height: 30.625px;"><td style="width: 50.1155%;">`list_id`</td><td style="width: 50.1155%;">Identifier of the campaign or list to which the lead is assigned, enabling segmentation and organization.</td></tr><tr data-end="2322" data-start="2257" style="height: 30.625px;"><td style="width: 50.1155%;">`title`</td><td style="width: 50.1155%;">Honorific or professional title associated with the lead (e.g., Mr., Ms., Dr.).</td></tr><tr data-end="2388" data-start="2323" style="height: 30.625px;"><td style="width: 50.1155%;">`first_name`</td><td style="width: 50.1155%;">Given name of the lead.</td></tr><tr data-end="2454" data-start="2389" style="height: 30.625px;"><td style="width: 50.1155%;">`middle_initial`</td><td style="width: 50.1155%;">Middle name initial of the lead, if available.</td></tr><tr data-end="2520" data-start="2455" style="height: 30.625px;"><td style="width: 50.1155%;">`last_name`</td><td style="width: 50.1155%;">Family name or surname of the lead.</td></tr><tr data-end="2586" data-start="2521" style="height: 30.625px;"><td style="width: 50.1155%;">`phone_number`</td><td style="width: 50.1155%;">Primary contact phone number used for outbound or inbound communication.</td></tr><tr data-end="2652" data-start="2587" style="height: 30.625px;"><td style="width: 50.1155%;">`alt_phone`</td><td style="width: 50.1155%;">Secondary or alternative contact phone number.</td></tr><tr data-end="2718" data-start="2653" style="height: 30.625px;"><td style="width: 50.1155%;">`email`</td><td style="width: 50.1155%;">Email address associated with the lead for electronic correspondence.</td></tr><tr data-end="2784" data-start="2719" style="height: 30.625px;"><td style="width: 50.1155%;">`address1`</td><td style="width: 50.1155%;">Primary street address including street name and number.</td></tr><tr data-end="2850" data-start="2785" style="height: 30.625px;"><td style="width: 50.1155%;">`address2`</td><td style="width: 50.1155%;">Additional address details such as apartment, suite, or unit number.</td></tr><tr data-end="2916" data-start="2851" style="height: 30.625px;"><td style="width: 50.1155%;">`address3`</td><td style="width: 50.1155%;">Optional extended address field depending on system configuration.</td></tr><tr data-end="2982" data-start="2917" style="height: 30.625px;"><td style="width: 50.1155%;">`city`</td><td style="width: 50.1155%;">City of residence associated with the lead’s address.</td></tr><tr data-end="3048" data-start="2983" style="height: 30.625px;"><td style="width: 50.1155%;">`state`</td><td style="width: 50.1155%;">State or administrative region of the lead’s address.</td></tr><tr data-end="3114" data-start="3049" style="height: 30.625px;"><td style="width: 50.1155%;">`province`</td><td style="width: 50.1155%;">Province or territorial division, used when applicable based on country standards.</td></tr><tr data-end="3180" data-start="3115" style="height: 30.625px;"><td style="width: 50.1155%;">`postal_code`</td><td style="width: 50.1155%;">ZIP code or postal code corresponding to the lead’s address.</td></tr><tr data-end="3246" data-start="3181" style="height: 30.625px;"><td style="width: 50.1155%;">`country_code`</td><td style="width: 50.1155%;">Two-letter country code compliant with ISO 3166-1 alpha-2 standards (e.g., US, MX, CA).</td></tr><tr><td style="width: 50.1155%;">`gender`</td><td style="width: 50.1155%;">Gender classification of the lead (`M` = Male, `F` = Female, `U` = Unknown).</td></tr><tr><td style="width: 50.1155%;">`date_of_birth`</td><td style="width: 50.1155%;">Lead’s date of birth formatted according to the ISO 8601 standard (YYYY-MM-DD).</td></tr><tr><td style="width: 50.1155%;">`status`</td><td style="width: 50.1155%;">Operational status code assigned to the lead within the system, determined by internal business logic.</td></tr><tr><td style="width: 50.1155%;">`user`</td><td style="width: 50.1155%;">System user or agent currently assigned to manage the lead.</td></tr><tr><td style="width: 50.1155%;">`comments`</td><td style="width: 50.1155%;">Free-text field used to store notes or annotations related to the lead.</td></tr><tr><td style="width: 50.1155%;">`custom_info`</td><td style="width: 50.1155%;">Object containing configurable custom fields defined by the system; may return null if no custom fields are present.</td></tr><tr><td style="width: 50.1155%;">`is_customer`</td><td style="width: 50.1155%;">Logical indicator specifying whether the lead has been converted into a customer (`1`) or remains a prospect (`0`).</td></tr></tbody></table>

</div></div>