Page MenuHomeDatingVIP

users.changetrackingusers (REMOVED)
Updated 1,080 Days AgoPublic

users.changetrackingusers

Description

This command has been recently REMOVED
Update users tracking_user value.
Works only for currently authorized ptnr_id (via auth)

Input Parameters
NameTypeRequiredDescription
tracking_users(array)yesold_tracking_user => new_tracking_user
Return
NameTypeDescription
resultarrayResult contains array of tracking_user(s) divided by status ('success' and 'errors')
Usage Example
<?php

//setup payment url and timeout
$payment_url = 'https://payment.dvipdev.com/api.json';
$timeout 	= 30;

$curl->setCredentials('some-token', 'some-pass');

$post_data = array(
	'cmd'	=> 'users.change.trackingusers
	'data'	=> ['tracking_users' => [125 => 14, 16806041 => 141]]
);

$response = $curl->sendPostData($payment_url, $post_data, null, $timeout);
if($response === false)
{
	//handle errors
}

//decode json to get array
$response = json_decode($response, true);
var_dump($response);

Excepted output after running this script should be:

{
        "result": {
            "code": 700,
            "status": "Action completed successfully",
            "command": "users.change.trackingusers",
            "result": {
                "success": [
                    "6806041"
                ],
                "errors": {
                    "exists": [
                        "14"
                    ],
                    "not_found": [
                        "141"
                    ]
                }
            },
            "request": {
                "cmd": "users.change.trackingusers",
                "data": {
                    "tracking_users": {
                        "125": "14",
                        "141": "6806041",
                        "1": "141"
                    }
                },
                "token": "",
                "pass": ""
            },
            "ts": 1527077858,
            "origin_ip": false,
            "errors": null
        }
    }
Last Author
aplawecki
Last Edited
May 5 2021, 07:39

Event Timeline

aplawecki edited the content of this document. (Show Details)
boris shifted this object from the Restricted Space space to the S6 Everyone space.Aug 8 2018, 08:29
aplawecki changed the title from users.changetrackingusers to users.changetrackingusers (REMOVED).May 5 2021, 07:39
aplawecki edited the content of this document. (Show Details)