Leads

When posting a lead to Oasis Leads using the add_lead endpoint a JSON lead object is required.

FORMAT:

  example_lead = """{
    "lead": {
    "mode": 0,
    "first_name": "john",
    "last_name": "smith",
    "ip_address": "127.0.0.1",
    "email": "js@example.com",
    "phone": "5551112222",
    "phone2": "",
    "address": "242 example ave",
    "city": "Toms River",
    "state": "New Jersey",
    "zip": "08753",
    "dob": "1990-08-01",
    "universal_leadid": "",
    "trusted_id": "",
    "source": "",

     "verticals": [1],

    "fields": [{"field_id": 119, "answer": "CHEVROLET"},{"field_id": 120, "answer": "impala"},{"field_id": 130, "answer": "2000"}]
    }

  }"""

mode:

mode decides whether the lead is for testing purposes or is a live lead. If you are testing you should leave mode as 0. In production mode should be set to 1

User Submitted Data:

all data entered by leads will be validated, sanitized, and cross referenced against the system to ensure it is a unique and qualified lead. first_name, last_name email, phone, phone2, address, city, state, zip are considered to be user submitted data.

Non-required data

Certain fields exist but are not required to contain data. ip_address, phone2, home information, dob, universal_leadid, and source can all be left empty ''

verticals:

is always an array of all verticals the lead has opted into. All required fields for a lead is decided by what verticals you send the lead as. The verticals variable should always be in array format even in the case of only 1 vertical. To determine the required fields for a specific vertical you can make an api call or you can look on the verticals tab of this site.

fields:

is an array of every field_id and corresponded answer_id by the lead to every required field set by verticals. fields should always be in array format. The array should consist of answer objects

{"field_id": 67, "answer_id": 0}

in the case of multiple answer questions the answer id should be sent as an array

{"field_id": 69, "answer_id": [1,2]}]

if the user only selects 1 answer to a multiple selection question it should be sent as an interger

{"field_id": 69, "answer_id": 1}]

if no_key is set to 1 for a certain question. for example all auto warranty fields have no key. In this case a answer object consists of a field_id and a answer as opposed to a field_id and a answer id.

{"field_id": 119, "answer": "CHEVROLET"}