Set Status
Request URL
POST /ibis/card/set-status
Description
Use this endpoint to set the status of a card created with /ibis. A successful request will update the card status and return the relevant details for the requested card.
Ibis Card Status Codes
The following table gives a brief description of each status code and specifies which /ibis/card/
endpoints are allowed for the given status codes.
Status Code | Description | activate allowed? |
check-pin allowed? |
set-pin allowed? |
status allowed? |
set-status allowed? |
---|---|---|---|---|---|---|
"A" | Card was issued but has not yet been activated (This is an initial card status only. You may not set a card to this status value through this endpoint.) | Yes | NO | Yes | Yes | Yes |
"B" | ON, Open - All Transactions Allowed | NO | Yes | Yes | Yes | Yes |
"I" | Inactive | Yes | NO | NO | Yes | Yes |
"S" | OFF, FRAUD or LOST | Yes | NO | NO | Yes | Yes |
"F" | Closed | NO | NO | NO | Yes | NO |
Allowed Status Changes
The following table explains which status code changes may occur using the /ibis/card/set-status endpoint.
Initial Status Code | Allowed Status Update Values |
---|---|
"A" | "B", "F", "I", "S" |
"B" | "F", "I", "S" |
"F" | none |
"I" | "F", "S" |
"S" | "B", "F" |
Schema
Property table for ibis/card/set-status
Property | Description | Required | Schema |
---|---|---|---|
cFiCardId | The card ID in connectFi | Yes | { "type": "string", "pattern": "^[0-9a-zA-Z_]+$", "minLength": 1, "maxLength": 36, "$id": "common-id" } |
statusCode | A code that defines the status of the entity. | Yes | { "type": "string", "enum": [ "I", "B", "S", "F" ] } |
description | Description | No | { "type": "string", "minLength": 1, "maxLength": 60, "$id": "ibis-description" } |
Request Body
Snippet Examples
javascript
const axios = require('axios');
const data = {
"cFiCardId" : "icrd_575fma7wGFKTgSx537PMcO",
"statusCode" : "B"
};
const config = {
method: 'POST',
url: '${CONNECTFI_BASE_URL}/ibis/card/set-status',
headers: {
'Content-Type': "application/json",
'x-connectfi-token': "A long random string token received from /auth/get-token request"
},
data
};
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 "CONNECTFI_BASE_URL/ibis/card/set-status" --data "{\"cFiCardId\": \"icrd_575fma7wGFKTgSx537PMcO\", \"statusCode\": \"B\"}" --header "Content-Type: application/json" --header "x-connectfi-token: A long random string token received from /auth/get-token request"
Successful Response Examples
200 SUCCESSFUL RESPONSE TO ACTIVE
HEADERS
Header | Value |
---|---|
Content-Type | application/json |
x-connectfi-token | A long random string token received from /auth/get-token request |
REQUEST BODY
RESPONSE BODY
{
"code": "0",
"data": {
"cFiCardId": "icrd_1qaR2QEPXIRKr4jOyjQkTw",
"cFiStatus": "Complete",
"customerId": "cstap_7uvAC6nLftLGCq7yic3TfI",
"cFiAggregatorId": "CLIENTID",
"reference": "extIDCrd100",
"memberNumber": "cstcp_2WZ7ariGgrtumtUlD452LM",
"cardProgramId": "d_gpr_test",
"programType": "debit",
"boReferenceId": "110195634081158",
"boCustomerId": "110000001956340811",
"vAccountNumber": "1234567890123456",
"abaRoutingNumber": "122244184",
"dtsCreatedAt": "2023-11-01T18:05:04.208Z",
"status": {
"code": "B",
"description": "Open - All Transactions Allowed"
},
"transId": "F2166100327",
"fee": 0,
"balance": 0,
"lastDepositAmount": 0,
"ledgerBalance": 0
},
"requestId": "d6609da081af11ee9b7427220cc6c212"
}
200 SUCCESSFUL RESPONSE TO BLOCKED
HEADERS
Header | Value |
---|---|
Content-Type | application/json |
x-connectfi-token | A long random string token received from /auth/get-token request |
REQUEST BODY
RESPONSE BODY
{
"code": "0",
"data": {
"cFiCardId": "icrd_575fma7wGFKTgSx537PMcO",
"cFiStatus": "Complete",
"customerId": "cstap_7uvAC6nLftLGCq7yic3TfI",
"cFiAggregatorId": "CLIENTID",
"reference": "extCrd171121413",
"memberNumber": "cstcp_2WZ7ariGgrtumtUlD452LM",
"cardProgramId": "d_gpr_test",
"programType": "debit",
"boReferenceId": "110195634020706",
"boCustomerId": "110000001956340207",
"vAccountNumber": "1234567890123456",
"abaRoutingNumber": "122244184",
"dtsCreatedAt": "2023-10-30T20:19:40.990Z",
"status": {
"code": "S",
"description": "Blocked due to fraud"
},
"transId": "F2166100355",
"fee": 0,
"balance": 10,
"lastDepositAmount": 0,
"ledgerBalance": 10
},
"requestId": "45773cd081b511ee9b7427220cc6c212"
}