Skip to content

Sync Card Profile

Request URL

POST /ibis/card/sync-profile

Description

This endpoint can be used to sync the current customer profile details stored in connectFi to the relevant card profile at the card processor. After the email, addresses, and/or phones of an individual customer (or businessAddresses and/or businessPhones of a business customer) have been updated in connectFi using the /customer/update endpoint, then the updated information should be synced with any relevant accounts and/or cards that have been issued through /ibis endpoints. Likewise, if a businessRepresentative on a business customer has been updated via /customer/update, then the /ibis/card/sync-profile endpoint can be called to sync the new businessRepresentative profile information to the specified cards, if applicable, at the card processor.

When syncing profile information stored in connectFi to specified cards at the card processor, the cardHolder profile is updated using the current "PRIMARY" address, the "MOBILE" phone number, an optional "LANDLINE" or "PRIMARY" phone number, and email. If the relevant customer is an individual, the customer and cardHolder are the same entity and the "PRIMARY" address in connectFi will also be used as the card billing address at the card processor. If the relevant customer is a business, the "PRIMARY" business address will be used as the billing address at the card processor instead of the cardHolder address. In addition, the "PRIMARY" business phone number will be configured as the cardHolder work phone number. If the cardHolder addresses, phone numbers, and/or email (or the business addresses/business phone numbers, if applicable) are not current, please make a request to /customer/update before syncing profile information to the specified card.

An example use case could include a customer needing to update the billing address of a card issued through the /ibis endpoints. You (the client) will first make a POST request to /customer/update to update the "PRIMARY" address in the addresses array (for an individual customer) or the "PRIMARY" businessAddress in the businessAddresses array (for a business customer). Then, you will make a POST request to /ibis/card/sync-profile for each card that this address change will affect. If the customer is an individual, then the customerId and the cardHolderId will be identical since they are the same entity. If the customer is a business, then the cardHolderId will be the ID of the businessRepresentative or business employee associated with the specified card.

Schema

Property table for ibis/card/sync-profile

Property Description Required Schema
customerId Customer ID in connectFi Yes {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "$id": "common-id"
}
cFiCardId The card ID in connectFi Yes {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "$id": "common-id"
}
profile An object containing profile details No ibisFacade syncProfile object

Property table for ibisFacade syncProfile object

Property Description Required Schema
cardHolderId An ID for the cardholder (required for business card holders only, nullable for individual customers). Must match customerId if included for individual customers. No {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "nullable": true,
  "$id": "common-idNullable"
}

Request Body

{
    "customerId":"cstap_1pYermTdbHiQz8JKjF5mjo",
    "cFiCardId":"icrd_5faW7EovZjx7aC6dP6LFM6",
    "profile":{
        "cardHolderId" : "cstap_1pYermTdbHiQz8JKjF5mjo"
    }
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
    "customerId":"cstap_1pYermTdbHiQz8JKjF5mjo",
    "cFiCardId":"icrd_5faW7EovZjx7aC6dP6LFM6",
    "profile":{
        "cardHolderId" : "cstap_1pYermTdbHiQz8JKjF5mjo"
    }
};
const config = {
  method: 'POST',
  url: '${CONNECTFI_BASE_URL}/ibis/card/sync-profile',
  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/sync-profile" --data "{    \"customerId\":\"cstap_1pYermTdbHiQz8JKjF5mjo\",   \"cFiCardId\":\"icrd_5faW7EovZjx7aC6dP6LFM6\",   \"profile\":{        \"cardHolderId\": \"cstap_1pYermTdbHiQz8JKjF5mjo\"    }}" --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 INDIVIDUAL

HEADERS

Header Value
Content-Type application/json
x-connectfi-token A long random string token received from /auth/get-token request

REQUEST BODY

{
    "customerId":"cstap_1pYermTdbHiQz8JKjF5mjo",
    "cFiCardId":"icrd_5faW7EovZjx7aC6dP6LFM6",
    "profile":{
        "cardHolderId" : "cstap_1pYermTdbHiQz8JKjF5mjo"
    }
}

RESPONSE BODY

{
    "code": "0",
    "data": {
        "cFiCardId": "icrd_5faW7EovZjx7aC6dP6LFM6",
        "cFiStatus": "Complete",
        "customerId": "cstap_1pYermTdbHiQz8JKjF5mjo",
        "cFiAggregatorId": "evolve",
        "reference": "extTCrd374",
        "memberNumber": "cstcp_1pVnbbRHHlZhoI5Jbpkg6e",
        "cardProgramId": "d_gpr_test",
        "programType": "debit",
        "boReferenceId": "110195640373135",
        "boCustomerId": "110000001956403731",
        "vAccountNumber": "1234567890123456",
        "abaRoutingNumber": "122244184",
        "dtsCreatedAt": "2024-04-22T14:43:24.714Z",
        "cardProgramName": "GPR Card Program",
        "transId": "F2167169687",
        "fee": 0,
        "balance": 0,
        "lastDepositAmount": 0,
        "ledgerBalance": 0
    },
    "requestId": "0b63318000b711ef98aa084523b20412"
}

200 SUCCESSFUL RESPONSE BUSINESS REPRESENTATIVE

HEADERS

Header Value
Content-Type application/json
x-connectfi-token A long random string token received from /auth/get-token request

REQUEST BODY

{
    "customerId":"cstab_7if6p0Vd3gAwQvu11lnEvU",
    "cFiCardId":"icrd_7gFuMqvlhzUSzu8O6WSZea",
    "profile":{
        "cardHolderId" : "cstab_7if6p2AfvyK19V1WCtjhOW"
    }
}

RESPONSE BODY

{
    "code": "0",
    "data": {
        "cFiCardId": "icrd_7gFuMqvlhzUSzu8O6WSZea",
        "cFiStatus": "Complete",
        "customerId": "cstab_7if6p0Vd3gAwQvu11lnEvU",
        "cFiAggregatorId": "evolve",
        "reference": "extBICrd3395",
        "memberNumber": "cstcb_7idzhQtbhedURna1uVQBW2",
        "cardProgramId": "d_gpr_test",
        "programType": "vAccountOnly",
        "boReferenceId": "110195640335522",
        "boCustomerId": "110000001956403355",
        "vAccountNumber": "8100040036070353",
        "abaRoutingNumber": "122244184",
        "dtsCreatedAt": "2024-04-18T12:12:31.984Z",
        "cardProgramName": "GPR Card Program",
        "transId": "F2167169700",
        "fee": 0,
        "balance": 0,
        "lastDepositAmount": 0,
        "ledgerBalance": 0
    },
    "requestId": "7ee5b32000b811ef98aa084523b20412"
}