Getting person_id by visitor_id

Method getobj.person_for_visitor
Description Getting person_id by visitor_id
Available to Agent, Client
Necessary components for working with the method Data API for configuration
Method weight 1 point

Request parameters

Title Type Required Description
access_token string yes Authentication session key
user_id number no Unique user identifier of the agent client on behalf of which the request is made
Is required for the agent
To obtain a list of client users, you must use the method "get.customer_users"
visitor_id number yes Unique identifier of the visitor on the site

Response parameters

Name Type Valid values Default response Description
person_id number yes Unique identifier of the Person

JSON request structure```json

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

### JSON response structure```JSON
{
    "jsonrpc": "2.0",
    "id": "number",
    "result": {
        "metadata": {

        },
        "data": {
          "person_id": "number"
        }
    }
}

JSON example response```JSON

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

List of returned errors

Look at the section "List of errors for methods with the verb getobj"