POST
/tenants/{tenantId}/transactions/simulateRun earn-rule evaluation without writing to the database. The response looks identical to evaluate() — same pointsAwarded, same campaigns[] — but no member is created, no transaction is recorded, and no points are credited.
sk_test_* keys only
This endpoint is only available with test API keys. It is not available in production.
Path Parameters
Request Body
Response 200
Same shape as evaluate() — see the evaluate reference for field descriptions.
When to use simulate vs evaluate
Request
cURL
curl -X POST "https://loyalty-engine-production-e5cb.up.railway.app/v1/tenants/$TENANT_ID/transactions/simulate" \
-H "X-API-Key: sk_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"memberRef": "customer_27821234567",
"amount": 25000
}'Response
200 OK
{
"pointsAwarded": 250,
"pointsBalance": 1700,
"campaigns": [
{
"campaignId": "5a7b3c9d-...",
"campaignName": "Spend & Earn",
"pointsEarned": 250,
"rewardIds": []
}
],
"state": "PROCESSED",
"_debug": null
}