Customer API
Retrieves the aggregated data for a single customer, including their risk score and a list of related predictions.
This API response conforms to JSON:API v1.1.
Authorizations
Path parameters
customer_idstringRequired
The ID of the customer whose data is being retrieved.
Query parameters
fields[customer]stringOptionalExample:
Comma-separated list of customer fields (e.g., "analytics,predictions")
analytics,predictionsResponses
200
Successful response with customer data and related orders.
application/json
Responseall of
403
Forbidden
application/json
404
Resource not found.
application/json
503
Internal Server Error.
application/json
get
/customers/{customer_id}GET /data-api/v1/customers/{customer_id} HTTP/1.1
Host: api-partner.botnot.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"meta": {
"trace_id": "Ib4BBjmroAMEMng="
},
"data": {
"type": "customer",
"id": "c123",
"attributes": {
"predictions": [
{
"risk_type": "return_abuse",
"risk_score": 1,
"risk_level": "low",
"explanation": "Some very long explanation that explains our decision making",
"created_at": "2025-10-29T12:29:17.660Z",
"updated_at": "2025-10-29T12:29:17.660Z",
"model_version": "v1.0.8"
}
],
"analytics": {
"orders": {
"days_since_last_order": 0,
"first_order_date": "2024-07-10T10:54:59-06:00",
"first_order_id": "5982959861953",
"last_order_date": "2025-03-12T10:54:59-06:00",
"last_order_id": "123",
"last_order_name": "11096158",
"num_items": 30,
"num_orders": 6,
"num_orders_fulfilled": 6,
"num_orders_subscription": 0,
"num_titles": 4,
"number_of_offline_orders": 0,
"number_of_online_orders": 6,
"recent_num_orders": 6,
"updated_at": "2025-03-13T13:55:08.525888+00:00"
},
"refunds": {
"fulfilled_and_refund_pct": 0,
"item_fulfilled_and_refund_pct": 0,
"item_num_fulfilled_and_refunds": 0,
"item_num_refunds": 0,
"item_refund_pct": 0,
"num_fulfilled_and_refunds": 0,
"num_refunds": 0,
"refund_pct": 0,
"refund_signatures_detail": [],
"total_num_fulfilled_items": 30,
"total_num_items": 30,
"total_refunds": 0,
"updated_at": "2025-03-13T13:55:08.522892+00:00"
}
}
},
"relationships": {
"orders": {
"data": [
{
"type": "order",
"id": "text"
}
]
}
}
},
"included": [
{
"type": "order",
"id": "text",
"attributes": {
"predictions": [
{
"risk_type": "return_abuse",
"risk_score": 1,
"risk_level": "low",
"explanation": "Some very long explanation that explains our decision making",
"created_at": "2025-10-29T12:29:17.660Z",
"updated_at": "2025-10-29T12:29:17.660Z",
"model_version": "v1.0.8"
}
]
}
}
]
}Last updated
Was this helpful?
