This endpoint is deprecated. Send order details in a Checkout Request.
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 |
The order describing the goods or services the customer wants to, or has attempted to buy. |
An eventType should identify what event in your system triggered this API call. Pattern:
^[a-zA-Z0-9][a-zA-Z0-9-_]*$ |
The ID of the customer whose order is being submitted or updated. |
A temporary ID for a customer when the real account ID has yet to be minted. This must eventually be sent in conjunction with a real customer ID to migrate the data into the full customer account. |
The device used by the customer to trigger this update. |
The ID of the device used by the customer to trigger this update. |
POST https://api.ravelin.com/v2/order HTTP/1.1
Authorization: token ...
Content-Type: application/json
{
"timestamp": 1512828988826,
"customerId": "abc-123-ZYZ",
"tempCustomerId": "abc-123-XYZ",
"order": {
"orderId": "abcde12345-ZXY",
"creationTime": 1512828988826,
"app": {
"name": "Our App Lite",
"platform": "web",
"domain": "us.brand.com"
},
"status": {
"stage": "pending",
"actor": "merchant"
},
"price": 10000,
"currency": "GBP",
"country": "GBR",
"market": "emea",
"marketCity": "london",
"category": "delivery",
"to": {
"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"
},
"from": {
"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"
},
"items": [
{
"sku": "delivery",
"quantity": 1,
"name": "Delivery Fee",
"price": 10000,
"currency": "GBP",
"category": "delivery",
"executionTime": 1512828988826,
"eventTicket": {
"ticket": {
"ticketId": "ticket_123",
"ticketType": "Adult Single Day Pass",
"validFromTime": 1480330580,
"validUntilTime": 1480340580
},
"event": {
"eventId": "event_123",
"name": "The Fitzwilliam Museum.",
"description": "Fitzwilliam Museum, Exhibition of Old Things",
"startTime": 1480340580,
"endTime": 1480340580,
"category": "music",
"venue": {
"name": "Royal Albert Hall",
"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"
}
}
},
"guest": {
"familyName": "Smith",
"givenName": "John",
"name": "John Smith"
}
}
}
],
"shipping": {
"daysToDispatch": 3,
"carrier": "DHL"
},
"accountType": "REGISTERED",
"email": "jsmith@example.com",
"telephone": "+441234558887",
"telephoneCountry": "GBR",
"sellerId": "abcde12345-ZXY",
"executionTime": 1512828988826,
"suppliers": [
{
"supplierId": "abc-123-ZYZ",
"status": {
"stage": "fulfilled",
"timestamp": 1512828988826,
"reason": "Could not find passenger"
},
"fee": 250,
"debt": 1000,
"tip": 200,
"currency": "GBP",
"type": "courier"
}
]
},
"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"
}
}
}
Parameter | Type | Description |
---|---|---|
customerId | string | Identifier for this customer, as supplied by the client |
action | string | Action to take for this customer, according to Ravelin. One of ALLOW , REVIEW , PREVENT |
score | int | Ravelin score for this customer as an integer. Debugging purposes only |
source | string | Source of the score, e.g. RAVELIN or MANUAL_REVIEW |
scoreId | string | Unique identifier for this score |
comment | string | In the case of manual review, this is the comment left by the reviewer on this particular review action. E.g.: "Definitely not a fraudster, I know him personally" , or "I know this person from another account, infamous fraudster" |
warnings | array of warnings | Ravelin can return warnings on API responses when malformed or absent data may negative impact fraud-detection, but where we would rather return a best-effort score instead of out-right rejecting the API request. |
Was this page helpful?