Get clients products

Check all the products matching the following parameters


Endpoint


Method URI
POST https://apiv2.keliweb.it/api/v2/keliweb/get-clients-products

Request Parameters


Parameter Type Description Required
HTTP headers: Authorization string Bearer + the token to access APIs Required
limitstart integer The offset for the returned log data (default: 0) Optional
limitnum integer The number of records to return (default: 25) Optional
serviceid integer The specific service id to obtain the details for Optional
pid integer The specific product id to obtain the details for Optional
domain string The specific domain to obtain the service details for Optional
username2 string The specific username to obtain the details for Optional

Response Parameters


Parameter Type Description
result string The result of the operation: success or error
clientid integer The specific client id searched for
serviceid integer The specific service id searched for
domain string The specific domain searched for
totalresults integer The total number of results available
startnumber integer The starting number for the returned results
numreturned integer The total number of results returned
products array The products returned matching the criteria passed

Example Request (PHP Curl)

            

                    $curl = curl_init();
                    
                    curl_setopt_array($curl, array(
                      CURLOPT_URL => "https://apiv2.keliweb.it/api/v2/keliweb/get-clients-products",
                      CURLOPT_RETURNTRANSFER => true,
                      CURLOPT_ENCODING => "",
                      CURLOPT_MAXREDIRS => 10,
                      CURLOPT_TIMEOUT => 0,
                      CURLOPT_FOLLOWLOCATION => false,
                      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                      CURLOPT_CUSTOMREQUEST => "POST",
                      CURLOPT_POSTFIELDS =>
                        http_build_query(
                                array(
                                    'clientid' => '1'
                                )
                            ),
                      CURLOPT_HTTPHEADER => array(
                        "Content-Type: multipart/form-data",
                        "X-Requested-With: XMLHttpRequest",
                        "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NhMmNlNkNjNhMmU2MmUxIzZDRkODY5MS1mMDMzLTQ1MWMtYjU-3EHc",
                      ),
                    ));
                    
                    $response = curl_exec($curl);
                    $err = curl_error($curl);
                    
                    curl_close($curl);
                    
                    if ($err) {
                      echo "cURL Error #:" . $err;
                    } else {
                      echo $response;
                    }

            
        

Example Request (jQuery AJAX)

            
                    var form = new FormData();
                    form.append("clientid", "1");

                    var settings = {
                        "async": true,
                        "crossDomain": true,
                        "url": "https://apiv2.keliweb.it/api/v2/keliweb/get-clients-products",
                        "method": "POST",
                        "headers": {
                            "Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImNjMDEwYWVlYmUzMjMxMmZlZjBiNzRjYTBhMmNlNDc2MjNjNhMMTA1MzJjODk1In0",
                            "cache-control": "no-cache",
                        },
                        "processData": false,
                        "contentType": false,
                        "mimeType": "multipart/form-data",
                        "data": form
                    }

                    $.ajax(settings).done(function (response) {
                        console.log(response);
                    });
            
        

Example Response (JSON payload)

            
                {
                    "result": "success",
                    "clientid": "1",
                    "serviceid": null,
                    "pid": null,
                    "domain": null,
                    "totalresults": "2",
                    "startnumber": 0,
                    "numreturned": 2,
                    "products": {
                        "product": [
                            {
                                "id": "1",
                                "clientid": "1",
                                "orderid": "1",
                                "pid": "1",
                                "regdate": "2015-01-01",
                                "name": "Starter",
                                "translated_name": "Starter",
                                "groupname": "Shared Hosting",
                                "translated_groupname": "Shared Hosting",
                                "domain": "demodomain.com",
                                "dedicatedip": "",
                                "serverid": "1",
                                "servername": "Saturn",
                                "serverip": "1.2.3.4",
                                "serverhostname": "saturn.example.com",
                                "suspensionreason": "",
                                "firstpaymentamount": "12.95",
                                "recurringamount": "12.95",
                                "paymentmethod": "authorize",
                                "paymentmethodname": "Credit Card",
                                "billingcycle": "Monthly",
                                "nextduedate": "2016-11-25",
                                "status": "Terminated",
                                "username": "demodoma",
                                "password": "xxxxxxxx",
                                "subscriptionid": "",
                                "promoid": "0",
                                "overideautosuspend": "",
                                "overidesuspenduntil": "0000-00-00",
                                "ns1": "",
                                "ns2": "",
                                "assignedips": "",
                                "notes": "",
                                "diskusage": "0",
                                "disklimit": "0",
                                "bwusage": "0",
                                "bwlimit": "0",
                                "lastupdate": "0000-00-00 00:00:00",
                                "customfields": {
                                    "customfield": []
                                },
                                "configoptions": {
                                    "configoption": []
                                }
                            },
                            {
                                "id": "2",
                                "clientid": "1",
                                "orderid": "2",
                                "pid": "3",
                                "regdate": "2015-05-20",
                                "name": "Plus",
                                "translated_name": "Plus",
                                "groupname": "Shared Hosting",
                                "translated_groupname": "Shared Hosting",
                                "domain": "demodomain2.net",
                                "dedicatedip": "",
                                "serverid": "2",
                                "servername": "Pluto",
                                "serverip": "2.3.4.5",
                                "serverhostname": "pluto.example.com",
                                "suspensionreason": "",
                                "firstpaymentamount": "24.95",
                                "recurringamount": "24.95",
                                "paymentmethod": "paypal",
                                "paymentmethodname": "PayPal",
                                "billingcycle": "Monthly",
                                "nextduedate": "2017-01-20",
                                "status": "Active",
                                "username": "demodom2",
                                "password": "xxxxxxxx",
                                "subscriptionid": "",
                                "promoid": "0",
                                "overideautosuspend": "",
                                "overidesuspenduntil": "0000-00-00",
                                "ns1": "",
                                "ns2": "",
                                "assignedips": "",
                                "notes": "",
                                "diskusage": "0",
                                "disklimit": "0",
                                "bwusage": "0",
                                "bwlimit": "0",
                                "lastupdate": "0000-00-00 00:00:00",
                                "customfields": {
                                    "customfield": []
                                },
                                "configoptions": {
                                    "configoption": [
                                        {
                                            "id": "1",
                                            "option": "Sample Config Option",
                                            "type": "dropdown",
                                            "value": "Selected option value"
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                }