Chilkat Online Tools

C# / Bond APIs / 3b. get card

Back to Collection Items

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

Chilkat.Http http = new Chilkat.Http();
bool success;

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

Chilkat.StringBuilder sbResponseBody = new Chilkat.StringBuilder();
success = http.QuickGetSb("https://{{environment}}.bond.tech/api/v0/cards/:card_id",sbResponseBody);
if (success == false) {
    Debug.WriteLine(http.LastErrorText);
    return;
}

Debug.WriteLine("Response status code = " + Convert.ToString(http.LastStatus));
Debug.WriteLine(sbResponseBody.GetAsString());

Curl Command

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

Postman Collection Item JSON

{
  "name": "3b. get card",
  "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/:card_id",
      "protocol": "https",
      "host": [
        "{{environment}}",
        "bond",
        "tech"
      ],
      "path": [
        "api",
        "v0",
        "cards",
        ":card_id"
      ],
      "variable": [
        {
          "key": "card_id",
          "value": "{{card_id}}"
        }
      ]
    },
    "description": "Add Card financial Core"
  },
  "response": [
    {
      "name": "3b. 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/:card_id",
          "protocol": "https",
          "host": [
            "{{environment}}",
            "bond",
            "tech"
          ],
          "path": [
            "api",
            "v0",
            "cards",
            ":card_id"
          ],
          "variable": [
            {
              "key": "card_id",
              "value": "{{card_id}}"
            }
          ]
        }
      },
      "_postman_previewlanguage": "json",
      "header": null,
      "cookie": [
      ],
      "body": "{\n    \"card_id\": \"2742ff6a-7455-4066-8b45-ae12d3acca34\",\n    \"last_four\": \"6169\",\n    \"status\": \"Active\",\n    \"card_number\": \"tok_live_283734\",\n    \"cvv\": \"tok_live_p923u34\",\n    \"expiry_date\": \"tok_live_oeueo932\",\n    \"card_account_id\": \"48aef94d-8473-47c8-943f-d3ac1745d8fa\",\n    \"pseudoDDANumbers\": [\n        {\n            \"pseudoDdaNumber\": \"1010101010101010\"\n        }\n    ]\n}"
    }
  ]
}