Mettre à jour un contact avec l'API Constant Contact

Met à jour un contact en remplaçant ses champs principaux : email_address, noms, job_title, company_name, birthday et anniversary omis deviennent vides, envoyez donc aussi les valeurs actuelles, obtenues via Lister les contacts. Les sous-ressources omises sont conservées, et celle qui est envoyée remplace l'actuelle.

Identifiant
constant_contact_update_contact

L'appel

POST https://connect.reportei.com/api/tools/constant_contact_update_contact/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json

{
  "customer_toolkit": "<connection UUID>",
  "arguments": {
    "contact_id": "<contact_id>",
    "update_source": "Account"
  }
}

Votre système envoie l'id de la connexion de votre client et les arguments de la tool. Les headers sont les mêmes que pour toute l'API Connect : le token de votre produit et celui de votre client.

Paramètres

Les descriptions des paramètres suivent la documentation officielle de l'app, en anglais.

ParamètreTypeObligatoireDescription
contact_idstringOuiId of the contact, from List contacts.
update_sourcestringOuiWho makes the change: Account when the account user changes it, Contact when the person asked for it. A deleted contact comes back only with Account.Valeurs : Account, Contact
email_addressobjectNonEmail address of the contact. permission_to_send explicit or implicit is allowed only when the person agreed to receive emails; unsubscribed opts the contact out, with an optional opt_out_reason.
first_namestringNonFirst name of the contact.
last_namestringNonLast name of the contact.
job_titlestringNonJob title of the contact.
company_namestringNonCompany where the contact works.
birthday_monthintegerNonMonth of the birthday, 1 to 12. Send it together with birthday_day.
birthday_dayintegerNonDay of the birthday, 1 to 31. Send it together with birthday_month.
anniversarystringNonAnniversary date, such as when the contact became a customer, as YYYY-MM-DD or MM/DD/YYYY.
phone_numbersarrayNonUp to 3 phone numbers. When sent, they replace the current ones.
street_addressesarrayNonUp to 3 street addresses, each with its kind. When sent, they replace the current ones.
list_membershipsarrayNonIds of all the lists the contact should be in, from List contact lists, up to 50. When sent, the contact leaves the lists that are not in it. The current lists come from List contacts with include list_memberships.

Connexions possibles

Votre client connecte son compte Constant Contact une seule fois, avec l'un des modes ci-dessous. La même connexion sert à toutes les tools du toolkit.

OAuth avec l'app de votre produit

Vous enregistrez une fois l'app OAuth de votre produit, avec POST /api/merchants/credentials/constant_contact, et votre client autorise le compte sur un écran de consentement. Connect renouvelle le token avant son expiration.

La réponse

En cas de succès, Connect conserve le statut et le corps de la réponse de l'app. Les erreurs HTTP renvoyées par l'app utilisent l'objet {error, api_error} ; l'authentification ou la validation peuvent échouer avant l'exécution. Le header X-Toolkit-Execution-Id identifie l'exécution enregistrée, consultable avec GET /api/tools/executions/{uuid}.

Prête pour les agents IA

L'input de cette tool est un JSON Schema, disponible via GET /api/tools/constant_contact_update_contact. Il devient la définition de tool de votre agent sans conversion.

Autres tools Constant Contact

Voir les 12 tools

Toolkits de la même catégorie

Voir les 100 toolkits

Voyez Connect appliqué à votre produit.

Essayez-le pendant 15 jours sans carte, ou présentez votre cas à notre équipe.