Chilkat Online Tools

Node.js / Bond APIs / get kyc

Back to Collection Items

var os = require('os');
if (os.platform() == 'win32') {  
    if (os.arch() == 'ia32') {
        var chilkat = require('@chilkat/ck-node21-win-ia32');
    } else {
        var chilkat = require('@chilkat/ck-node21-win64'); 
    }
} else if (os.platform() == 'linux') {
    if (os.arch() == 'arm') {
        var chilkat = require('@chilkat/ck-node21-arm');
    } else if (os.arch() == 'x86') {
        var chilkat = require('@chilkat/ck-node21-linux32');
    } else {
        var chilkat = require('@chilkat/ck-node21-linux64');
    }
} else if (os.platform() == 'darwin') {
    if (os.arch() == 'arm64') {
        var chilkat = require('@chilkat/ck-node21-mac-m1');
    } else {
        var chilkat = require('@chilkat/ck-node21-macosx');
    }
}


function chilkatExample() {

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

    var http = new chilkat.Http();
    var success;

    var queryParams = new chilkat.JsonObject();
    queryParams.UpdateString("program_id","{{program_id}}");

    http.SetRequestHeader("Content-Type","application/json");
    http.SetRequestHeader("Authorization","{{authorization}}");
    http.SetRequestHeader("Identity","{{identity}}");

    // resp: HttpResponse
    var resp = http.QuickRequestParams("GET","https://{{environment}}.bond.tech/api/v0/customers/{{customer_id}}/verification-kyc",queryParams);
    if (http.LastMethodSuccess == false) {
        console.log(http.LastErrorText);
        return;
    }

    console.log(resp.StatusCode);
    console.log(resp.BodyStr);


}

chilkatExample();

Curl Command

curl -G -d "program_id=%7B%7Bprogram_id%7D%7D"
	-H "Content-Type: application/json"
	-H "Authorization: {{authorization}}"
	-H "Identity: {{identity}}"
https://{{environment}}.bond.tech/api/v0/customers/{{customer_id}}/verification-kyc

Postman Collection Item JSON

{
  "name": "get kyc",
  "protocolProfileBehavior": {
    "disableBodyPruning": true
  },
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Content-Type",
        "type": "text",
        "value": "application/json"
      },
      {
        "key": "Authorization",
        "type": "text",
        "value": "{{authorization}}"
      },
      {
        "key": "Identity",
        "type": "text",
        "value": "{{identity}}"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": ""
    },
    "url": {
      "raw": "https://{{environment}}.bond.tech/api/v0/customers/{{customer_id}}/verification-kyc?program_id={{program_id}}",
      "protocol": "https",
      "host": [
        "{{environment}}",
        "bond",
        "tech"
      ],
      "path": [
        "api",
        "v0",
        "customers",
        "{{customer_id}}",
        "verification-kyc"
      ],
      "query": [
        {
          "key": "program_id",
          "value": "{{program_id}}"
        }
      ]
    },
    "description": "Add Card financial Core"
  },
  "response": [
    {
      "name": "example",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "key": "Content-Type",
            "type": "text",
            "value": "application/json"
          },
          {
            "key": "Authorization",
            "type": "text",
            "value": "{{authorization}}"
          },
          {
            "key": "Identity",
            "type": "text",
            "value": "{{identity}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": ""
        },
        "url": {
          "raw": "https://{{environment}}.bond.tech/api/v0/customers/{{customer_id}}/verification-kyc?program_id={{program_id}}",
          "protocol": "https",
          "host": [
            "{{environment}}",
            "bond",
            "tech"
          ],
          "path": [
            "api",
            "v0",
            "customers",
            "{{customer_id}}",
            "verification-kyc"
          ],
          "query": [
            {
              "key": "program_id",
              "value": "{{program_id}}"
            }
          ]
        }
      },
      "_postman_previewlanguage": "json",
      "header": null,
      "cookie": [
      ],
      "body": "{\n    \"customer_id\": \"d856bf10-d4a6-4153-b8f8-2b93072dd8da\",\n    \"brand_id\": \"ce027c9c-39c6-47f4-a12d-abb543f7cf63\",\n    \"kyc_status\": \"passed\",\n    \"results\": {\n        \"ofac\": \"passed\",\n        \"bureau\": \"passed\",\n        \"email\": \"passed\",\n        \"ip\": \"passed\",\n        \"mobile\": \"passed\"\n    },\n    \"health\": {\n        \"overall\": \"SERVICE_GOOD\",\n        \"ofac\": \"SERVICE_GOOD\",\n        \"bureau\": \"SERVICE_GOOD\",\n        \"email\": \"SERVICE_GOOD\",\n        \"ip\": \"SERVICE_GOOD\",\n        \"mobile\": \"SERVICE_GOOD\"\n    },\n    \"info\": {\n        \"ofac\": {\n            \"name_matched\": false,\n            \"dob_matched\": false\n        },\n        \"bureau\": {\n            \"application_status\": \"Pass\"\n        },\n        \"phone\": {\n            \"first_name_match\": 100,\n            \"last_name_match\": 100,\n            \"address_match\": null,\n            \"service_status\": \"ACTIVE\",\n            \"service_type\": \"CONTRACT\",\n            \"service_duration\": \"UNKNOWN\",\n            \"service_ported_duration\": \"NONE\"\n        }\n    }\n}"
    }
  ]
}