required
The time at which this data payload was valid. When sending events in realtime, this will usually be 'now'. This is used to merge data that arrives out-of-order. A unix timestamp preferably as an
integer count of milliseconds since |
required
The customer registering or updating their account. |
optional
An eventType should identify what event in your system triggered this API call. Pattern:
^[a-zA-Z0-9][a-zA-Z0-9-_]*$ |
optional
The device that the customer is using. Mutually exclusive with the deviceId. |
optional
The ID of the device that the customer is using. Mutually exclusive with the device. |
POST /v2/customer HTTP/1.1
Authorization: token ...
Content-Type: application/json
{
"timestamp": 1512828988826,
"customer": {
"customerId": "abc-123-ZYZ",
"registrationTime": 1512828988826,
"email": "jsmith123@example.com",
"emailVerifiedTime": 1512828988826,
"name": "John Smith",
"familyName": "Smith",
"givenName": "John",
"telephone": "+16045555555",
"telephoneVerifiedTime": 1512828988826,
"telephoneCountry": "DOM",
"tags": {
"foo": true,
"bar": false
},
"location": {
"country": "GBR",
"postalCode": "E1 1AA",
"latitude": 51.503252,
"longitude": -0.127899,
"addresseeName": "John Smith",
"street1": "123 fake st.",
"street2": "floor 4, flat 48",
"neighbourhood": "Hackney",
"zone": "1",
"city": "London",
"region": "California",
"poBoxNumber": "1234"
}
},
"device": {
"deviceId": "65fc5ac0-2ba3-4a3b-aa5e-f5a77b845260",
"ipAddress": "81.152.92.84",
"language": "en-US",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36",
"model": "Pixel XL",
"os": "android",
"type": "phone",
"manufacturer": "google",
"location": {
"country": "GBR",
"postalCode": "E1 1AA",
"latitude": 51.503252,
"longitude": -0.127899,
"addresseeName": "John Smith",
"street1": "123 fake st.",
"street2": "floor 4, flat 48",
"neighbourhood": "Hackney",
"zone": "1",
"city": "London",
"region": "California",
"poBoxNumber": "1234"
}
}
}
The HTTP response status code. |
A unix timestamp indicating when we finished handling the request. |
If an error has occurred, a description of the error. |
Contains our recommendations and related details. |
{
"status": 200,
"timestamp": 1512828988826,
"data": {
"action": "ALLOW",
"score": 12,
"source": "RAVELIN",
"customerId": "abc-123-ZYZ",
"scoreId": "2bf39d-d1299-31",
"transactionOptimisation": {
"transactionId": "123-abc-XYZ",
"action": "AUTHENTICATE",
"exemption": "TRANSACTION_RISK_ANALYSIS",
"threeDSChallengePreference": "NO_CHALLENGE_REQUESTED",
"actionSource": "CLIENT_RULE",
"rules": {
"triggered": [
{
"ruleId": 1,
"ruleVersion": 1,
"action": "AUTHENTICATE",
"exemption": "TRANSACTION_RISK_ANALYSIS",
"threeDSChallengePreference": "NO_CHALLENGE_REQUESTED",
"triggered": true,
"state": "active"
}
]
}
},
"warnings": [
{
"class": "customer-not-found",
"help": "https://developer.ravelin.com/api/warnings/#customer-not-found",
"msg": "Customer \"abc-123-ZYZ\" not found."
}
]
}
}
Was this page helpful?