Skip to content

Getting all visitors with their contact information by person_id

Getting all visitors with their contact information by person_id

Method get.person_visitors
Description Getting all visitors with their contact information by person_id
Who has access Agent, Client
Components required to work with the method Configuration Data API
Weight in points 0

Parameters of a request

Title Type Required Description
access_token string yes Authentication session key
user_id number no Unique ID of an agent's customer user who makes request
Is required for agent
To access a list of customer users, use the method "get.customer_users"
person_id number yes Person unique ID

Parameters of a reply

Title Type Valid value Default reply Description
person_id number yes Person unique ID
visitor_id number yes Visitor unique ID
name string no Visitor full name
phones array no List of visitor phone numbers
emails array no Email addresses of the visitor
company string no Ad campaign of the visitor
commentary string no Comment

JSON request structure

{
    "jsonrpc":"2.0",
    "id":"number",
    "method":"get.person_visitors",
    "params":{
        "access_token":"string",
        "user_id":"number",
        "person_id": "number"
    }
}

JSON reply structure

{
    "jsonrpc": "2.0",
    "id": "number",
    "result": {
        "metadata": {

        },
        "data": [
            {
              "person_id": "number",
              "visitor_id": "number",
              "name": "string",
              "emails":[
                         "email"
                       ],
              "phones":[
                         "phone"
                       ],
              "company": "string",
              "commentary": "string",
            }
        ]
    }
}

JSON reply sample

{
    "jsonrpc": "2.0",
    "id": "rMiS6Y5qt1OYo2m9S3S3z",
    "result": {
        "data": [
            {
                "name": "Test",
                "emails": [
                    "test@1.me",
                    "test@2.com"
                ],
                "phones": [
                    "213123123213",
                    "43534534543"
                ],
                "company": "JSC Flower",
                "person_id": 6145241079,
                "commentary": "Comment",
                "visitor_id": 6152759362
            },
            {
                "name": "346356",
                "emails": [
                    "qere4@fsdfsd.ry"
                ],
                "phones": [
                    "213123123213"
                ],
                "company": null,
                "person_id": 6145241079,
                "commentary": null,
                "visitor_id": 6152759377
            }
        ]
    }
}

List of returning errors

Refer to the section "List of errors for methods with the verb get"