All calls to the Oasis Leads API is done via POSTS to specific endpoints.
EXAMPLE:
def test_add_lead():
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"}]
}
}"""
url = 'https://api.oasisleads.com/add_lead'
payload = {'vendor_id': 'your vendor_id','api_key': 'your key', "lead": example_lead}
r = requests.post(url, data=payload)
return r.text
All calls to the API will return JSON objects
{"verticals": [{"vertical_id": 1, "vertical": "Auto Warranty"}, {"vertical_id": 2, "vertical": "Auto Insurance"}, {"vertical_id": 3, "vertical": "Home Warranty"}, {"vertical_id": 4, "vertical": "Appliances"}, {"vertical_id": 5, "vertical": "Solar"}, {"vertical_id": 6, "vertical": "Home Security"}, {"vertical_id": 7, "vertical": "Identity Protection"}, {"vertical_id": 8, "vertical": "Consumer Electronics"}, {"vertical_id": 9, "vertical": "Home Security"}, {"vertical_id": 10, "vertical": "Mortgage Loans"}, {"vertical_id": 11, "vertical": "Mortgage Refinance"}, {"vertical_id": 12, "vertical": "Auto Refinance"}, {"vertical_id": 13, "vertical": "Life Insurance"}, {"vertical_id": 14, "vertical": "Home Improvement"}, {"vertical_id": 15, "vertical": "test_vertical"}, {"vertical_id": 16, "vertical": "test_vertical_2"}]}
all requests to the API require a vendor_id and the valid api_key assocciated to that vendor_id.
vendor_id
api_key
if these are missing from the POST data your api call will not work.
Below is a list of valid api calls to the Oasis Leads API. To learn more about the requirements of each call click below.
post requirments: vendor_id, api_key, lead
post requirments: vendor_id, api_key
post requirments: vendor_id, api_key,vertical_id
post requirments: vendor_id, api_key, field_id
post requirments: vendor_id, api_key
post requirments: vendor_id, api_key, make
post requirments: vendor_id, api_key
post requirments: vendor_id, api_key, state