Evaluate whether a proposed spend would be approved based on current policy rules.
cURL
curl --request POST \ --url https://api.useproxy.ai/v1/spend/evaluate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "amount": 123, "customerId": "<string>", "agentId": "<string>", "cardId": "<string>", "currency": "<string>", "merchant": { "mcc": "<string>", "name": "<string>" } } '
{ "decision": "approve", "reasons": [ { "code": "<string>", "message": "<string>" } ], "flags": {}, "context": { "customerId": "<string>", "agentId": "<string>", "cardId": "<string>", "amount": 123, "currency": "<string>", "available": 123, "spendStats": { "totalDay": 123, "totalMonth": 123, "lastSpendAt": 123 }, "policy": { "requireIntent": true, "requireAttestation": true, "requireApproval": true, "autoApproveBelow": 123, "attestationWindowMinutes": 123, "cooldownMinutes": 123, "ttlMinutes": 123, "ttlDays": 123, "limits": { "perAuth": 123, "perDay": 123, "perMonth": 123 }, "allowedMccs": [ "<string>" ], "blockedMccs": [ "<string>" ], "allowedMerchants": [ "<string>" ], "lockToFirstMerchant": true } } }
API key authentication. Include your API key in the Authorization header as Bearer <api_key>.
Bearer <api_key>
Amount in cents
Show child attributes
Policy evaluation result
approve
decline