Get Customer
Request URL
GET /customer/status/:customerId
Description
This API returns the data for a customer. The connectFi customerId is given as a path parameter in the request URL. Replace :customerId
with the desired customerId.
Snippet Examples
javascript
const axios = require('axios');
const config = {
method: 'GET',
url: '${CONNECTFI_BASE_URL}/customer/status/:customerId',
headers: {
'x-connectfi-token': "A long random string token received from /auth/get-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 "CONNECTFI_BASE_URL/customer/status/:customerId" --header "x-connectfi-token: A long random string token received from /auth/get-token request"
Successful Response Examples
200 SUCCESSFUL RESPONSE FOR INDIVIDUAL CUSTOMER
HEADERS
Header | Value |
---|---|
x-connectfi-token | A long random string token received from /auth/get-token request |
PARAMETERS
Parameter | Description | Value |
---|---|---|
customerId | [required] | cstap_6reGTr3k8vpAu8uFV7EdiN |
REQUEST BODY
RESPONSE BODY
{
"code": "0",
"data": {
"reference": "ExtRefICust101",
"customerId": "cstap_6reGTr3k8vpAu8uFV7EdiN",
"customerType": "individual",
"customer": {
"firstName": "Janice",
"lastName": "Sample",
"gender": "M",
"dateOfBirth": "1969-08-04",
"email": "abc123def4@test.test",
"citizenshipCountryCodeA3": "USA",
"addresses": [
{
"type": "PRIMARY",
"addressLine1": "123 Main Str.",
"addressLine2": "apt 8",
"city": "Harrisburg",
"countryCodeA3": "USA",
"postalCode": "12345",
"stateCode": "PA"
}
],
"phones": [
{
"type": "MOBILE",
"phoneNumber": "5556667777",
"countryDialingCode": "01"
},
{
"type": "PRIMARY",
"phoneNumber": "5556667777",
"countryDialingCode": "01"
}
],
"identificationDocuments": [
{
"type": "SSN",
"issuanceCountryCodeA3": "USA",
"last4": "9698"
},
{
"type": "DRIVING LICENSE",
"value": "PA99999999",
"issuanceCountryCodeA3": "USA",
"issuanceRegion": "PA",
"expiryDate": "2029-12-28"
}
]
},
"boises": [],
"dtsCreatedAt": "2023-11-01T16:07:59.332Z"
},
"requestId": "f2638de078d211eeb5658f28ab5fe311"
}
200 SUCCESSFUL RESPONSE CAN PASS CREDIT APPLICATION FOR INDIVIDUAL CUSTOMER
HEADERS
Header | Value |
---|---|
x-connectfi-token | A long random string token received from /auth/get-token request |
PARAMETERS
Parameter | Description | Value |
---|---|---|
customerId | [required] | cstap_7uvAC6nLftLGCq7yic3TfI |
REQUEST BODY
RESPONSE BODY
{
"code": "0",
"data": {
"reference": "103",
"customerId": "cstap_7uvAC6nLftLGCq7yic3TfI",
"customerType": "individual",
"customer": {
"firstName": "JOLEEN",
"lastName": "KAPSCH",
"gender": "M",
"dateOfBirth": "1970-01-01",
"email": "brucey@gmail.com",
"citizenshipCountryCodeA3": "USA",
"addresses": [
{
"type": "PRIMARY",
"addressLine1": "5100 SWEETBRIAR LN",
"addressLine2": "Apt 1",
"city": "TYLER",
"countryCodeA3": "USA",
"postalCode": "12345",
"stateCode": "TX"
}
],
"phones": [
{
"type": "MOBILE",
"phoneNumber": "5556667777",
"countryDialingCode": "01"
}
],
"identificationDocuments": [
{
"type": "SSN",
"issuanceCountryCodeA3": "USA",
"last4": "9698"
},
{
"type": "DRIVING LICENSE",
"value": "PA1234567890123456",
"issuanceCountryCodeA3": "USA",
"issuanceRegion": "PA",
"expiryDate": "2029-12-28"
}
]
},
"boises": [],
"dtsCreatedAt": "2023-08-02T03:02:05.600Z"
},
"requestId": "01d3458078de11eeb5658f28ab5fe311"
}
200 SUCCESSFUL RESPONSE FOR BUSINESS CUSTOMER
HEADERS
Header | Value |
---|---|
x-connectfi-token | A long random string token received from /auth/get-token request |
PARAMETERS
Parameter | Description | Value |
---|---|---|
customerId | [required] | cstab_7BX5DO49J48VeWKsJ6gWNb |
REQUEST BODY
RESPONSE BODY
{
"code": "0",
"data": {
"reference": "ExtRefBCust100",
"customerId": "cstab_7BX5DO49J48VeWKsJ6gWNb",
"customerType": "business",
"customer": {
"businessName": "AWSM BRAND MANAGEMENT INC",
"businessFederalEin": "123456800",
"businessAddresses": [
{
"type": "PRIMARY",
"addressLine1": "789 Main Str.",
"addressLine2": "Suite 10",
"city": "Harrisburg",
"countryCodeA3": "USA",
"postalCode": "12345",
"stateCode": "PA"
}
],
"businessPhones": [
{
"type": "PRIMARY",
"phoneNumber": "5556667777",
"countryDialingCode": "01"
}
]
},
"boises": [],
"dtsCreatedAt": "2023-11-01T17:13:29.457Z",
"businessRepresentatives": [
{
"id": "cstab_7BX5DPJcbmipymiokecA6d",
"firstName": "JOLEEN",
"lastName": "KAPSCH",
"gender": "F",
"dateOfBirth": "1978-10-15T00:00:00.000Z",
"businessRepresentativeType": "principal_owner",
"email": "aa@aa.aa",
"citizenshipCountryCodeA3": "USA",
"addresses": [
{
"type": "PRIMARY",
"addressLine1": "123 Main Str.",
"addressLine2": "apt 7",
"city": "Harrisburg",
"countryCodeA3": "USA",
"postalCode": "12345",
"stateCode": "PA"
}
],
"phones": [
{
"type": "MOBILE",
"phoneNumber": "1234567890",
"countryDialingCode": "01"
}
],
"identificationDocuments": [
{
"type": "SSN",
"value": "666989698",
"issuanceCountryCodeA3": "USA"
},
{
"type": "DRIVING LICENSE",
"value": "PA1234567890123456",
"issuanceCountryCodeA3": "USA",
"issuanceRegion": "PA",
"expiryDate": "2029-12-28"
}
]
}
]
},
"requestId": "2bd2086078db11eeb5658f28ab5fe311"
}