Registration

POST /v2/registration

This endpoint is used to request a recommendation when a customer or supplier attempts to register for a new account. Ravelin will recommend whether you should allow the user to register. This endpoint is also used to notify Ravelin about the outcome of registration attempts.

Show all definitions
timestamp integer required

Time at which the user requested the registration. A unix timestamp preferably as an integer count of milliseconds since 1970-01-01T00:00 UTC (nanoseconds are also accepted).

registration object required

The details of the user who is registering. If a customer is registering provide additional details in the customer field. If a supplier is registering provide additional details in the supplier field.

Show definition
customer object optional

The customer trying to register.

Show definition
supplier object optional

The supplier trying to register.

Show definition
device object optional

The device used by the customer to trigger this update.

Show definition
POST https://api.ravelin.com/v2/registration HTTP/1.1
Authorization: token ...
Content-Type: application/json

{
    "timestamp": 1512828988826,
    "registration": {
        "app": {
            "name": "Our App Lite",
            "platform": "web",
            "domain": "us.brand.com"
        },
        "username": "test1@ravelin.com",
        "registrationMechanism": {
            "password": {
                "passwordHashed": "ef92b778bafe771e89245b89ecbc08a44a4e166c06659911881f383d4473e94f",
                "success": false,
                "failureReason": "PASSWORD_TOO_SIMPLE"
            }
        },
        "guestAccount": false,
        "marketingEmailsEnabled": false,
        "success": false
    },
    "supplier": {
        "supplierId": "abc-123-ZYZ",
        "groupId": "abc-123",
        "groupName": "Burger Chain",
        "email": "jsmith123@example.com",
        "emailVerifiedTime": 1512828988826,
        "name": "John Smith",
        "telephone": "+16045555555",
        "telephoneVerifiedTime": 1512828988826,
        "telephoneCountry": "GBR",
        "type": "driver",
        "level": "gold",
        "employmentType": "selfEmployed",
        "transportType": "car",
        "category": "private-hire",
        "tags": {
            "foo": true,
            "bar": false
        }
    },
    "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"
        }
    }
}

Response

Show all definitions
status integer

The HTTP response status code.

timestamp integer

A unix timestamp indicating when we finished handling the request.

message string

If an error has occurred, a description of the error.

data object

Contains our recommendations and related details.

Show definition
{
  "status": 200,
  "timestamp": 1512828998826,
  "data": {
    "action": "PREVENT",
    "source": "RULE",
    "supplierId": "abc-123-ZYZ",
    "rules": {
      "passiveAction": "PREVENT",
      "triggered": [
        {
          "ruleId": 123,
          "ruleVersion": 1,
          "state": "active",
          "action": "PREVENT",
          "description": "Registration email is from a disposable email provider is equal to true."
        }
      ]
    }
  }
}

Feedback

© Ravelin Technology Ltd. All rights reserved