Skip to content

List Cards

Request URL

GET /cards

Description

This endpoint returns an array of records for all cards that belong to this user.

Snippet Examples

javascript

const axios = require('axios');
const config = {
  method: 'GET',
  url: '${AMPLIFI_BASE_URL}/cards',
  headers: {
    'token': "A long random string token received from /token request"
  },
};

let result;
try {
  result = await axios.request(config);
  if (result.status === 200) {
    console.log(JSON.stringify(result.data));
  }
} catch (err) {
  console.log({
    errCode: err.code,
    responseStatus: err.response && err.response.status,
    data: err.response && JSON.stringify(err.response.data)
  });
}

cURL

curl --location "AMPLIFI_BASE_URL/cards"  --header "token: A long random string token received from /token request" 

Successful Response Examples

200 CARDS SUCCESSFUL EXAMPLE RETURNING ALL CARDS FOR CURRENT USER

HEADERS

Header Value
token A long random string token received from /token request

REQUEST BODY

none

RESPONSE BODY

{
    "cards": [
        {
            "AFiCardId": "qwecdlgmh8gl3lzzsejguqlljlbsqzpdikaziktalki",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "backOfficeId": "evolve"
        },
        {
            "AFiCardId": "qwecdlgmgtddkabyzkuaibfraesqglomhadsmctvbzi",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "backOfficeId": "evolve"
        },
        {
            "AFiCardId": "qwecdlgmgsimsapqyjichqqvqmqtakbhleirgucwxkd",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "backOfficeId": "evolve"
        },
        {
            "AFiCardId": "qwecdlgmgr0l3lmckzjxjhjxozwayisqzvtkxomafqj",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "backOfficeId": "evolve"
        },
        {
            "AFiCardId": "qwecdlgmgcc7gzzwhoqxzyqjhqgzkpzbuzhmsvcitad",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "backOfficeId": "evolve"
        },
        {
            "AFiCardId": "qwecdlgmg0s0fndcwicowswwlpquoqkeyomuwswykks",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "backOfficeId": "evolve"
        },
        {
            "AFiCardId": "qwecdlgmfn869vlgwcnktttkkqzekcldwtqxdypiwar",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "backOfficeId": "evolve"
        },
        {
            "AFiCardId": "qwecdlcs4ep0hoqrwdelpwarwrulzcfjmsqnbdvdnnf",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "backOfficeId": "evolve"
        },
        {
            "AFiCardId": "qwegal8kgtmysmels",
            "backOfficeId": "evolve",
            "AFiAccountId": "qwegal8kgtmysmels",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "accountIdBO": "cd_5cg2g8nddz3r9",
            "backOfficeName": "evolve",
            "cardIdBO": "cd_5cg2g8nddz3r9",
            "currency": "USD",
            "dtsExpiry": "2025-10-01T03:59:59.999Z",
            "dtsOpened": "2022-09-27T17:21:47.495Z",
            "dtsPreActivated": "2022-09-27T17:21:51.913Z",
            "id": "qwegal8kgtmysmels",
            "image": "images/card1.png",
            "isActivated": true,
            "isActive": true,
            "isClosed": false,
            "name_on_card": "JOHN TESTMAN NKPB",
            "num": "123456***1234",
            "status": "active",
            "typeId": "Standard",
            "dtsUpdated": "2023-12-11T13:40:12.226Z",
            "name": "Test3"
        },
        {
            "AFiCardId": "qwegalgmnr8njtinq",
            "backOfficeId": "evolve",
            "AFiAccountId": "qwegalgmnr8njtinq",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "accountIdBO": "cd_5cwsmytr3zt3p",
            "backOfficeName": "evolve",
            "cardIdBO": "cd_5cwsmytr3zt3p",
            "currency": "USD",
            "dtsExpiry": "2026-05-01T03:59:59.999Z",
            "dtsOpened": "2023-04-18T19:28:43.341Z",
            "id": "qwegalgmnr8njtinq",
            "image": "images/card3.png",
            "isActivated": false,
            "isActive": false,
            "isClosed": false,
            "name_on_card": "JOHN TESTMAN",
            "num": "123456******1234",
            "status": "blocked",
            "typeId": "virtual",
            "cvv": "336",
            "expiryMMYY": "046",
            "fullPan": "1234561234561234",
            "dtsUpdated": "2023-12-11T13:40:12.237Z"
        },
        {
            "AFiCardId": "qwegalgmoi1nxqhzc",
            "backOfficeId": "evolve",
            "AFiAccountId": "qwegalgmoi1nxqhzc",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "accountIdBO": "cd_5cwsm0vjv3z7f",
            "backOfficeName": "evolve",
            "cardIdBO": "cd_5cwsm0vjv3z7f",
            "currency": "USD",
            "dtsExpiry": "2026-05-01T03:59:59.999Z",
            "dtsOpened": "2023-04-18T19:49:33.207Z",
            "id": "qwegalgmoi1nxqhzc",
            "image": "images/card3.png",
            "isActivated": false,
            "isActive": false,
            "isClosed": false,
            "name_on_card": "JOHN TESTMAN",
            "num": "123456******1234",
            "status": "blocked",
            "typeId": "virtual",
            "cvv": "370",
            "expiryMMYY": "046",
            "fullPan": "1234561234561234",
            "dtsUpdated": "2023-12-11T13:40:12.216Z"
        },
        {
            "AFiCardId": "qwegalgnuyocdfoxg",
            "backOfficeId": "evolve",
            "AFiAccountId": "qwegalgnuyocdfoxg",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "accountIdBO": "cd_5cws26xjxlfbb",
            "backOfficeName": "evolve",
            "cardIdBO": "cd_5cws26xjxlfbb",
            "currency": "USD",
            "dtsExpiry": "2026-05-01T03:59:59.999Z",
            "dtsOpened": "2023-04-19T15:38:14.436Z",
            "id": "qwegalgnuyocdfoxg",
            "image": "images/card3.png",
            "isActivated": false,
            "isActive": false,
            "isClosed": false,
            "name_on_card": "JOHN TESTMAN",
            "num": "123456******1234",
            "status": "blocked",
            "typeId": "virtual",
            "cvv": "040",
            "expiryMMYY": "046",
            "fullPan": "1234561234561234",
            "dtsUpdated": "2023-12-11T13:40:12.230Z"
        }
    ],
    "success": true,
    "userId": "qweaurl8kgtlv9pc"
}