Create a Contact
You can create a contact (i.e. user or lead) by adding the attributes like name, email, mobile, country, country code, address, type, Api token and more.
Sample Code / Result:
Language
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.weberr.com/CreateContact", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => array ( 'api_token' => 'NjY1YTF8UzE2MDMzNTU4MzQxZDgw', 'country_code' => '91', 'mobile' => '877888', 'email' => 'qa.sunil.pal5@gmail.com', 'lname' => 'Pal, 'fname' => 'Sunil', 'custom_attributes[attribute_1]' => 'test', 'address' => 'Kabir', 'city' => 'Mumbai', 'state' => 'Maharashtra', 'zipcode' => '400121', 'country' => 'India', 'birthdate' => '1996-12-30', 'gender' => 'male', 'is_subscribe' => '1', 'email_verify' => '1', 'type' => 'Leads', 'first_seen' => '2009-10-16 21:30:45', 'last_seen' => '2009-10-16 21:30:45', 'last_contacted' => '2009-10-16 21:30:45', 'last-heard_from' => '2009-10-16 21:30:45', 'iso_code' => 'IN', ), )); $response = curl_exec($curl); curl_close($curl); echo $response;
{ "status": "success", "message": "Record Inserted Successfully." }
Create Contact attributes
Key | R/O | Description |
---|---|---|
api_token | required | Token generated by weberr. integer |
fname | required |
First name of the contact. string |
lname | required | Last name of the contact. string |
custom_attributes[keyword] | required | First name of the customer. value |
required | Email id of the contact. string |
|
mobile | required | Mobile number of the contact. integer, 6 digits - 15 digits |
country_code | required | Country code of the contact. integer |
address | optional | Address of the contact. string |
city | optional | City name of the contact. string |
state | optional | State name of the contact. string |
zipcode | optional | Zipcode of the contact. integer |
country | optional | Country name of the contact. string |
birthdate | optional | Birthdate of the contact. integer, yyyy-mm-dd |
gender | optional | Gender of the contact. string, [male,female] |
is_subscribe | optional | Quantity of plan. Applicable only for the quantity based plans. integer, [1-subscribe, 0-not subscribe] |
email_verify | optional | Verify your email. integer, [1-subscribe, 0-not subscribe] |
type | optional | Adds coupon for the customer. string, Users Leads |
first_seen | optional | First seen of contact. integer, yyyy-mm-dd Hh:ii:ss |
last_seen | optional | Last seen of contact. integer, yyyy-mm-dd Hh:ii:ss |
last_contacted | optional | Last contacted of contact. integer, yyyy-mm-dd Hh:ii:ss |
last_heard_from | optional | Last heard from contact. integer, yyyy-mm-dd Hh:ii:ss |
iso_code | optional | iso_code of the contact. string, Country code in short |
Update a Contact
You can update an existing contact (i.e. user or lead) by using the attributes like name, email, mobile, country, country code, address, type, Api token and more.
Sample Code / Result:
Language
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.weberr.com/CreateContact", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => array ( 'api_token' => 'NjY1YTF8UzE2MDMzNTU4MzQxZDgw', 'country_code' => '91', 'mobile' => '877888', 'email' => 'qa.sunil.pal5@gmail.com', 'lname' => 'Pal, 'fname' => 'Sunil', ''custom_attributes[attribute_1]' => 'test', 'address' => 'Kabir', 'city' => 'Mumbai', 'state' => 'Maharashtra', 'zipcode' => '400121', 'country' => 'India', 'birthdate' => '1996-12-30', 'gender' => 'male', 'is_subscribe' => '1', 'email_verify' => '1', 'type' => 'Leads', 'first_seen' => '2009-10-16 21:30:45', 'last_seen' => '2009-10-16 21:30:45', 'last_contacted' => '2009-10-16 21:30:45', 'last-heard_from' => '2009-10-16 21:30:45', 'id' => 'C1603360368', ), 'iso_code' => 'IN', ), )); $response = curl_exec($curl); curl_close($curl); echo $response;
{ "status": "success", "message": "Record Updated Successfully." }
Update Contact attributes
Key | R/O | Description |
---|---|---|
id | required | Id of the contact. string |
fname | required | First name of the contact. string |
lname | required | Last name of the contact. eg. In 100 records, limit 10 , page 2 will show records from 11-20 string |
required | Email of the contact. string |
|
custom_attributes[keyword] | optional | Display records in ascending or descending order. value |
mobile | required | Mobile number of the contact. integer, 10 char |
country_code | required | Email id of the contact.integer |
address | optional | Address of the contact.string |
city | optional | City name of the contact. string |
state | optional | State name of the contact. string |
zipcode | optional | Zipcode of the contact. integer |
country | optional | Country name of the contact. string(india) |
iso_code | optional | iso_code of the contact. string Country code in short |
birthdate | optional | Birthdate of the contact. date date('y-m-d') |
gender | optional | Gender of the contact. string [male, female] |
is_subscribe | optional | 'All' will take 'AND' whereas 'ANY' will take 'OR' as condition. integer [1 - subscribe, 0 - not subscribe] |
email_verify | optional | 'All' will take 'AND' whereas 'ANY' will take 'OR' as condition. integer [0 - default, 1 - ok, 2 - not valid, 3 - not exist] |
type | optional | To filter based on No of billing cycles of the Subscription. Operators supported: is, is_not, less_than, less_than_equal, greater_than, greater_than_equal eg. filter[noOfBillingCycles][is] = 2 Users,Leads |
api_token | required | Token generated by weberr. eg. filter[noOfBillingCycles][is] = 2 string |
first_seen | optional | First seen of contact. yyyy-mm-dd H:i:s |
last_seen | optional | Last seen of contact. yyyy-mm-dd H:i:s |
last_contacted | optional | Last contacted of the contact. yyyy-mm-dd H:i:s |
last_heard_from | optional | Last heard from contact. yyyy-mm-dd H:i:s |
Delete a Contact
You can delete a contact (i.e. user or lead) by using its Api token and unique identifier (code) provided by weberr.
Sample Code / Result:
Language
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.weberr.com/CreateContact", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => array ( 'api_token' => 'NjY1YTF8UzE2MDMzNTU4MzQxZDgw', 'id' => 'C1603360368' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;
{ "status": "success", "message": "Contact Deleted Successfully." }
Delete Contact attributes
Key | R/O | Description |
---|---|---|
id | required | Id of the contact. string |
api_token | required | Token generated by weberr. string |
Show One Contact
You can show a single contact by using parameters like API token and code provided by weberr.
Sample Code / Result
Language
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.weberr.com/ShowOneContact", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => array( 'api_token' => 'NjY1YTF8UzE2MDMzNTU4MzQxZDgw', 'id' => 'C1603365398'), )); $response = curl_exec($curl); curl_close($curl); echo $response;
{ "status": "success", "data": [ { "id": "id", "fname": Sunil, "lname": Pal, "email": qa.sunil.pal6@gmail.com, "mobile": "877888", "city": "Mumbai", "birthdate": 1996-12-30 00:00:00, "state": "Maharashtra", "country": "India", "timezone": "Asia/Calcutta", "browser": null "os"null, "first_seen": 2009-10-16 21:30:45, "last_seen": 2009-10-16 21:30:45, "last_contacted": 2009-10-16 21:30:45, "last_heard_from": 2009-10-16 21:30:45, "status": "active", "crated"2020-10-22 16:46:38, "type": "Leads", "gender": "male", "zipcode": "400121", "is_subscribe": "1" }, [ { "name": "Attribute 1", "key_word": "attribute_1", "value": "Test", "field_type": "text" } ] ] }
Show One Contact attributes
Key | R/O | Description |
---|---|---|
id | required | Id of the contact. string |
api_token | required | Token generated by weberr. string |
List All Contacts
You can get a list of all contacts by using parameters like API token, limit, pages, country, mobile, and other optional parameters.
Sample Code / Result:
Language
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.weberr.com/ListContact", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => array( 'api_token' => 'NjY1YTF8UzE2MDMzNTU4MzQxZDgw'), )); $response = curl_exec($curl); curl_close($curl); echo $response;
{ "status": "success", "data": [ { "id": "id", "fname": "Sunil", "lname": "Pal", "email": "qa.sunil.pal6@gmail.com", "mobile": "877888", "city": "Mumbai", "birthdate": "1996-12-30 00:00:00", "state": "Maharashtra", "country": "India", "timezone": "Asia/Calcutta", "browser": null "os": null "first_seen":"2009-10-16 21:30:45", "last_seen": "2009-10-16 21:30:45", "last_contacted": "2009-10-16 21:30:45", "last_heard_from": "2009-10-16 21:30:45", "status": "active", "crated": "2020-10-22 16:46:38" } ] }
List all contacts attributes
Key | R/O | Description |
---|---|---|
api_token | required | Token generated by weberr. string |
limit | optional | Limits the number of records to be shown. integer |
page | optional | The page number depending upon the limit. integer |
search_value | optional | First name and Last name can be searched. string |
order_by | optional | Display records in ascending or descending order. asc, desc |
order_param | optional | You can sort created at or updated at alone as well as with order by field. created, updated,first_seen, last_seen |
fname | optional | First name of the contact. string |
lname | optional | Last name of the contact. string |
optional | Email id of the contact. string |
|
city | optional | City name of the contact. string |
state | optional | State name of the contact. string |
country | optional | Country name of the contact. string |
created | optional | To filter based on Contact Created at. yyyy-mm-dd |
first_seen | optional | First seen of contact. yyyy-mm-dd |
last_contacted | optional | Last contacted of contact. yyyy-mm-dd |
last_seen | optional | Last seen of contact. yyyy-mm-dd |
zipcode | optional | Zipcode of the contact. string |
mobile | optional | Mobile number of the contact. string |
filter[match] | optional | 'All' will take 'AND' whereas 'ANY' will take 'OR' as condition. ANY,ALL |