Chilkat Online Tools

C / Bond APIs / get card all cards

Back to Collection Items

#include <C_CkHttp.h>
#include <C_CkStringBuilder.h>

void ChilkatSample(void)
    {
    HCkHttp http;
    BOOL success;
    HCkStringBuilder sbResponseBody;

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

    http = CkHttp_Create();

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

    sbResponseBody = CkStringBuilder_Create();
    success = CkHttp_QuickGetSb(http,"https://{{environment}}.bond.tech/api/v0/cards",sbResponseBody);
    if (success == FALSE) {
        printf("%s\n",CkHttp_lastErrorText(http));
        CkHttp_Dispose(http);
        CkStringBuilder_Dispose(sbResponseBody);
        return;
    }

    printf("Response status code = %d\n",CkHttp_getLastStatus(http));
    printf("%s\n",CkStringBuilder_getAsString(sbResponseBody));


    CkHttp_Dispose(http);
    CkStringBuilder_Dispose(sbResponseBody);

    }

Curl Command

curl -X GET
	-H "Content-Type: application/json"
	-H "Authorization: {{authorization}}"
	-H "Identity: {{identity}}"
https://{{environment}}.bond.tech/api/v0/cards

Postman Collection Item JSON

{
  "name": "get card all cards",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Content-Type",
        "type": "text",
        "value": "application/json"
      },
      {
        "key": "Authorization",
        "type": "text",
        "value": "{{authorization}}"
      },
      {
        "key": "Identity",
        "type": "text",
        "value": "{{identity}}"
      }
    ],
    "url": {
      "raw": "https://{{environment}}.bond.tech/api/v0/cards",
      "protocol": "https",
      "host": [
        "{{environment}}",
        "bond",
        "tech"
      ],
      "path": [
        "api",
        "v0",
        "cards"
      ]
    },
    "description": "Add Card financial Core"
  },
  "response": [
    {
      "name": "get card",
      "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": "",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://{{environment}}.bond.tech/api/v0/cards",
          "protocol": "https",
          "host": [
            "{{environment}}",
            "bond",
            "tech"
          ],
          "path": [
            "api",
            "v0",
            "cards"
          ]
        }
      },
      "_postman_previewlanguage": "json",
      "header": null,
      "cookie": [
      ],
      "body": "{\n    \"page\": 1,\n    \"next_page\": 2,\n    \"pages\": 12,\n    \"count\": 10,\n    \"cards\": [\n        {\n            \"card_id\": \"05e8061d-cdc0-450c-ab54-8e8fbfcc68bc\",\n            \"last_four\": \"6280\",\n            \"status\": \"Active\",\n            \"sponsor_bank_routing_number\": \"101115315\",\n            \"card_design_id\": null,\n            \"program_id\": \"058cfa63-798f-4efc-b843-7b341200cc04\",\n            \"date_created\": \"2021-11-11 19:51:23.409368+00:00\",\n            \"customer_id\": \"a884591d-ee17-497b-a1ca-5cb9a7565384\",\n            \"pseudoDDANumbers\": [\n                {\n                    \"pseudoDdaNumber\": \"99923511846666\"\n                }\n            ],\n            \"card_number\": \"tok_sandbox_sPNBWtEUAByXJQ78n9hVJ\",\n            \"expiry_date\": \"tok_sandbox_75zgC7GNNtJt2kBxLtqxQR\",\n            \"cvv\": \"tok_sandbox_nzem5L1Zbmv1iQ9KbTjR2c\",\n            \"card_account_id\": \"ce94a5d0-9086-4862-a3e5-74c556139bbb\"\n        },\n        {\n            \"card_id\": \"5cec4ab2-c765-4cc2-9950-15d69e6d1c82\",\n            \"last_four\": \"3885\",\n            \"status\": \"Active\",\n            \"credit_limit\": \"100.00\",\n            \"sponsor_bank_routing_number\": \"101115315\",\n            \"card_design_id\": null,\n            \"parent_card_id\": null,\n            \"program_id\": \"a98081b5-dd8d-4c01-ac39-4663558cbecf\",\n            \"date_created\": \"2021-11-05T14:06:36.579966+00:00\",\n            \"customer_id\": \"4485ebb2-8f1c-4311-bd02-f4bd455d2e56\",\n            \"pseudoDDANumbers\": [\n                {\n                    \"pseudoDdaNumber\": \"99984526917252\"\n                }\n            ],\n            \"card_number\": \"tok_sandbox_2j9gwx4YnsNmwiWHt3GWKs\",\n            \"expiry_date\": \"tok_sandbox_xb6GJ88rUkvQg6LAv4U5vs\",\n            \"cvv\": \"tok_sandbox_Xg5rMQfEquN1ZHdJLrNXs\",\n            \"card_account_id\": \"ac95db1d-d0b2-4b4b-90cd-f53444a76c33\"\n        },\n        {\n            \"card_id\": \"d42c990c-ead2-4d51-a251-6109206c4f17\",\n            \"last_four\": \"4063\",\n            \"status\": \"Active\",\n            \"credit_limit\": \"100.00\",\n            \"sponsor_bank_routing_number\": \"101115315\",\n            \"card_design_id\": null,\n            \"parent_card_id\": null,\n            \"program_id\": \"a98081b5-dd8d-4c01-ac39-4663558cbecf\",\n            \"date_created\": \"2021-11-04T16:15:04.717793+00:00\",\n            \"customer_id\": \"49b0cc92-f6bc-4094-9933-327e4ed96267\",\n            \"pseudoDDANumbers\": [\n                {\n                    \"pseudoDdaNumber\": \"99942923191357\"\n                }\n            ],\n            \"card_number\": \"tok_sandbox_eosAY8Eso55RHTgXMj7viX\",\n            \"expiry_date\": \"tok_sandbox_2XLpAw48D6WcXvGi6JJtEA\",\n            \"cvv\": \"tok_sandbox_bibvjYiHZVbv1eThopxUJE\",\n            \"card_account_id\": \"98de7add-11fd-4b0d-876c-1e886f699ba9\"\n        },\n        {\n            \"card_id\": \"72e2c5be-a94c-4862-b4c9-62a56c03a160\",\n            \"last_four\": \"6417\",\n            \"status\": \"Active\",\n            \"sponsor_bank_routing_number\": \"101115315\",\n            \"card_design_id\": null,\n            \"program_id\": \"058cfa63-798f-4efc-b843-7b341200cc04\",\n            \"date_created\": \"2021-10-28 11:52:37.478235+00:00\",\n            \"customer_id\": \"1f0a05d7-450f-4d84-8f49-8a361aef0f3f\",\n            \"pseudoDDANumbers\": [\n                {\n                    \"pseudoDdaNumber\": \"99946849957826\"\n                }\n            ],\n            \"card_number\": \"tok_sandbox_gu3WGpQJKd6V5F7csjbNem\",\n            \"expiry_date\": \"tok_sandbox_go6CewFzT7wRgw2cTUFpQU\",\n            \"cvv\": \"tok_sandbox_qNbv69jrmVgktA1BrUbb4a\",\n            \"card_account_id\": \"0081d38d-c038-4c2e-a960-f8653acee918\"\n        },\n        {\n            \"card_id\": \"96600971-e3d8-43d1-94d7-bbb13536981f\",\n            \"last_four\": \"0132\",\n            \"status\": \"Active\",\n            \"sponsor_bank_routing_number\": \"101115315\",\n            \"card_design_id\": null,\n            \"program_id\": \"058cfa63-798f-4efc-b843-7b341200cc04\",\n            \"date_created\": \"2021-10-26 08:28:20.079862+00:00\",\n            \"customer_id\": \"c75b7bb5-cba4-415b-84a1-e4f4b475f4b4\",\n            \"pseudoDDANumbers\": [\n                {\n                    \"pseudoDdaNumber\": \"99926965347540\"\n                }\n            ],\n            \"card_number\": \"tok_sandbox_bXquM3qyHqdx3qQ4vTmQ3e\",\n            \"expiry_date\": \"tok_sandbox_vxcB66EzQPaYaPQgn5VgQ2\",\n            \"cvv\": \"tok_sandbox_3SY5e6MzUcj7A8wEB4zHiW\",\n            \"card_account_id\": \"ea120168-8b14-4911-b72f-863694e058e6\"\n        },\n        {\n            \"card_id\": \"576f528c-546c-48d4-a2db-7d6e27d3eb31\",\n            \"last_four\": \"3473\",\n            \"status\": \"Active\",\n            \"sponsor_bank_routing_number\": \"101115315\",\n            \"card_design_id\": null,\n            \"program_id\": \"058cfa63-798f-4efc-b843-7b341200cc04\",\n            \"date_created\": \"2021-10-25 21:54:56.660464+00:00\",\n            \"customer_id\": \"5e78459a-ff2a-48c9-9c95-d5fb2ed1f97a\",\n            \"pseudoDDANumbers\": [\n                {\n                    \"pseudoDdaNumber\": \"99966656450760\"\n                }\n            ],\n            \"card_number\": \"tok_sandbox_QktJ3oXiQdv9K2gH9qpqi\",\n            \"expiry_date\": \"tok_sandbox_tgsnnR2SQKhP1FdQGrpRxb\",\n            \"cvv\": \"tok_sandbox_dKNywgSEqRD8syAkrrNxp\",\n            \"card_account_id\": \"8bcac973-7961-4928-aa89-3aee964e5452\"\n        },\n        {\n            \"card_id\": \"ae49102f-cc97-40c2-a3e4-abb8c24d2a53\",\n            \"last_four\": \"6622\",\n            \"status\": \"Active\",\n            \"sponsor_bank_routing_number\": \"101115315\",\n            \"card_design_id\": null,\n            \"program_id\": \"058cfa63-798f-4efc-b843-7b341200cc04\",\n            \"date_created\": \"2021-10-20 14:17:28.402705+00:00\",\n            \"customer_id\": \"59ef8ce1-b50a-41ce-8d07-360d17af0926\",\n            \"pseudoDDANumbers\": [\n                {\n                    \"pseudoDdaNumber\": \"99944004136643\"\n                }\n            ],\n            \"card_number\": \"tok_sandbox_6NifFZKRDvMu29n3VUmzi2\",\n            \"expiry_date\": \"tok_sandbox_dvgSjGQbYxfujA7AbZm9vn\",\n            \"cvv\": \"tok_sandbox_tgXgBnGeSri6KheFoTiG5Q\",\n            \"card_account_id\": \"c6f729f0-15ae-4e5c-bb5c-2c92453b8fa0\"\n        },\n        {\n            \"card_id\": \"dd2fec07-8629-4b1d-84f5-e022c33abf47\",\n            \"last_four\": \"7615\",\n            \"status\": \"Active\",\n            \"sponsor_bank_routing_number\": \"101115315\",\n            \"card_design_id\": null,\n            \"program_id\": \"058cfa63-798f-4efc-b843-7b341200cc04\",\n            \"date_created\": \"2021-10-20 13:51:49.626719+00:00\",\n            \"customer_id\": \"59ef8ce1-b50a-41ce-8d07-360d17af0926\",\n            \"pseudoDDANumbers\": [\n                {\n                    \"pseudoDdaNumber\": \"99969480170889\"\n                }\n            ],\n            \"card_number\": \"tok_sandbox_4AE82AEHaZXV62iWYX6LCY\",\n            \"expiry_date\": \"tok_sandbox_uiBXF6zefeqPWgEU2dsiYU\",\n            \"cvv\": \"tok_sandbox_hWCZ3pDSj2rKv9zvjLRHBa\",\n            \"card_account_id\": \"356c9afb-7c7e-405a-a789-05e70bcf8ddc\"\n        },\n        {\n            \"card_id\": \"b5c72770-81e4-4328-8f94-c6e6e913c61c\",\n            \"last_four\": \"4903\",\n            \"status\": \"Active\",\n            \"sponsor_bank_routing_number\": \"101115315\",\n            \"card_design_id\": null,\n            \"program_id\": \"058cfa63-798f-4efc-b843-7b341200cc04\",\n            \"date_created\": \"2021-10-20 13:51:26.603450+00:00\",\n            \"customer_id\": \"59ef8ce1-b50a-41ce-8d07-360d17af0926\",\n            \"pseudoDDANumbers\": [\n                {\n                    \"pseudoDdaNumber\": \"99907373425417\"\n                }\n            ],\n            \"card_number\": \"tok_sandbox_6EMvb5DzSVwKGQ1eKj5i1M\",\n            \"expiry_date\": \"tok_sandbox_wo7MLs347286pUdmFg1Bio\",\n            \"cvv\": \"tok_sandbox_3C43d19duWvoi2K3PK95yn\",\n            \"card_account_id\": \"446e1993-9dc0-4153-b71f-e4ccacb52d29\"\n        },\n        {\n            \"card_id\": \"cd99a736-82a2-4bd1-bd50-bc84910ac2a4\",\n            \"last_four\": \"2154\",\n            \"status\": \"Active\",\n            \"sponsor_bank_routing_number\": \"101115315\",\n            \"card_design_id\": null,\n            \"program_id\": \"058cfa63-798f-4efc-b843-7b341200cc04\",\n            \"date_created\": \"2021-10-13 14:07:50.859067+00:00\",\n            \"customer_id\": \"4485ebb2-8f1c-4311-bd02-f4bd455d2e56\",\n            \"pseudoDDANumbers\": [\n                {\n                    \"pseudoDdaNumber\": \"99922921257374\"\n                }\n            ],\n            \"card_number\": \"tok_sandbox_5wLAq6afoeGaiDTed6KDMy\",\n            \"expiry_date\": \"tok_sandbox_UnKuVWS3g2Qom2AXHRHwX\",\n            \"cvv\": \"tok_sandbox_cV4VBMxXdh1GD95sujjjT9\",\n            \"card_account_id\": \"b3257051-d57f-4a61-8600-725a6ae3567c\"\n        }\n    ]\n}"
    }
  ]
}