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.

FieldDescriptionRequiredSamples

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

email

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

{
  <span class="json-key">"questions"</span>: 
  [
    {
      <span class="json-key">"question_text"</span>: <span class="json-value">"Existing customer?"</span>,
      <span class="json-key">"answer text"</span>: <span class="json-value">"No"</span>
    },
    {
      <span class="json-key">"question_text"</span>: <span class="json-value">"commercial?"</span>,
      <span class="json-key">"answer_text"</span>: <span class="json-value">"No"</span>
    }
  ]
}

tag_values

A set of key and value pairs to hold additional information about the consumer/lead.

No

{
  <span class="json-key">"tag_values"</span>: {
    <span class="json-key">"browser"</span>: <span class="json-value">"Chrome"</span>,
    <span class="json-key">"city"</span>: <span class="json-value">"Los Angeles"</span>,
    <span class="json-key">"ip_address"</span>: <span class="json-value">"ip_address"</span>,
  }
}

* 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>

{
  <span class="json-key">"first_name"</span>: <span class="json-value">"firstname"</span>,
  <span class="json-key">"last_name"</span>: <span class="json-value">"lastname"</span>,
  <span class="json-key">"caller_number"</span>: <span class="json-value">"16106296400"</span>,
  <span class="json-key">"zip_code"</span>: <span class="json-value">"12345"</span>,
  <span class="json-key">"state"</span>: <span class="json-value">"NY"</span>,
  <span class="json-key">"email"</span>: <span class="json-value">"myemail@email.com"</span>,
  <span class="json-key">"tag_values"</span>: {
    <span class="json-key">"browser"</span>: <span class="json-value">"Chrome"</span>,
    <span class="json-key">"city"</span>: <span class="json-value">"Los Angeles"</span>,
    <span class="json-key">"ip_address"</span>: <span class="json-value">"ip_address"</span>,
    <span class="json-key">"key-4"</span>: <span class="json-value">"value-4"</span>,
    <span class="json-key">"key-5"</span>: <span class="json-value">"value-5"</span>,
    ...
    ...
  }
}

Sample With Category/Service:

POST https://apis.elocal.com/lead/v2/data_capture -H Authorization: Bearer <your api_key>

Post Body:

{
  <span class="json-key">"first_name"</span>: <span class="json-value">"firstname"</span>,
  <span class="json-key">"last_name"</span>: <span class="json-value">"lastname"</span>,
  <span class="json-key">"caller_number"</span>: <span class="json-value">"16106296400"</span>,
  <span class="json-key">"zip_code"</span>: <span class="json-value">"12345"</span>,
  <span class="json-key">"state"</span>: <span class="json-value">"NY"</span>,
  <span class="json-key">"email"</span>: <span class="json-value">"myemail@email.com"</span>,
  <span class="json-key">"category"</span>: <span class="json-value">"Plumbers"</span>,
  <span class="json-key">"service"</span>: <span class="json-value">"Drain cleaning"</span>,
  <span class="json-key">"tag_values"</span>: {
    <span class="json-key">"browser"</span>: <span class="json-value">"Chrome"</span>,
    <span class="json-key">"city"</span>: <span class="json-value">"Los Angeles"</span>,
    <span class="json-key">"ip_address"</span>: <span class="json-value">"ip_address"</span>,
    <span class="json-key">"key-4"</span>: <span class="json-value">"value-4"</span>,
    <span class="json-key">"key-5"</span>: <span class="json-value">"value-5"</span>,
    ...
    ...
  }
}

Sample Using Trusted Form Certificate:

POST https://apis.elocal.com/lead/v2/data_capture -H Authorization: Bearer <your api_key>

Post Body:

{
  <span class="json-key">"first_name"</span>: <span class="json-value">"firstname"</span>,
  <span class="json-key">"last_name"</span>: <span class="json-value">"lastname"</span>,
  <span class="json-key">"caller_number"</span>: <span class="json-value">"16106296400"</span>,
  <span class="json-key">"zip_code"</span>: <span class="json-value">"12345"</span>,
  <span class="json-key">"state"</span>: <span class="json-value">"NY"</span>,
  <span class="json-key">"email"</span>: <span class="json-value">"myemail@email.com"</span>,
  <span class="json-key">"category"</span>: <span class="json-value">"Plumbers"</span>,
  <span class="json-key">"service"</span>: <span class="json-value">"Drain cleaning"</span>,
  <span class="json-key">"trusted_form_certificate_url"</span>: <span class="json-value">"https://cert.trustedform.com/ba6b7bb12349ff1234ae2074876131dccf839434"</span>,
  <span class="json-key">"tag_values"</span>: {
    <span class="json-key">"browser"</span>: <span class="json-value">"Chrome"</span>,
    <span class="json-key">"city"</span>: <span class="json-value">"Los Angeles"</span>,
    <span class="json-key">"ip_address"</span>: <span class="json-value">"ip_address"</span>,
    <span class="json-key">"key-4"</span>: <span class="json-value">"value-4"</span>,
    <span class="json-key">"key-5"</span>: <span class="json-value">"value-5"</span>,
    ...
    ...
  }
}

