Skip to Content
Docs are evolving — expect frequent updates.
ConfigMappingLookup Mapping

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

HeaderRequiredDescription
AuthorizationYesYour API key (format: YOUR_API_KEY)
Content-TypeNoOptional application/json

Query Parameters

Parameters can also be sent as a JSON request body.

ParameterTypeRequiredDescription
entityTypestringYesEntity type: "person", "company", or "opportunity"
providerstringYesExternal provider name (e.g., "affinity", "attio")
externalIdstringNoExternal system ID to look up
kruncherIdstringNoKruncher internal ID to look up

Note: At least one of externalId or kruncherId must be provided.

Code Examples

JavaScript/TypeScript

CODE
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

CODE
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

CODE
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)

CODE
{
  "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

FieldTypeDescription
entityTypestringType: person, company, or opportunity
providerstringExternal provider (affinity, attio, pipedrive, etc.)
externalIdstringExternal system ID
kruncherIdstringKruncher internal ID
createdAtstringISO 8601 timestamp when created
updatedAtstringISO 8601 timestamp when last updated
Last updated on