HTTP/1.1 200 OKContent-Type: application/jsonβBody:{"status_code": 200,"errors": {},"data": {"banners": [{"image": "<image path>"}]}}
Node
var request = require("request");βvar options = { method: 'GET',url: 'https://<domain>/<api prefix>/<version>/commerce/banners/',headers:{ 'postman-token': 'a30472a6-f896-3df1-cd32-072f8df701bb','cache-control': 'no-cache',apikey: '<apikey>' } };βrequest(options, function (error, response, body) {if (error) throw new Error(error);βconsole.log(body);});
PHP
<?phpβ$curl = curl_init();βcurl_setopt_array($curl, array(CURLOPT_PORT => "8000",CURLOPT_URL => "https://<domain>/<api prefix>/<version>/commerce/banners/",CURLOPT_RETURNTRANSFER => true,CURLOPT_ENCODING => "",CURLOPT_MAXREDIRS => 10,CURLOPT_TIMEOUT => 30,CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,CURLOPT_CUSTOMREQUEST => "GET",CURLOPT_HTTPHEADER => array("apikey: <apikey>"),));β$response = curl_exec($curl);$err = curl_error($curl);βcurl_close($curl);βif ($err) {echo "cURL Error #:" . $err;} else {echo $response;}β