How to get real-time API from the browser when a contact is updated?

Updated on January 15, 2020 09:10PM by Admin

API has been a great tool to manage the workflow. You can add the required data in the workflow and it will get updated in the database automatically. You need not navigate to multiple websites and fill a number of forms.

You can use the browser to get a real-time API when a contact is updated. You can use the params(attribute information) to fill out the contact details and get the values updated in an existing contact in Apptivo without logging into Apptivo.

  • Go to Contacts App → select a contact whose values have to be updated.
  • Now add the required information and select Save.
  • Once the contact is created, open the Inspect tab.
Inspect Tab

  • In the Inspect tab, navigate to contacts?a=update. You will see the information related to it in the Headers section of the Inspect tab.
  • In the Headers tab, you can get the API for updating a contact from the Request URL.
Headers Section

  • You can get the information related to the attributes i.e params from Form Data → Contact Data of the Headers section.
Form Data

  • Once the required data from the Contacts app is acquired, it is mandatory to fetch the API Access key.
  • Go to the Business Settings section from the User Guide and navigate to API Access.
API Access

  • Here, you can get the API Key and Access Key.
  • Now, the necessary data is available. Develop the coding for a contact whose value has to be updated and run it in your browser with changed values for the attributes.
Output in Browser

  • Here, the contact’s status has been updated to Active. The existing contact will be updated automatically in the Contacts App.
Contact Updated

Bad Practices

  • Running the code in the browser with any misspelled words or missing terms will result in an error.
Status:Failure

  • The code runs in the browser only if the browser has software to support the code like the JSON view or else you will see the code in the browser.
Incorrect Ouput