Follow

Lead API (Write)

Overview

This code allows you to make an insert of a lead into the Pabau system by making a simple POST request.

Endpoint

POST https://crm.pabau.com/OAuth2/leads/lead-curl.php

Parameters

Below are a list of the attributes you can currently pass into Pabau.

* = Required

Name Description
api_key required  Your API key.
redirect_link required  A URL to redirect to upon successful submission.
Fname required  First Name(string)
Lname required  Last Name (string)
mobile Mobile (string)
email Email(string)
lead_source This is typically a dropdown option, and you can pass in plaintext the source of the lead (Example: Facebook)
salutation  Mr,Miss etc
dob  d/m/Y
county County
country Country (string)
city City (string)
telephone telephone number (string)
mobile Mobile number (string)
address Address (string)
post_code Postal Code (string)
treatment_interest Treatment Interest (string)
opt_email Subscribe to email reminders & notifications (1/0)
opt_letters Subscribe to receive letters & mail (1/0)
opt_sms Subscribe to SMS reminders & notifications (1/0)
opt_newsletter Subscribe to receive newsletters (1/0)
custom_textarea Custom comments/notes (this is often used for the inquiry details from the client).
location_name If your business has more than one location, you can parse it here. Your location name must match the exact same name as your locations are setup within Pabau (else we will not match to the correct location ID).

 

Custom Fields

You can also parse custom field data into the lead. Follow this guide and then add the variable taken when editing the custom field into your POST.

 

Error Codes

Below are a list of error codes presented in the API logs.

* = Required

Name Description
1 Lead Successfully created.
2 Duplicate entry
3 Missing Fname
   
   
   
   
   
   
   
   
   
   
   
   
 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.