Supplier Allocation API

Ravelin’s Supplier Allocation API allows online marketplaces to reduce opportunities for fraudulent behaviour by allocated suppliers (e.g. drivers and couriers) by avoiding high-risk allocations. An existing integration with the Core API is required for Ravelin to receive the necessary customer, order and supplier information to provide allocation recommendations.

To discuss supplier fraud prevention further, please contact us or your Account Manager.

POST /v2/supplier/allocation

Returns a recommendation (ALLOW or PREVENT) for each supplier considered for allocation to a given order.

Request

{
	"orderId": "order-123-ABC",
	"customerId": "customer-XYZ",
	"suppliers": [
		{
			"supplierId": "driver-123"
		},
		{
			"supplierId": "driver-456"
		}
	]
}
Name Type Description Example
orderId
required
string

The unique identifier of an existing order being considered for allocation.

"order-123-ABC"
customerId
required
string

The unique identifier of an existing customer whose order is being considered for allocation. (See customers.)

"customer-XYZ"
suppliers
required
array

The suppliers being considered for allocation to the order. (See suppliers.)

Name Type Description Example
supplierId
required
string

The unique identifier of an existing supplier being considered for allocation to the order. (See suppliers.)

"driver-123"

Response

{
    "recommendations": [
        {
            "supplierId": "driver-123",
            "recommendation": "ALLOW"
        },
        {
            "supplierId": "driver-456",
            "recommendation": "PREVENT",
            "reasons": [
                "Number of email addresses associated with both the customer and supplier is greater than or equal to 1."
            ]
        }
    ]
}
Name Type Description
recommendations
array

Response payload.

Name Type Description
supplierId
string

The unique identifier of the supplier being considered for allocation to the order.

recommendation
string

The recommendation for whether the supplier should be considered for allocation to the order, or excluded from allocation to the order based on their risk profile. One of ALLOW or PREVENT.

reasons
array

One or more reason strings for the recommendation, provided for analytic and debugging purposes. Reasons are only returned for a PREVENT recommendation.

Suggested handling

The most important field in the response payload is recommendation. The allocation recommendation is based on risk-based controls configured by your organisation and Ravelin, e.g. the maximum number of orders a supplier is allowed to have with a specific customer over a certain period of time.

We suggest that you filter out any suppliers with a PREVENT recommendation from allocation to the order, and consider any suppliers with an ALLOW recommendation for allocation as normal.

Should Ravelin return a PREVENT recommendation for all suppliers considered for allocation, we suggest that you either reject the order or retry the allocation process.