UpdatePerson

Function to update person

PUT https://rest.crmango.com/api/UpdatePerson

Authorization

1 Sent in the request headers
Bearer varchar

Auth token

Body data

15 Sent in the request body
person_id integer

Person id
Reference: GetAllPersons

owner integer

User id
Reference: GetAllUsers

firstname varchar

Firstname

lastname varchar

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
Reference: GetAllStates

phone_1 integer

Phone 1

phone2_prefix varchar

Phone 2 prefix
Reference: GetAllStates

phone_2 integer

Phone 2

email varchar

E-mail

birth_number varchar

Birth number

own_cols[id_own_col] integer

Own col input id id
Reference: GetPersonOwnCols

own_cols[data] varchar

Input data

Response

2 HTTP 200

Function to update person

code integer

Return code

message varchar

Info message

Example request

curl --request PUT \
  --url 'https://rest.crmango.com/api/UpdatePerson' \
  --header 'Authorization: Bearer auth_token' \
  --header 'Content-Type: application/json' \
  --data '{
    {
        "person_id": 3482,
        "data": {
            "owner": 7,
            "firstname": "Anton",
            "lastname": "Mrkvicka",
            "title_before_name": "Ing",
            "title_after_name": "",
            "work_position": "CEO",
            "phone1_prefix": "SK +421",
            "phone_1": "911123456",
            "phone2_prefix": "CZ +420",
            "phone_2": "703456789",
            "email": "support@crmango.com",
            "birth_number": "123456/3654",
            "own_cols": [
                {
                    "id_own_col": 1,
                    "data": "This is text"
                },
                {
                    "id_own_col": 2,
                    "data": "2022-09-23"
                },
                {
                    "id_own_col": 3,
                    "data": "Apple"
                },
                {
                    "id_own_col": 5,
                    "data": "This is text"
                },
                {
                    "id_own_col": 7,
                    "data": 1
                }
            ]
        }
    }
  }'
{
    "code": 201,
    "message": "Person has been updated"
}