getAllSSLOrders - gogetssl/api GitHub Wiki
URL: /orders/ssl/all
Request type: GET
The getAllOrders method returns a list of all placed orders.
Data sent by the get parameter
- auth_key - The Access Token from 'Authentication - Request Access Token' is required to submit the request
- limit - Optional. The number of orders received during selection. By default - 1000
- offset - Optional. By default - 0
- orders - an array of orders
- order_id - order id
- status - enum: 'processing','active','cancelled','expired','incomplete','unpaid','pending','rejected','revoked'
- limit - current limit
- offset - current offset
- count - count of extracted records
- success - success value (true)
<?php
define('GOGETSSL_API', 'https://my.gogetssl.com/api');
define('GOGETSSL_TOKEN', '**************************');
$curl = curl_init();
$params = http_build_query([
'auth_key' => GOGETSSL_TOKEN,
'limit' => 1000,
'offset' => 0
]);
$endpont = 'orders/all';
$url = sprintf("%s/%s?%s",
GOGETSSL_API,
$endpont,
$params
);
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
/*
PRINT:{"orders":[{"order_id":"1315727","status":"active"},{"order_id":"1315722","status":"processing"},.......], "limit":1000,"offset":0,"count":3,"success":true}
*/