Lookup Mapping
Look up an integration mapping by entity type, provider, and either external ID or Kruncher ID. Useful for checking if a mapping exists before creating a new one, or for retrieving mapping details with flexible query criteria.
Endpoint
GET https://api.kruncher.ai/api/integration/map
This is a flexible lookup endpoint that searches for a mapping by criteria. Different from the POST endpoint (which creates mappings) and the specific /map/externalid and /map/kruncherid endpoints.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Your API key (format: YOUR_API_KEY) |
Content-Type | No | Optional application/json |
Query Parameters
Parameters can also be sent as a JSON request body.
| Parameter | Type | Required | Description |
|---|---|---|---|
entityType | string | Yes | Entity type: "person", "company", or "opportunity" |
provider | string | Yes | External provider name (e.g., "affinity", "attio") |
externalId | string | No | External system ID to look up |
kruncherId | string | No | Kruncher internal ID to look up |
Note: At least one of
externalIdorkruncherIdmust be provided.
Code Examples
JavaScript/TypeScript
By External ID
const API_KEY = "YOUR_API_KEY_HERE";
const params = new URLSearchParams({
entityType: "company",
provider: "affinity",
externalId: "ext-123"
});
const response = await fetch(
`https://api.kruncher.ai/api/integration/map?${params}`,
{
headers: {
"Authorization": `${API_KEY}`
}
}
);
const result = await response.json();
console.log("Mapping:", result.data);Result: Returns the mapping matching the entity type, provider, and external ID.
Python
By External ID
import requests
API_KEY = "YOUR_API_KEY_HERE"
url = "https://api.kruncher.ai/api/integration/map"
headers = {
"Authorization": f"{API_KEY}"
}
params = {
"entityType": "company",
"provider": "affinity",
"externalId": "ext-123"
}
response = requests.get(url, headers=headers, params=params)
result = response.json()
print(f"Mapping: {result['data']}")Result: Returns the mapping matching the entity type, provider, and external ID.
cURL
By External ID
curl -s -X GET "https://api.kruncher.ai/api/integration/map?entityType=company&provider=affinity&externalId=ext-123" \
-H "Authorization: YOUR_API_KEY_HERE" \
| jq '.data'Response
Success Response (200 OK)
{
"metadata": {
"code": "1000",
"title": "Successful",
"description": ""
},
"data": {
"entityType": "company",
"provider": "affinity",
"externalId": "ext-123",
"kruncherId": "proj_abc123",
"createdAt": "2024-01-10T14:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
}Response Fields
| Field | Type | Description |
|---|---|---|
entityType | string | Type: person, company, or opportunity |
provider | string | External provider (affinity, attio, pipedrive, etc.) |
externalId | string | External system ID |
kruncherId | string | Kruncher internal ID |
createdAt | string | ISO 8601 timestamp when created |
updatedAt | string | ISO 8601 timestamp when last updated |
Related Endpoints
- Create Mapping - Create a new mapping
- Get All Mappings - List all mappings
- Get by External ID - Look up by external ID only
Last updated on