Chilkat Online Tools

phpAx / Belvo API Docs / List

Back to Collection Items

<?php

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

$http = new COM("Chilkat_9_5_0.Http");

$http->BasicAuth = 1;
$http->Login = '{{secretId}}';
$http->Password = '{{secretPassword}}';

$queryParams = new COM("Chilkat_9_5_0.JsonObject");
$queryParams->UpdateInt('page',1);

// resp is a Chilkat_9_5_0.HttpResponse
$resp = $http->QuickRequestParams('GET','https://domain.com/investments/portfolios/',$queryParams);
if ($http->LastMethodSuccess == 0) {
    print $http->LastErrorText . "\n";
    exit;
}

print $resp->StatusCode . "\n";
print $resp->BodyStr . "\n";


?>

Curl Command

curl -G -d "page=1"
	-u '{{secretId}}:{{secretPassword}}'
https://domain.com/investments/portfolios/

Postman Collection Item JSON

{
  "name": "List",
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/investments/portfolios/?page=1",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "investments",
        "portfolios",
        ""
      ],
      "query": [
        {
          "key": "page",
          "value": "1"
        }
      ]
    }
  },
  "response": [
  ]
}