Get Contacts
Retrieve a list of contacts associated with your user domain
Get Contacts
This API allows you to retrieve a list of contacts associated with a specific user domain, based on the provided API key.
Endpoint
GET https://zap.pandaidx.com/api/getContacts?api_key={{api_key}}Authentication
You must provide an API key as a query parameter to authenticate the request. The key is used to identify and authorize the user making the request.
Query Parameters
api_key (required): The API key for authenticating the request. You can obtain this from the Panda IDX dashboard.
Request Examples
curl -X GET "https://zap.pandaidx.com/api/getContacts?api_key=YOUR_API_KEY"// Example Request using Node.js (Fetch API)
const fetch = require("node-fetch");
const API_KEY = "your_api_key_here";
const url = `https://zap.pandaidx.com/api/getContacts?api_key=${API_KEY}`;
fetch(url, {
method: "GET",
headers: {
"Content-Type": "application/json",
},
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));import requests
API_KEY = "your_api_key_here"
url = f"https://zap.pandaidx.com/api/getContacts?api_key={API_KEY}"
response = requests.get(url, headers={"Content-Type": "application/json"})
contacts = response.json()
print(contacts)Response
The API returns a JSON array of contact objects. Each contact contains the following fields:
Response Fields
| Field | Type | Description |
|---|---|---|
id | String | The unique identifier of the contact. |
name | String | The full name of the contact. |
email | String | The email address of the contact. |
phones | Array | An array of phone numbers associated with the contact. |
createdAt | String | The date and time when the contact was created (ISO 8601 format). |
stage | String | The current stage of the contact (e.g., lead, client). |
source | String | The source of the contact (e.g., referral, signup form). |
image | String | The URL to the contact's profile image, if available. |
spokenLanguages | Array | A list of languages spoken by the contact. |
address | String | The full address of the contact. |
streetAddress | String | The street address of the contact. |
notes | String | Notes about the contact (e.g., follow-up details). |
links | Object | An object containing social media and other links. |
registration | Object | An object containing the registration details. |
Example Response
[
{
"id": "66955f1f93c1be2dd9deb221",
"name": "Florencia Hernandez",
"email": "florencia@gmail.com",
"phones": ["342-121-1917"],
"createdAt": "2024-07-15T17:40:47.768Z",
"stage": "active-client",
"source": "signup-form",
"image": "https://example.com/images/florencia.jpg",
"spokenLanguages": ["English", "Spanish"],
"address": "123 Main St, Miami, FL",
"streetAddress": "123 Main St",
"notes": "Interested in premium plan",
"links": {
"facebook": "https://facebook.com/florencia.hernandez",
"twitter": "https://twitter.com/florenciaH",
"instagram": "https://instagram.com/florenciaH",
"linkedin": "https://linkedin.com/in/florencia-hernandez",
"youtube": "https://youtube.com/channel/UCflorencia",
"website": "https://florencia.com",
"whatsapp": "https://wa.me/13421211917",
"tiktok": "https://tiktok.com/@florenciaH"
},
"registration": {
"date": "2024-07-01"
}
}
]Errors
In the case of an error, the API will return an appropriate HTTP status code and an error message.
Error Codes
| HTTP Code | Error Type | Description |
|---|---|---|
404 | NotFoundError | No contacts found for the given domain or API key. |
500 | ServerError | An internal server error occurred. |
Example Error Response
{
"error": "NotFoundError",
"message": "Contacts not found"
}Notes
- Ensure that the API key provided is valid and belongs to an authenticated user.
- The returned contacts are filtered based on the user domain associated with the API key.
- For pagination or filtering options, contact support for advanced API features.