Hybris Sales UX API
CreditCheck
creditCheck API is used to fetch the credit score of an customer.
This API is available for all 4 BUs (JM, PA, CR(stub response), PR).
Request URL
http://[localhost]:[port]/ecom-sales-ux/v1/{businessId}/creditCheck
Base URI Parameter
Name | Type | M/O | Description |
---|---|---|---|
businessId | string | M | businessId string M Business unit identifier. Example: “JM”,”PA”,”PR” |
Headers
Name | Type | M/O | Description |
---|---|---|---|
Correlation-ID | string | O | This is a unique identifier for the current call chain that can be used to tie together log entries on multiple layers. Could be uuid value, Min 16 Characters Example: 644e1dd7-2a7f-18fb-b8ed-ed78c3F92c2b |
channelId | string | C/M | Defalut value : ECOM, Expected value for SuperAPP is 'APP' |
x-ssn | string | M for PR | Social Security Number of the user. Example Encrypted Value = "rSvqIaMHjO5yY4U+YJCtPQ==" |
Security Headers
Name | Type | M/O | Description |
---|---|---|---|
client_id | string | M | Client Id value for Client Id Enforcement policy. Environment Specific Value. Eg: 6f0ed16a7b494d76b2d60e05bc3b3332 |
client_secret | string | M | Client secret value for Client Id Enforcement policy. Environment Specific Value, eg: e4CD4D43449846aA9D8Cb9c43fAd324a |
Query Parameter
Name | Type | M/O | Description |
---|---|---|---|
searchCriteria | Json- Object | O | Contains detail information about the customer. As per design it is optional, for JM,PA,PR it is mandatory .Its a url encoded object format |
searchCriteria request body for PA
Name | Type | M\O | Description/Example |
---|---|---|---|
identityNumberType | String | M | nationalId,trnNumber,passport |
identityNumber | String | M | Tax registration number of the customer Examples nationalID=1591371-1-664561 trnNumber= 8-462-327 passport=xxxx |
searchCriteria request body for JM
Name | Type | M\O | Description/Example |
---|---|---|---|
firstName | String | M | TESIA |
lastName | String | M | DOUGLAS |
role | String | O | A Note: Default Value is Borrower |
requestDate | String | M | 20-11-2001(dd-MM-yyyy) Note: Default Value is current date |
contractType | String | M | 58 Note: if order is pure mobile send 53 else 52. This field does not play any significant role in the score calculations. |
dateOfBirth | String | M | 19-07-1986(dd-MM-yyyy) |
paymentPeriod | String | O | M Monthly Bill - select the Code M (monthly Installments-30 days) Due today - select the Code I ( Irregular instalments Note: Default Value is Monthly |
consentFlag | String | M | (1 or 0) Note: to proceed with the inquiry must be 1 |
currency | String | O | JMD Note: Default Value is “JMD” (Jamaican Dollar) |
identityNumber | String | M | 100765653 |
searchCriteria request body for PR
Name | Type | M\O | Description/Example |
---|---|---|---|
firstName | String | M | MARK |
middleName | String | O | M |
lastName | String | M | EID |
streetNumber | String | O | 5601 |
streetName | String | M | NANCY |
city | String | O | SIOUX FALLS |
state | String | O | SD |
postalCode | String | M | 57106 |
searchCriteria request body for PA
{
"identityNumberType": "nationalId",
"identityNumber": "8-462-327"
}
searchCriteria request body for JM
{
"firstName": "TESIA",
"lastName": "DOUGLAS",
"role": "A",
"requestDate": "20-11-2001",
"contractType": "58",
"dateOfBirth": "19-07-1986",
"paymentPeriod": "M",
"consentFlag": "1",
"currency": "JMD",
"identityNumber": "100765653"
}
searchCriteria request body for PR
Below json object need to pass URL Encoded in searchCriteria
{
"firstName":"MARK",
"middleName":"M",
"lastName":"EID",
"streetName":"NANCY",
"city":"SIOUX FALLS",
"state":"SD",
"postalCode":"57106"
}
Possible response error for PR
When missing x-ssn header in input request
"errors": [
{
"code": 400,
"message": "INVALID:SSN",
"description": "'x-ssn' cannot be Empty"
}
]
}
When missing firstName field in input searchCriteria request
{
"errors": [
{
"code": 400,
"message": "TRANSUNION:VALIDATION_ERROR",
"description": "FIRST NAME MISSING OR INVALID"
}
]
}
When missing lastName field in input searchCriteria request
{
"errors": [
{
"code": 400,
"message": "TRANSUNION:VALIDATION_ERROR",
"description": "SURNAME MISSING OR INVALID"
}
]
}
When missing streetName field in input searchCriteria request
{
"errors": [
{
"code": 400,
"message": "TRANSUNION:VALIDATION_ERROR",
"description": "CURRENT ADDRESS STREET NAME MISSING OR INVALID"
}
]
}
When missing postalCode field in input searchCriteria request
{
"errors": [
{
"code": 400,
"message": "TRANSUNION:VALIDATION_ERROR",
"description": "CURRENT ADDRESS ZIP CODE MISSING OR INVALID"
}
]
}
Possible response success
This section defines all the possible data structures received by the client and that must be considered satisfactory at the time of responding to the method.
HTTP Status PA response is 200 with Response body.
PA Response with CreditScore
Response with CreditScore
{
"creditScore": "260",
"creditRiskRating": "D",
"creditProfileDate": "2021-10-20T10:37:10Z"
}
PA Response without CreditScore
Response without CreditScore
{
"creditProfileDate":"2021-04-15T07:00:03.4Z",
"scoreError": "NE",
"scoreDescription": "No existe"
}
HTTP Status JM response is 200 with Response body.
JM Response with CreditScore
Response with CreditScore
{
"creditScore": "260",
"creditRiskRating": "J",
"creditProfileDate": "2021-10-20T10:37:10Z"
}
JM Response without CreditScore
Response without CreditScore
{
"creditProfileDate":"2021-04-15T07:00:03.4Z",
"scoreError": "S",
"scoreDescription": "Subject has only services contracts"
}
Response for PR
{
"creditScore": "+687",
"creditProfileDate": "2021-04-15T07:00:03.000-04:00",
"characteristic":[{
"name": "highRiskFraudAlert",
"value": "availableClear"
}]
}
Definitions
Each of the response parameters is detailed.
name | type | description | required |
---|---|---|---|
creditScore | string | Customer Credit Score | N |
creditProfileDate | datetime | Date and time of credit score received from the Webservice APC system | N |
characteristic | array | A list of characteristics. for more detains refer below characteristic Values table. | N |
characteristic.name | string | Name of the characteristic | N |
characteristic.value | string | The Value of the characteristic | N |
characteristic Values
name | type | description | required |
---|---|---|---|
highRiskFraudAlert | string | Risk Fraud Alert search status Eg: "availableClear" | N |
Key Considerations for PR response:
The creditScore and creditClass mappings for Vantage 4.0 are described below:
Credit Class | Vantage 4.0 Score |
---|---|
A | 809-850 |
B | 655-808 |
K | 545-654 |
L | 544 or less |
M | 4 |
Panama response datamodel :
Name | Type | Mandatory | Description | Comments |
---|---|---|---|---|
creditScore | String | O | Customer Credit Score Note: In case of successfully fetching customer score we will get this field. | SCORE value from Webservice APC response. IF ((Resultado.Validacion.EsValido) == 1 && (Resultado.Estatus) == 4) THEN creditScore = payload.Resultado.Score.Score.SCORE, ELSE scoreError = "xxx" scoreDescription = "xxxxx" |
creditProfileDate | DateTime | M | Date and time of credit score received from the Webservice APC system Ex:-"2021-04-15T07:00:03.4Z" | curent datetime/Transaction Timestamp |
creditRiskRating | String | O | Customer Credit Score range Note: In case of successfully fetching customer score, apply mapping rules. | Apply the following rules: IF ((Resultado.Validacion.EsValido) == 1 && (Resultado.Estatus) == 4) THEN IF SCORE is Null or empty or < 1 creditRiskRating = "C" IF SCORE is < 540 creditRiskRating = "D" IF SCORE is < 632 creditRiskRating = "B" ELSE creditRiskRating = "A" ELSE scoreError = "S" scoreDescription = "Cliente no registrado en APC" |
scoreError | String | O | Exclusion Rule in case of not able to fetch the score due to business reason Note: In case having issue fetching customer score we will get this field. | Resultado.Score.Score.EXCLUSION |
scoreDescription | String | O | Exclusion Rule Description case of not able to fetch the score due to business reason. Note: In case having issue fetching customer score we will get this field. | generate description from property file as below table: |
Types of Exclusion Score (PA):
Short name we will get this scoreError | long name generate this for description | Does it calculate the score? |
---|---|---|
NE | No existe | no |
NC | No calificable | no |
PJ | Persona jurídica | no |
FA | Fallecido | no |
ME | Calificable ME | yes |
CA | Calificable | yes |
Types of Errors (PA)
MAIN TAG | PARENT TAG | CHILD TAG | TYPE | DESCRIPTION |
---|---|---|---|---|
Resultado | Validacion | EsValido | INTEGER | This field is not encrypted and tells us whether or not an error occurred when querying the SCORE It is an unencrypted value where: 0 = indica que ocurrió un error al consultar el SCORE V3 1 = si no se dio un error 2 = indica el usuario de consulta está inactivo 3 = indica que el agente económico que consulta no se encuentra activo 4 = indica que el usuario de consulta está fuera de horario |
For JM CG Invoke Field Values
Contract Role Type (JM)
RoleType
Code | Description |
---|---|
A | Borrower |
C | Co-Borrower |
G | Guarantor |
Payment Periodicity
PaymentPeriodicity (JM)
Code | Description |
---|---|
M | monthly Installments-30 days |
B | bimonthly Installments-60 days |
F | fortnight Installments-15 days |
C | Installments every five months-150 days |
S | Installments every six months-180 days |
I | irregular Installments |
Q | quarterly Installments-90 days |
T | Trimester four-monthly Installments-120 days |
W | weekly installments - 7 days |
Y | Yearly Installments-360 days |
CONTRACT TYPE (JM)
Value Description | |
---|---|
52 | Fixed-line telephony |
53 | Mobile telephony |
54 | Water |
55 | Gas |
56 | Electricity |
57 | Satellite-tv |
58 | Cable-tv |
59 | Internet |
60 | Insurance |
Credit Score Tranche (JM)
Score | Tranche | Score Message |
---|---|---|
239-293 | J | EXTREMELY HIGH RISK |
294-335 | I | VERY HIGH RISK |
336-378 | H | HIGH RISK |
379-397 | G | MEDIUM HIGH RISK |
398-412 | F | MEDIUM HIGH RISK |
413-429 | E | MEDIUM RISK |
430-433 | D | MEDIUM LOW RISK |
434-456 | C | MEDIUM LOW RISK |
457-476 | B | LOW RISK |
477-552 | A | VERY LOW RISK |
Exclusion Rule/ Score Error (JM)
There are cases where the score cannot be calculated because the set of available information may not be enough or suitable for statistic computation, in these specific cases a message will be returned, the message provides the most heavily weighted reasons why the CBS is not returned. The rules and criteria, which determine the methodological exclusion code, are listed in the table below.
Value | Description |
---|---|
X | Generic Error: Contact system administrator |
A | The Client has only Contract as Guarantor |
B | The Subject falls below Score Range |
C | The Client has only Closed Contracts by more than 3 years |
D | The Client has only Contract too new to be rated |
E | The Client has only Contract not updated by more than 9 months |
F | Suspicious missed payments |
P | The Client has too many contracts |
R | The Client is a Company |
O | Subject has no contracts |
T | Timeout |
M | Subject is new |
S | Subject has only services contracts |