Consumer Users

Create a Consumer User

POST

POST Consumer User

/consumer/user endpoint allows you to operate on the Consumer user entity.

In order to pass the payload of a User to Flagright and verify the User, you will need to call this endpoint with the User payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.

Payload

Each consumer user needs two mandatory fields:

  • userId - Unique identifier for the user
  • createdTimestamp - UNIX timestamp in milliseconds for when the User is created in your system

Request

This endpoint expects an object.
userId
stringRequired
Unique user ID
createdTimestamp
doubleRequired
Timestamp when userId is created
userDetails
objectOptional
Model for consumer user personal details
userStateDetails
objectOptional
kycStatusDetails
objectOptional
employmentStatus
enumOptional
occupation
stringOptional
legalDocuments
list of objectsOptional
User's legal identity documents - See Document Model for details
contactDetails
objectOptional
Model for business user contact information details
transactionLimits
objectOptional
Model for transaction limits for a given user
riskLevel
enumOptional
Allowed values: VERY_HIGHHIGHMEDIUMLOWVERY_LOW
acquisitionChannel
enumOptional
Model for User acquisition channel
reasonForAccountOpening
list of stringsOptional
sourceOfFunds
list of enumsOptional
userSegment
enumOptional
Allowed values: RETAILPROFESSIONAL
pepStatus
list of objectsOptional
tags
list of objectsOptional
Additional information that can be added via tags

Response

This endpoint returns an object
userId
string
user ID the risk score pertains to
executedRules
list of objectsOptional
Model for list of executed rules
hitRules
list of objectsOptional
Model for list of hit rules
message
stringOptional
riskScoreDetails
objectOptional

Errors

POST
1curl -X POST https://sandbox.api.flagright.com/consumer/users \
2 -H "x-api-key: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "userId": "96647cfd9e8fe66ee0f3362e011e34e8",
6 "createdTimestamp": 1641654664000,
7 "userDetails": {
8 "name": {
9 "firstName": "Baran",
10 "middleName": "Realblood",
11 "lastName": "Ozkan"
12 },
13 "dateOfBirth": "1991-01-01",
14 "countryOfResidence": "US",
15 "countryOfNationality": "DE"
16 },
17 "legalDocuments": [
18 {
19 "documentType": "passport",
20 "documentNumber": "Z9431P",
21 "documentIssuedCountry": "DE",
22 "documentIssuedDate": 1639939034000,
23 "documentExpirationDate": 1839939034000,
24 "tags": [
25 {
26 "key": "customerType",
27 "value": "wallet"
28 }
29 ]
30 }
31 ],
32 "contactDetails": {
33 "emailIds": [
34 "baran@flagright.com"
35 ],
36 "contactNumbers": [
37 "+37112345432"
38 ],
39 "websites": [
40 "flagright.com"
41 ],
42 "addresses": [
43 {
44 "addressLines": [
45 "Klara-Franke Str 20"
46 ],
47 "city": "Berlin",
48 "country": "Germany",
49 "postcode": "10557",
50 "state": "Berlin",
51 "tags": [
52 {
53 "key": "customKey",
54 "value": "customValue"
55 }
56 ]
57 }
58 ]
59 },
60 "tags": [
61 {
62 "key": "customKey",
63 "value": "customValue"
64 }
65 ]
66}'
1{
2 "userId": "96647cfd9e8fe66ee0f3362e011e34e8",
3 "executedRules": [
4 {
5 "ruleInstanceId": "ruleInstanceId",
6 "ruleName": "Proof of funds for high value transactions",
7 "ruleDescription": "If a user makes a remittance transaction >= 1800 in EUR - ask for proof of funds",
8 "ruleAction": "BLOCK",
9 "ruleHit": true,
10 "ruleId": "R-1a",
11 "vars": [
12 {
13 "value": {}
14 }
15 ],
16 "labels": [
17 "UNEXPECTED_BEHAVIOR"
18 ],
19 "nature": "AML",
20 "isShadow": true
21 }
22 ],
23 "hitRules": [
24 {
25 "ruleInstanceId": "ruleInstanceId",
26 "ruleName": "Proof of funds for high value transactions",
27 "ruleDescription": "If a user makes a remittance transaction >= 1800 in EUR - ask for proof of funds",
28 "ruleAction": "BLOCK",
29 "ruleId": "R-1a",
30 "labels": [
31 "UNEXPECTED_BEHAVIOR"
32 ],
33 "nature": "FRAUD",
34 "isShadow": true
35 }
36 ],
37 "message": "message",
38 "riskScoreDetails": {
39 "kycRiskScore": 1.1,
40 "craRiskScore": 1.1,
41 "kycRiskLevel": "VERY_HIGH",
42 "craRiskLevel": "VERY_HIGH"
43 }
44}