Skip to content

Getting visitor data

Getting visitor data

Method getobj.visitor
Description Getting visitor data
Available to Agent, Client
Required components Data API for configuration
Method weight 1 point

Request parameters

Name Type Required Description
access_token string yes Authentication session key
user_id number no Unique identifier of the customer's user on whose behalf the request is made. Required for the agent. To obtain a list of customer users, call "get.customer_users".
id number yes Unique identifier of the visitor on the site

Response parameters

Name Type Description
name string Visitor name
phone_numbers array List of phone numbers
emails array List of email addresses
Visitor properties
properties array Visitor properties
id number Property ID
name string Property name
value string Value

Example request

{
    "jsonrpc": "2.0",
    "id": "number",
    "method": "getobj.visitor",
    "params": {
        "access_token": "string",
        "user_id": "number",
        "id": "number"
    }
}

Response structure

{
    "jsonrpc": "2.0",
    "id": "number",
    "result": {
        "metadata": {},
        "data": {
            "name": "string",
            "phone_numbers": [ "string" ],
            "emails": [ "string" ],
            "properties": [
                { "id": "number", "name": "string", "value": "string" }
            ]
        }
    }
}

Example response

{
    "jsonrpc": "2.0",
    "id": "rMiS6Y5qt1OYo2m9S3S3z",
    "result": {
        "data": {
            "name": "Ahmed",
            "phone_numbers": [ "971503503535", "971503503535" ],
            "emails": [ "email1@mail.ae" ],
            "properties": [
                { "id": 1, "name": "Login", "value": "login" }
            ]
        }
    }
}

List of returned errors

See "Errors for getobj methods".