Data Enrichment


This guide will show you how to make your first call to the RD Station API.

Learn how to integrate your application for data enrichment using the RD Station APIs.

By definition, a data enrichment application should be able to, based on some information, return other data that will be useful in the qualification of the Contact or to enable automation flows.

Another user case that can be applied is that when the external app keeps "enriching" lead data in background and, when a new information is discovered or updated, it updates lead information in RD Station.

The main process is summarized in this graphic:

Enrichment en

We’ll show you how to retrieve a single lead using the Get Lead by UUID REST API endpoint. To do this, we will walk you through the authentication process to generate an access token, which you will use to make a HTTP GET request. Then we’ll provide you with the code to make the request that returns lead information formatted as JSON.


How to generate an Authentication Token

  1. Create a trial account on this link.
  2. The authentication token must be obtained by following the steps in Authorization.


How to use webhooks as a trigger to your app

Logged into your RD Station account, follow these links: Your Account -> Integrations -> Webhooks. Click the Create Webhook button.

  1. Define a name for your integration. The idea here is to create a name that will help you identify to which tool this information is being sent.

  2. The URL of the tool that will receive the RDStation notification with the Lead information.

  3. The trigger that should activate the sending of the notification


In this case you can request that the notification be sent:

New conversion: Send to the leads tool that perform some conversion in RDStation. You can select what these conversions will be or leave them blank, in which case every lead that performs a conversion will be sent.

or

Opportunity: Send the Leads marked as opportunity (starlet). Example: Send the RD Station Contact to the tool only when it is marked as an opportunity manually or through an automation flow.


How to use automation flows as a trigger to your app

The automation flow will allow you to send the Lead according to the defined conditions of the flow itself, while through the normal integration, you can only choose to send the Lead with each conversion or when it is marked as an opportunity.

All you need is to enter in your automation flow the URL to which you want the Lead information to be sent, using the action Send Lead to URL.

This URL is the one of your system that will receive the RD Station request with the Lead notification. The request for the URL is made through a POST-type Http request.

The information will be sent as a JSON. An example of JSON is at this link.


How to create a webservice to receive a RD Station lead

The creation of the web service that will receive the RD Station leads must have the following requirements:

  • Be able to receive a JSON in RD Station format;
  • Be able to receive a specific parameter to identify which customer is sending the request (it could be a specific domain to each customer too). The complete URL with parameters should be easy for the customer to retrieve and use in RD Station Webhooks / Automation Flows;
  • Store the Lead UUID (field UUID in the Json, that is the primary key to the lead API) and the Lead Email (used as key to other applications in RD).

How to use the API to retrieve information about Contact (GET)


Returns data about a specific Contact
Request Parameter
Field Type Description
uuid Type: String The unique uuid associated to each RD Station Contact.

Response Body Parameters
Field Type Description
uuid String The unique uuid associated to each RD Station Contact.
name String Name of the Contact.
email String Email of the Contact.
bio String Notes about the Contact.
website String Website of the Contact.
job_title String Job title of the Contact.
personal_phone String Phone of the Contact.
mobile_phone String Mobile phone of the Contact.
city String City of the Contact.
state String State of the Contact.
country String Country of the Contact.
twitter String Twitter of the Contact.
facebook String Facebook of the Contact.
linkedin String Linkedin of the Contact.
tags ArrayStrings Tags of the Contact.
extra_emails ArrayStrings Extra emails of the Contact.
legal_bases ArrayObjects Legal Bases of the Contact.

Empty Fields

For empty value fields the following behavior will be adopted:

Type Description
String and Numbers attributes will not be returned
Array an empty array will be returned []
Boolean Always true or false will be returned
Example:
  {
  "name": "RD Station Developer",
  "email": "contact@example.com",
  "job_title": "Developer",
  "bio": "This documentation explains the RD Station API.",
  "website": "https://developers.rdstation.com/",
  "linkedin": "rd_station",
  "personal_phone": "+55 48 3037-3600",
  "city": "Florianópolis",
  "state": "SC",
  "country": "Brasil",
  "tags": ["developer", "rdstation", "api"],
  "extra_emails": ["contact2@example.com"],
  "cf_custom_field_2": "custom field value2",
  "legal_bases": [
    {
      "category": "communications",
      "type": "consent",
      "status": "granted"
    }
  ]
}

