unicodeCpp / Belvo API Docs / Retrieve credit metrics
Back to Collection Items
#include <CkHttpW.h>
#include <CkJsonObjectW.h>
#include <CkHttpResponseW.h>
void ChilkatSample(void)
{
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkHttpW http;
bool success;
http.put_BasicAuth(true);
http.put_Login(L"{{secretId}}");
http.put_Password(L"{{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"
// }
CkJsonObjectW json;
json.UpdateString(L"link",L"link_id");
CkHttpResponseW *resp = http.PostJson3(L"https://domain.com/api/risk-insights/",L"application/json",json);
if (http.get_LastMethodSuccess() == false) {
wprintf(L"%s\n",http.lastErrorText());
return;
}
wprintf(L"%d\n",resp->get_StatusCode());
wprintf(L"%s\n",resp->bodyStr());
delete resp;
}
Curl Command
curl -X POST
-u '{{secretId}}:{{secretPassword}}'
-d '{
"link": "link_id"
}'
https://domain.com/api/risk-insights/
Postman Collection Item JSON
{
"name": "Retrieve credit metrics",
"request": {
"method": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"link\": \"link_id\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/api/risk-insights/",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"risk-insights",
""
]
}
},
"response": [
]
}