Chilkat Online Tools

Xojo / Belvo API Docs / Retrieve

Back to Collection Items

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

Dim http As New Chilkat.Http
Dim success As Boolean

http.BasicAuth = True
http.Login = "{{secretId}}"
http.Password = "{{secretPassword}}"

// Use this online tool to generate code from sample JSON: Generate Code to Create JSON

// The following JSON is sent in the request body.

// {
//   "link": "link_id"
// }

Dim json As New Chilkat.JsonObject
success = json.UpdateString("link","link_id")

Dim resp As Chilkat.HttpResponse
resp = http.PostJson3("https://domain.com/investments/portfolios/","application/json",json)
If (http.LastMethodSuccess = False) Then
    System.DebugLog(http.LastErrorText)
    Return
End If

System.DebugLog(Str(resp.StatusCode))
System.DebugLog(resp.BodyStr)

Curl Command

curl -X POST
	-u '{{secretId}}:{{secretPassword}}'
	-d '{
  "link": "link_id"
}'
https://domain.com/investments/portfolios/

Postman Collection Item JSON

{
  "name": "Retrieve",
  "request": {
    "method": "POST",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \"link\": \"link_id\"\n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{baseUrl}}/investments/portfolios/",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "investments",
        "portfolios",
        ""
      ]
    }
  },
  "response": [
  ]
}