Onpipeline offers an API to capture leads (Leads IN) from your lead sources (business partners, marketing companies, etc.). The API creates leads based on the data provided in the JSON body and it saves you from writing any code to handle duplicate records.
Access to this resource is grant to “Lead Sources” through unique API Tokens. Please be advised that before they can connect to API their client IP address(es) shall be whitelisted.
If you are an Administrator, you can create Lead Sources (and tokens) in the settings area of your account.
The API Token shall be passed with each request in the “Authorization” Header.
Authorization: {Token}
Partners (lead sources) will post a json object to the API endpoint:
curl "https://api.onpipeline.com/Leads"
-H "Authorization: your-token-here"
-d '{ "FirstName": "Mike", "LastName": "Smith", "OrgName": "Company Inc.",
"Email":[ { "Address":"mike@company.com", "Type":"work" } ],
"Phone":[ { "Number":"111111111111", "Type":"work" } ],
"Extra":[ { "ID":"1111111", "Value":"Managing Director" } ]
and will receive a response like this (if positive)
{
"Header":{ "Status":"Created", "Code":"201", "Time":"0000-00-00 00:00:00", "Endpoint":"Leadsin" }, "Data":{ "LeadID":"123456789HSY7584306" } }
A valid code – for a valid lead – will always be 201.
A duplicate will be marked with a 409 code.
Errors and duplicates will be notified in realtime by the API. For example:
{ “Error”: { “Code”: “401”, “Message”: “Invalid Token”, “Time”: “2018-05-27 15:53:59”, “IP”: “127.0.0.1” } }