Data Capture API V2:
This endpoint is designed to be used to post consumer data prior to connecting a Consumer to eLocal via phone call. The consumer data is captured by a standard set of fields or attributes, with a special field called "tag_values" that accepts freeform key and value pairs.
Field | Description | Required | Samples |
---|---|---|---|
caller_number | Consumer's phone number. | Yes | +16106296400 16106296400 6106296400 |
description | Any additional information about the lead that a provider should know about. Generally, this text should be unstructured. | No | |
first_name | Consumer's first name. | No | John |
last_name | Consumer's last name. | No | Smith |
Consumer's email address | No | johnsmith@gmail.com | |
zip_code | A 5-digit US ZIP Code or a 7-character Canada Postal Code. | No | 01233 M4C 1A1 |
state | 2 character State or Province. | No | TX QC |
address | Consumer's address | No | 123 Main St |
category | The category. * | No | 5000 Personal Injury Plumbers |
service | The service or specialization that lead is for. * | No | 3010 Automobile Accidents Drain Cleaning |
trusted_form_certificate_id | The Trusted Form Certificate Id. | No | ba1234b919b123 45dae207400a131 8986394d2 |
trusted_form_certificate_url | The Trusted Form Certificate URL | No | https://cert.trustedform.com /ba1234b919b1 2345dae207400 a1318986394d2 |
jornaya_lead_id | Jornaya LeadiD token | No | f741f7d0-7589-11ee-b962-0242ac120002 |
jornaya_lead_url | No | ||
website_url | The URL of the website where this lead was captured. | No | www.mywebsite.com |
sender_id | YOUR identifier for this request. This is entirely optional, but if specified, it will be echoed back to you in the response. | No | |
questions | A set of questions and answers that the consumer has previously answered. | No | "questions": [{ "question_text": "Existing customer?", "answer text": "No" }, { "question_text": "commercial?", "answer_text": "No" }] |
tag_values | A set of key and value pairs to hold additional information about the consumer/lead. | No | "tag_values": { "browser": "Chrome", "city": "Los Angeles", "ip_address": "ip_address" } |
* Please contact eLocal Account Manager to setup for you.
Request:
Requests are made as HTTP POST request to https://apis.elocal.com/lead/v2/data_capture.
The requests are authenticated with an API in the header. The API key to access this endpoint should be sent as Authorization (Bearer <api_key>) request header. Please contact eLocal Account Manager to get your API Key.
Samples:
Sample Basic:
POST https://apis.elocal.com/lead/v2/data_capture -H Authorization: Bearer <your api_key>
{
"first_name": "firstname",
"last_name": "lastname",
"caller_number": "16106296400",
"zip_code": "12345",
"state": "NY",
"email": "myemail@email.com",
"tag_values": {
"browser": "Chrome",
"city": "Los Angeles",
"ip_address": "ip_address",
"key-4": "value-4",
"key-5": "value-5",
...
...
}
}
Sample With Category/Service:
POST https://apis.elocal.com/lead/v2/data_capture -H Authorization: Bearer <your api_key>
Post Body:
{
"first_name": "firstname",
"last_name": "lastname",
"caller_number": "16106296400",
"zip_code": "12345",
"state": "NY",
"email": "myemail@email.com",
"category": "Plumbers",
"service": "Drain cleaning",
"tag_values": {
"browser": "Chrome",
"city": "Los Angeles",
"ip_address": "ip_address",
"key-4": "value-4",
"key-5": "value-5",
...
...
}
}
Sample Using Trusted Form Certificate:
POST https://apis.elocal.com/lead/v2/data_capture -H Authorization: Bearer <your api_key>
Post Body:
{
"first_name": "firstname",
"last_name": "lastname",
"caller_number": "16106296400",
"zip_code": "12345",
"state": "NY",
"email": "myemail@email.com",
"category": "Plumbers",
"service": "Drain cleaning",
"trusted_form_certificate_url": "https://cert.trustedform.com/ba6b7bb12349ff1234ae2074876131dccf839434",
"tag_values": {
"browser": "Chrome",
"city": "Los Angeles",
"ip_address": "ip_address",
"key-4": "value-4",
"key-5": "value-5",
...
...
}
}
Sample Using Jornaya lead ID:
POST https://apis.elocal.com/lead/v2/data_capture -H Authorization: Bearer <your api_key>
{
"first_name": "firstname",
"last_name": "lastname",
"caller_number": "16106296400",
"zip_code": "12345",
"state": "NY",
"email": "myemail@email.com",
"category": "Plumbers",
"service": "Drain cleaning",
"jornaya_lead_id": "f741f7d0-7589-11ee-b962-0242ac120002",
"tag_values": {
"browser": "Chrome",
"city": "Los Angeles",
"ip_address": "ip_address",
"key-4": "value-4",
"key-5": "value-5",
...
...
}
}
Sample With Questions:
POST https://apis.elocal.com/lead/v2/data_capture -H Authorization: Bearer <your api_key>
{
"first_name": "firstname",
"last_name": "lastname",
"caller_number": "16106296400",
"zip_code": "12345",
"state": "NY",
"email": "myemail@email.com",
"category": "Plumbers",
"service": "Drain cleaning",
"tag_values": {
"browser": "Chrome",
"city": "Los Angeles",
"ip_address": "ip_address",
"key-4": "value-4",
"key-5": "value-5",
...
...
},
"questions": [
{
"question_text": "Existing customer?",
"answer text": "No>
},
{
"question_text": "commercial?",
"answer_text": "No>
},
{
"question_text": "question-3",
"answer_text": "answer-3>
},
{
"question_text": "question-4",
"answer_text": "answer-4>
},
...
...
]
}
Sample response:
{
"tag_values": {
"browser": "chrome",
"city": "city name",
"ip_address": "ip_address",
},
"status": "Tags saved",
"trusted_form_certificate_id": "ba1234b919b12345dae207400a1318986394d2",
"caller_number": "+16106296400",
"zip_code": "12345",
"first_name": "firstname",
"last_name": "lastname",
"email": "myemail@email.com",
"state": "NY",
}