Label Customer

The Label Customer endpoint allows you to review customers via our API. This is the same as reviewing customers in the Ravelin dashboard. This can be used to integrate reviews into your own customer management system. This is an optional integration. You may manage reviews entirely within the Ravelin dashboard.

POST api.ravelin.com/v2/label/customer

Show all
customerId string optional

The ID of the customer which you want to review.

label string optional

The label to apply to the customer.

One of: FRAUDSTER, GENUINE, POTENTIALLY_FRAUDSTER, POTENTIALLY_GENUINE, or UNREVIEWED.

comment string optional

The reason for reviewing the customer with this label.

This will appear in the audit log on the dashboard so you are able to see why this customer was reviewed.

reviewer object optional

The individual who is reviewing the customer.

Their details will appear in the audit log on the Ravelin dashboard so you are able to see who did this review.

Show definition

GET api.ravelin.com/v2/label/customer/:customerId

Request the last review of a particular customer.

Example response:

{
    "customerId": "trs-AFmNplMLJBJOhXA",
    "label": "FRAUDSTER",
    "comment": "We spoke to this customer on the phone and determined they are not a fraudster.",
    "reviewer": {
        "name": "Bilbo Baggins",
        "email": "bilbo.b@shiremail.com"
    },
    "timestamp": "2020-01-23T16:33:02Z"
}

GET api.ravelin.com/v2/labels/customer/:customerId

Request all the reviews of a particular customer.

Example response:

{
    "reviews": [
        {
            "customerId": "trs-AFmNplMLJBJOhXA",
            "label": "FRAUDSTER",
            "comment": "We spoke to this customer on the phone and determined they are not a fraudster.",
            "reviewer": {
                "name": "Bilbo Baggins",
                "email": "bilbo.b@shiremail.com"
            },
            "timestamp": "2020-01-23T16:33:02Z"
        },
        {
            "customerId": "trs-AFmNplMLJBJOhXA",
            "label": "GENUINE",
            "comment": "We spoke to this customer on the phone and determined they are not a fraudster.",
            "reviewer": {
                "name": "Bilbo Baggins",
                "email": "bilbo.b@shiremail.com"
            },
            "timestamp": "2020-01-23T17:32:58Z"
        }
    ]
}

GET api.ravelin.com/v2/label/customer?after=2019-08-05T11:26:00Z

Request all the reviews, of all customers, since a point in time.

Example response:

{
    "meta": {
        "next": "https://api.ravelin.com/v2/label/customer?scroll_id=shjfhsjdfhasdjkfwuibas"
    },
    "reviews": [
        {
            "customerId": "customer1",
            "label": "GENUINE",
            "reviewer": {
                "name": "Bilbo Baggins",
                "email": "bilbo.b@shiremail.com"
            },
            "timestamp": "2019-08-05T11:27:15Z"
        },
        {
            "customerId": "customer77",
            "label": "FRAUDSTER",
            "reviewer": {
                "name": "Frodo Baggins",
                "email": "frodo.b@shiremail.com"
            },
            "timestamp": "2019-08-06T14:21:15Z"
        }
    ]
}

Note, the comment field is not available in the response when requesting reviews of all customers.

If there are more than 1000 reviews to return, the results will be paginated. To retrieve all the results you must make GET requests to the URL supplied in the meta.next field, until you receive a response with no reviews. You must send these follow-up requests within 1 minute of the previous response.

Feedback