How to use the API to update Contact information (PATCH)


Updates the properties of a Contact.
Request Parameter
Field Type Description
uuid String The unique uuid associated to each RD Station Contact.

Request Body Default Parameters
Field Type Description
email String Email of the Contact
name String Name of the Contact
bio String Notes about the Contact.
job_title String Job title of the Contact
linkedin String Linkedin profile of the Contact
facebook String Facebook profile of the Contact
city String City of the Contact.
state String State of the Contact.
country String Country of the Contact.
twitter String Twitter profile of the Contact
personal_phone String Personal phone of the Contact
mobile_phone String Mobile phone number of the Contact
website String Website of the Contact
tags ArrayStrings Tags of the Contact
legal_bases ArrayObjects Legal Bases of the Contact.

Request Body Custom Field Parameters
When updating the custom fields information, the attribute keys should be sent as the API name of the custom field. The custom field value should also be adequated accordingly to the field's type.

Field Type Description
cf_text_field String Custom field of type text.
cf_text_area String Custom field of type text area.
cf_multiple_choice ArrayStrings Custom field of type multiple choice.
cf_radio_button String Custom field of type radio button.
cf_number Integer Custom field of type number.
cf_url String Custom field of type URL.
cf_telephone String Custom field of type telephone.
cf_email String Custom field of type email.
cf_checkbox Boolean Custom field of type checkbox.
cf_combobox String Custom field of type combobox.

Response Body Parameters
Field Type Description
uuid String The unique uuid associated to each RD Station Contact.
name String Name of the Contact.
email String Email of the Contact.
bio String Notes about the Contact.
website String Website of the Contact.
job_title String Job title of the Contact.
personal_phone String Phone of the Contact.
mobile_phone String Mobile phone of the Contact.
city String City of the Contact.
state String State of the Contact.
country String Country of the Contact.
twitter String Twitter of the Contact.
facebook String Facebook of the Contact.
linkedin String Linkedin of the Contact.
tags ArrayStrings Tags of the Contact.
extra_emails ArrayStrings Extra emails of the Contact.
legal_bases ArrayObjects Legal Bases of the Contact.

Empty Fields

For empty value fields the following behavior will be adopted:

Type Description
String and Numbers attributes will not be returned
Array an empty array will be returned []
Boolean Always true or false will be returned
Example:
  {
  "name": "RD Station Developer",
  "email": "contact@example.com",
  "job_title": "Developer",
  "bio": "This documentation explains the RD Station API.",
  "website": "https://developers.rdstation.com/",
  "linkedin": "rd_station",
  "personal_phone": "+55 48 3037-3600",
  "city": "Florianópolis",
  "state": "SC",
  "country": "Brasil",
  "tags": ["developer", "rdstation", "api"],
  "extra_emails": ["contact2@example.com"],
  "cf_custom_field_2": "custom field value2",
  "legal_bases": [
    {
      "category": "communications",
      "type": "consent",
      "status": "granted"
    }
  ]
}

Legal Bases
Field Type Valid params
category String communications
type String pre_existent_contract, consent, legitimate_interest, judicial_process, vital_interest or public_interest
status String granted or declined


How to use custom fields API to verify and create necessary fields

In order to be able to update the lead information, it is necessary that the fields that are being updated are properly created in the RD Station. If they are not created, the information can not be used for specific purposes (ex: segmentations, automation flows or lead scoring).

Ideally, at the time of the integration setup, the external system must check the existence of the necessary fields for lead enrichment in the mapped use cases and. If they are not found, the system must create these fields without the need of manual setup. These details can be checked in the custom fields section.