Skip to content

Getting a person_id by visitor_id

Getting a person_id by visitor_id

Method getobj.person_for_visitor
Description Getting a person_id by visitor_id
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".
visitor_id number yes Unique identifier of the visitor on the site

Response parameters

Name Type Required Description
person_id number yes Unique person identifier

Example request

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

Response structure

{
    "jsonrpc": "2.0",
    "id": "number",
    "result": {
        "metadata": {},
        "data": {
            "person_id": "number"
        }
    }
}

Example response

{
    "jsonrpc": "2.0",
    "id": "rMiS6Y5qt1OYo2m9S3S3z",
    "result": {
        "data": {
            "person_id": 6145241079
        }
    }
}

List of returned errors

See "Errors for getobj methods".