One endpoint. One decision.
If the order already passes through a pipeline you run, skip the interface. POST the order, read the score, the factors, the reasoning, and the recommendation off the response.
curl -X POST \
https://verify-ai.tdcapps.com/api/your_org_slug/order-verification \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"orderId": "1042",
"orderAmount": 2480,
"currency": "USD",
"customerName": "D. Whitfield",
"customerEmail": "d.whitfield@example.com",
"isFirstTimeCustomer": true,
"shippingAddress": { "street": "8400 NW 25th St", "city": "Miami",
"state": "FL", "postalCode": "33122", "country": "United States" },
"billingAddress": { "street": "14 Elm Row", "city": "Leeds",
"state": "West Yorkshire", "postalCode": "LS8 2AA",
"country": "United Kingdom" },
"ipAddress": "203.0.113.24"
}'{
"success": true,
"data": {
"riskScore": 78,
"riskLevel": "high",
"riskFactors": [
{
"factor": "Shipping address is a freight forwarder",
"severity": "high",
"category": "address",
"description": "8400 NW 25th St is a package consolidation
and reshipping facility, not a residence."
}
],
"reasoning": "A first order at nine times the category average…",
"recommendations": ["Verify identity before fulfilment"]
}
}What is exposed
Deliberately small. There is one thing to ask and one answer to read, and an API that grew past that would be growth for its own sake.
- Organizations
- GET the organizations a key can reach, so a client can resolve its own slug rather than having one hardcoded.
- Order verification
- POST an order, receive a score, the risk factors, the reasoning, and the recommendations. Synchronous: the response is the result.
- Authentication
- An API key on every request, as either an x-api-key header or an Authorization bearer token. Both are accepted; pick one and be consistent.
- Rate limits
- Configurable per key, with limit, remaining, and reset returned as response headers so a client can back off before it gets a 429 rather than after.
Branch on the band, read the factors
Most integrations are this: three cases, and the factor list passed through to whoever reviews the order.
const res = await fetch(endpoint, { method: 'POST', headers, body })
const result = await res.json()
if (!result.success) throw new Error(result.message)
switch (result.data.riskLevel) {
case 'critical':
return { action: 'reject' }
case 'high':
case 'medium':
return { action: 'review', factors: result.data.riskFactors }
default:
return { action: 'approve' }
}Branch on riskLevel rather than on riskScore. The bands are fixed, so a rule written against them keeps meaning what you meant, while a hardcoded threshold of 65 is a decision you will have forgotten in a year.
What to expect
Keys, not sessions
Synchronous by design
Predictable envelopes
Rate headers on every response
Costs still metered
Same log, same record
Developer questions
How do we authenticate?
Is it synchronous?
Where should we call it from?
What are the rate limits?
Is there an SDK?
What does a failed verification cost?
Create a key and POST one order.
The free credits cover a real integration test rather than a hello-world. Start there and decide.
5 credits on signup · no card required