Open pdath opened 1 month ago
For anyone finding this in the future I finally figured it out. Basically to update a field (like phone number) you do something like:
paginated_contacts = manage_api_client.company.contacts.paginated(1,00) for contact in paginated_contacts.all():
if(contact.communication_items) is None:
continue;
for communication in contact.communication_items:
# Only process contact phone numbers
if(not(communication.type.name=="Direct" or communication.type.name=="Mobile" or communication.type.name=="Home")):
continue;
payload = [{"op": "replace", "path": "value", "value": "+1(813)0005555"}]
manage_api_client.company.contacts.id(contact.id).communications.id(communication.id).patch(payload)
I'm trying to update a phone number in a contact (actually lots and lots of contacts). I start out going:
paginated_contacts = manage_api_client.company.contacts.paginated(1,00) for contact in paginated_contacts.all(): ... contact.default_phone_nbr="xxx"
How do I post that update? manage_api_client.company.contacts.post(contact) contact.post() I can't seem to guess the syntax.