GetAllPersons

Function returns all persons

POST https://rest.crmango.com/api/GetAllPersons

Authorization

1 Sent in the request headers
Bearer varchar

Auth token

Body data

5 Sent in the request body
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)

Response

22 HTTP 200

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

E-mail

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

Example request

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"
  }'
{
    "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
                }
            ]
        }
    ]
}