Does anyone know how to retrieve a contact's BusinessCardKey through the API?
thanks all, hope tax season wasn’t too fraught this year
pretty simple question!
I’m hoping to use the BusinessCard endpoint to both GET and PUT contacts’ BusinessCards but I can’t for the life of me find the contacts’ associated “BusinessCardKey” anywhere
doesn’t show up when I GET either all contacts or an individual contact with its ContactKey, so I dug a little deeper
the Expand System Query Function ($expand) indicated in the odata uri specifications is returning this error:
'{"error":{"code":"4002","message":"Query option \'Expand\' is not allowed. To allow it, set the \'AllowedQueryOptions\' property on EnableQueryAttribute or QueryValidationSettings."}}'
when I run this python GET with the requests library:
r = requests.get('https://api.karbonhq.com/v3/Contacts?$expand=BusinessCard', headers=ACCESS_HEADERS)
(where ACCESS_HEADERS is an object containing my AccessKey, Authorization, and contact-type values)
thanks again!
Mike
Page 1 / 1
Hmm, interesting. Have you tried it on organizations?
EDIT: When I GET a contact, it returns their business cards with keys in an array without the ‘$expand’ parameter.
@max thank you, your timely response!
when I run
r = requests.get(f'https://api.karbonhq.com/v3/Contacts/{CONTACT_KEY}', headers=ACCESS_HEADERS)