Hybris Sales UX API icon

Hybris Sales UX API

(0 reviews)

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

NameTypeM/ODescription
businessIdstringMbusinessId string M Business unit identifier. Example: “JM”,”PA”,”PR”

Headers

NameTypeM/ODescription
Correlation-IDstringOThis 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
channelIdstringC/MDefalut value : ECOM, Expected value for SuperAPP is 'APP'
x-ssnstringM for PRSocial Security Number of the user. Example Encrypted Value = "rSvqIaMHjO5yY4U+YJCtPQ=="

Security Headers

NameTypeM/ODescription
client_idstringMClient Id value for Client Id Enforcement policy. Environment Specific Value. Eg: 6f0ed16a7b494d76b2d60e05bc3b3332
client_secretstringMClient secret value for Client Id Enforcement policy. Environment Specific Value, eg: e4CD4D43449846aA9D8Cb9c43fAd324a

Query Parameter

NameTypeM/ODescription
searchCriteriaJson- ObjectOContains 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
NameTypeM\ODescription/Example
identityNumberTypeStringMnationalId,trnNumber,passport
identityNumberStringMTax registration number of the customer
Examples
nationalID=1591371-1-664561
trnNumber= 8-462-327
passport=xxxx
searchCriteria request body for JM
NameTypeM\ODescription/Example
firstNameStringMTESIA
lastNameStringMDOUGLAS
roleStringOA
Note: Default Value is Borrower
requestDateStringM20-11-2001(dd-MM-yyyy)
Note: Default Value is current date
contractTypeStringM58
Note: if order is pure mobile send 53 else 52. This field does not play any significant role in the score calculations.
dateOfBirthStringM19-07-1986(dd-MM-yyyy)
paymentPeriodStringOM
Monthly Bill - select the Code M (monthly
Installments-30 days)
Due today - select the Code I ( Irregular instalments Note: Default Value is Monthly
consentFlagStringM(1 or 0)
Note: to proceed with the inquiry must be 1
currencyStringOJMD
Note: Default Value is “JMD” (Jamaican Dollar)
identityNumberStringM100765653
searchCriteria request body for PR
NameTypeM\ODescription/Example
firstNameStringMMARK
middleNameStringOM
lastNameStringMEID
streetNumberStringO5601
streetNameStringMNANCY
cityStringOSIOUX FALLS
stateStringOSD
postalCodeStringM57106
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.

nametypedescriptionrequired
creditScorestringCustomer Credit ScoreN
creditProfileDatedatetimeDate and time of credit score received from the Webservice APC systemN
characteristicarrayA list of characteristics. for more detains refer below characteristic Values table.N
characteristic.namestringName of the characteristicN
characteristic.valuestringThe Value of the characteristicN
characteristic Values
nametypedescriptionrequired
highRiskFraudAlertstringRisk 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 ClassVantage 4.0 Score
A809-850
B655-808
K545-654
L544 or less
M4

Panama response datamodel :

NameTypeMandatoryDescriptionComments
creditScoreStringOCustomer 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"
creditProfileDateDateTimeMDate and time of credit score received from the Webservice APC system
Ex:-"2021-04-15T07:00:03.4Z"
curent datetime/Transaction Timestamp
creditRiskRatingStringOCustomer 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"
scoreErrorStringOExclusion 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
scoreDescriptionStringOExclusion 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 scoreErrorlong name generate this for descriptionDoes it calculate the score?
NENo existeno
NCNo calificableno
PJPersona jurídicano
FAFallecidono
MECalificable MEyes
CACalificableyes

Types of Errors (PA)

MAIN TAGPARENT TAGCHILD TAGTYPEDESCRIPTION
ResultadoValidacionEsValidoINTEGERThis 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

CodeDescription
ABorrower
CCo-Borrower
GGuarantor

Payment Periodicity

PaymentPeriodicity (JM)

CodeDescription
Mmonthly Installments-30 days
Bbimonthly Installments-60 days
Ffortnight Installments-15 days
CInstallments every five months-150 days
SInstallments every six months-180 days
Iirregular Installments
Qquarterly Installments-90 days
TTrimester four-monthly Installments-120 days
Wweekly installments - 7 days
YYearly Installments-360 days

CONTRACT TYPE (JM)

Value Description
52Fixed-line telephony
53Mobile telephony
54Water
55Gas
56Electricity
57Satellite-tv
58Cable-tv
59Internet
60Insurance

Credit Score Tranche (JM)

ScoreTrancheScore Message
239-293JEXTREMELY HIGH RISK
294-335IVERY HIGH RISK
336-378HHIGH RISK
379-397GMEDIUM HIGH RISK
398-412FMEDIUM HIGH RISK
413-429EMEDIUM RISK
430-433DMEDIUM LOW RISK
434-456CMEDIUM LOW RISK
457-476BLOW RISK
477-552AVERY 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.

ValueDescription
XGeneric Error: Contact system administrator
AThe Client has only Contract as Guarantor
BThe Subject falls below Score Range
CThe Client has only Closed Contracts by more than 3 years
DThe Client has only Contract too new to be rated
EThe Client has only Contract not updated by more than 9 months
FSuspicious missed payments
PThe Client has too many contracts
RThe Client is a Company
OSubject has no contracts
TTimeout
MSubject is new
SSubject has only services contracts

Reviews