Sample Using Jornaya lead ID:

POST https://apis.elocal.com/lead/v2/data_capture -H Authorization: Bearer <your api_key>

{
  <span class="json-key">"first_name"</span>: <span class="json-value">"firstname"</span>,
  <span class="json-key">"last_name"</span>: <span class="json-value">"lastname"</span>,
  <span class="json-key">"caller_number"</span>: <span class="json-value">"16106296400"</span>,
  <span class="json-key">"zip_code"</span>: <span class="json-value">"12345"</span>,
  <span class="json-key">"state"</span>: <span class="json-value">"NY"</span>,
  <span class="json-key">"email"</span>: <span class="json-value">"myemail@email.com"</span>,
  <span class="json-key">"category"</span>: <span class="json-value">"Plumbers"</span>,
  <span class="json-key">"service"</span>: <span class="json-value">"Drain cleaning"</span>,
  <span class="json-key">"jornaya_lead_id"</span>: <span class="json-value">"f741f7d0-7589-11ee-b962-0242ac120002"</span>,
  <span class="json-key">"tag_values"</span>: {
    <span class="json-key">"browser"</span>: <span class="json-value">"Chrome"</span>,
    <span class="json-key">"city"</span>: <span class="json-value">"Los Angeles"</span>,
    <span class="json-key">"ip_address"</span>: <span class="json-value">"ip_address"</span>,
    <span class="json-key">"key-4"</span>: <span class="json-value">"value-4"</span>,
    <span class="json-key">"key-5"</span>: <span class="json-value">"value-5"</span>,
    ...
    ...
  }
}

Sample With Questions:

POST https://apis.elocal.com/lead/v2/data_capture -H Authorization: Bearer <your api_key>

{
  <span class="json-key">"first_name"</span>: <span class="json-value">"firstname"</span>,
  <span class="json-key">"last_name"</span>: <span class="json-value">"lastname"</span>,
  <span class="json-key">"caller_number"</span>: <span class="json-value">"16106296400"</span>,
  <span class="json-key">"zip_code"</span>: <span class="json-value">"12345"</span>,
  <span class="json-key">"state"</span>: <span class="json-value">"NY"</span>,
  <span class="json-key">"email"</span>: <span class="json-value">"myemail@email.com"</span>,
  <span class="json-key">"category"</span>: <span class="json-value">"Plumbers"</span>,
  <span class="json-key">"service"</span>: <span class="json-value">"Drain cleaning"</span>,
  <span class="json-key">"tag_values"</span>: {
    <span class="json-key">"browser"</span>: <span class="json-value">"Chrome"</span>,
    <span class="json-key">"city"</span>: <span class="json-value">"Los Angeles"</span>,
    <span class="json-key">"ip_address"</span>: <span class="json-value">"ip_address"</span>,
    <span class="json-key">"key-4"</span>: <span class="json-value">"value-4"</span>,
    <span class="json-key">"key-5"</span>: <span class="json-value">"value-5"</span>,
    ...
    ...
  },
  <span class="json-key">"questions"</span>: [
    {
      <span class="json-key">"question_text"</span>: <span class="json-value">"Existing customer?"</span>,
      <span class="json-key">"answer text"</span>: <span class="json-value">"No"</span>
    },
    {
      <span class="json-key">"question_text"</span>: <span class="json-value">"commercial?"</span>,
      <span class="json-key">"answer_text"</span>: <span class="json-value">"No"</span>
    },
    {
      <span class="json-key">"question_text"</span>: <span class="json-value">"question-3"</span>,
      <span class="json-key">"answer_text"</span>: <span class="json-value">"answer-3"</span>
    },
    {
      <span class="json-key">"question_text"</span>: <span class="json-value">"question-4"</span>,
      <span class="json-key">"answer_text"</span>: <span class="json-value">"answer-4"</span>
    },
    ...
    ...
  ]
}

Sample response:

{
  <span class="json-key">"tag_values"</span>: {
    <span class="json-key">"browser"</span>: <span class="json-value">"chrome"</span>,
    <span class="json-key">"city"</span>: <span class="json-value">"city name"</span>,
    <span class="json-key">"ip_address"</span>: <span class="json-value">"ip_address"</span>,
  },
  <span class="json-key">"status"</span>: <span class="json-value">"Tags saved"</span>,
  <span class="json-key">"trusted_form_certificate_id"</span>: <span class="json-value">"ba1234b919b12345dae207400a1318986394d2"</span>,
  <span class="json-key">"caller_number"</span>: <span class="json-value">"+16106296400"</span>,
  <span class="json-key">"zip_code"</span>: <span class="json-value">"12345"</span>,
  <span class="json-key">"first_name"</span>: <span class="json-value">"firstname"</span>,
  <span class="json-key">"last_name"</span>: <span class="json-value">"lastname"</span>,
  <span class="json-key">"email"</span>: <span class="json-value">"myemail@email.com"</span>,
  <span class="json-key">"state"</span>: <span class="json-value">"NY"</span>,
}