Function returns all persons
https://rest.crmango.com/api/GetAllPersons
Bearer
varchar
Auth token
date_from
timestamp
Date from
date_to
timestamp
Date to
date_type
varchar
Date type to filter data by.
Options: created_at or updated_at
page
integer
Pagination of results (default is 0)
limit
integer
Limit of results per page (Max si 10000)
Function returns all persons
id
integer
Record ID
created_at
integer
Created date
firstname
varchar
Person firstname
lastname
varchar
Person lastname
title_before_name
varchar
Title before name
title_after_name
varchar
Title after name
work_position
varchar
Work position
phone1_prefix
varchar
Phone 1 prefix
phone_1
integer
Phone 1 number
phone2_prefix
varchar
Phone 2 prefix
phone_2
integer
Phone 2 number
email
varchar
company_name
varchar
Company name
company_id
integer
Company id
birth_number
varchar
Birth number
disabled
boolean
0 - active, 1 - disabled
updated_at
timestamp
Updated at date
permission_to_send_emails
boolean
0 - active, 1 - disabled
email_campaign_lang
varchar
Person campaign language
unsubscribe_reason_id
integer
Unsubscribe reason id
unsubscribe_reason_text
varchar
Unsubscribe reason text
vls_cols
json
All custom columns data
curl --request POST \
--url 'https://rest.crmango.com/api/GetAllPersons' \
--header 'Authorization: Bearer auth_token' \
--header 'Content-Type: application/json' \
--data '{
"date_from": "timestamp",
"date_to": "timestamp",
"date_type": "varchar",
"page": "integer",
"limit": "integer"
}'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://rest.crmango.com/api/GetAllPersons',
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 => '{
"date_from": "timestamp",
"date_to": "timestamp",
"date_type": "varchar",
"page": "integer",
"limit": "integer"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer auth_token',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
echo $response;
var data = JSON.stringify({
"date_from": "timestamp",
"date_to": "timestamp",
"date_type": "varchar",
"page": "integer",
"limit": "integer"
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rest.crmango.com/api/GetAllPersons");
xhr.setRequestHeader("Authorization", "Bearer auth_token");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);
import requests
import json
url = "https://rest.crmango.com/api/GetAllPersons"
payload = json.dumps({
"date_from": "timestamp",
"date_to": "timestamp",
"date_type": "varchar",
"page": "integer",
"limit": "integer"
})
headers = {
'Authorization': 'Bearer auth_token',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
{
"code": 200,
"response": [
{
"id": 95,
"created_at": 1630167097,
"firstname": "Patrik",
"lastname": "Ulbrik",
"title_before_name": "",
"title_after_name": "",
"work_position": "",
"phone1_prefix": "SK +421",
"phone_1": "918123456",
"phone2_prefix": "SK +421",
"phone_2": "",
"email": "",
"company_name": "CRMango s.r.o.",
"company_id": 1120,
"birth_number": "",
"disabled": 0,
"updated_at": "2024-03-10 22:14:15",
"permission_to_send_emails": 1,
"email_campaign_lang": "sk",
"unsubscribe_reason_id": 0,
"unsubscribe_reason_text": null,
"vls_cols": [
{
"data": "1,2",
"id_own_col": 1
},
{
"data": "Test Note",
"id_own_col": 2
}
]
},
{
"id": 96,
"created_at": 1630167541,
"firstname": "Jirko",
"lastname": "Kusy",
"title_before_name": "",
"title_after_name": "",
"work_position": "",
"phone1_prefix": "SK +421",
"phone_1": "724789234",
"phone2_prefix": "SK +421",
"phone_2": "",
"email": "",
"company_name": "CRMango s.r.o.",
"company_id": 388,
"birth_number": "",
"disabled": 0,
"updated_at": "2024-03-10 22:14:15",
"permission_to_send_emails": 1,
"email_campaign_lang": "sk",
"unsubscribe_reason_id": 0,
"unsubscribe_reason_text": null,
"vls_cols": [
{
"data": "1,2",
"id_own_col": 1
},
{
"data": "Test Note",
"id_own_col": 2
}
]
}
]
}
{
"code": "int",
"message": "string"
}