home social networks ratings & reviews complex promotion
cart subscriptions orders add funds activate promo code
affiliate program free promotion
support information reviews
public API reseller API
log insign up

API

API

API documentation


URL


https://mrpopular.net/api/v2.php


Request


POST / GET / JSON


Response


JSON

Authorisation


username


password

Get balance


action = balance

currency = GBP


{"balance":123.456}

Get order status


action = status

order = (Order id)


{"order":{"status":"2","completed":"0","quantity":"250","date":"2018-09-27 17:34:49"}}

Get service list


action = service


{"service":{"1":{"social_network":"Facebook","service":"page likes","quality":"medium quality","id":"1","price":0.0149,"currency":"USD","min":"100"},...}}

Order status decryption


0 : Pending/Processing


1 : Processing


2 : Completed


3 : Error


4 : In queue


5 : Returned

New order


action = order

service = (Service ID)

quantity

option

comment

link


{"order":"142058"}

Errors


{"errorcode":1} USERNAME or PASSWORD is empty


{"errorcode":2} ACTION is empty


{"errorcode":3} CURRENCY is not avaliable


{"errorcode":4} ORDER is empty


{"errorcode":5} wrong ORDER


{"errorcode":6} SERVICE is empty


{"errorcode":7} QUANTITY is empty


{"errorcode":8} LINK is empty


{"errorcode":9} Not enough funds on balance


{"errorcode":10} Quantity less than minimum

Examples of php code


            class Api
            {
              //config
              public $api_url = 'https://mrpopular.net/api/v2.php'; // API URL
              public $username = ''; //your username
              public $password = ''; //your password
              public $currency = 'GBP';

                public function order($data) { // add order
                    $post = array_merge(array(
                      'username' => $this->username, 
                      'password' => $this->password,
                      'action' => 'order'
                    ), $data);
                    return json_decode($this->connect($post));
                }

                public function status($order) { // get order status
                    return json_decode($this->connect(array(
                        'username' => $this->username, 
                      'password' => $this->password,
                        'action' => 'status',
                        'order' => $order
                    )));
                }

                public function service() { // get service list
                    return json_decode($this->connect(array(
                        'username' => $this->username, 
                        'password' => $this->password,
                        'action' => 'service',
                    )));
                }

                public function balance() { // get balance
                    return json_decode($this->connect(array(
                        'username' => $this->username, 
                      'password' => $this->password,
                        'action' => 'balance',
                    )));
                }


                function connect($post) {
                    $_post = Array();
                    if (is_array($post)) {
                        foreach ($post as $name => $value) {
                            $_post[] = $name.'='.urlencode($value);
                        }
                    }

                    $ch = curl_init($this->api_url);
                    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    curl_setopt($ch, CURLOPT_POST, 1);
                    curl_setopt($ch, CURLOPT_HEADER, 0);
                    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
                    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
                    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
                    if (is_array($post)) {
                        curl_setopt($ch, CURLOPT_POSTFIELDS, join('&', $_post));
                    }
                    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)');
                    $result = curl_exec($ch);
                    if (curl_errno($ch) != 0 && empty($result)) {
                        $result = false;
                    }
                    curl_close($ch);
                    return $result;
                }
            }

            //start API
            $api = new Api();

            //check balance
            /*$balance = $api->balance();
            print_r($balance);*/

            //new order
            /*$order = $api->order(array(
              'service' => 462, 
              'quantity' => $qnty, 
              'link' => $src
            ));
            print_r($order);*/

            //order status
            /*$status = $api->status(12232);
            print_r($status);*/

            //service list
            /*$service = $api->service();
            print_r($service);*/