Back to Documentation
API Reference
API Reference
Comprehensive reference for all REST API endpoints with request and response examples.
Authentication
All requests require authentication
Authentication is passed via HTTP headers on every request. Include the following headers:
| Header | Required | Description |
|---|---|---|
X-Api-Key | Required | Your API key from Settings page |
X-Tenant-Id | Required | Your tenant identifier for multi-tenant isolation |
Content-Type | Conditional | Required for POST/PUT requests: application/json |
bash
curl -X GET https://api.qawaid.ai/api/v1/rules \
-H "X-Api-Key: qw_live_your_api_key" \
-H "X-Tenant-Id: your-tenant-id"Base URL
https://api.qawaid.aiAll API paths are relative to this base URL. Always use HTTPS in production.
POST
/api/v1/validation/validateValidate a single payload against all published rules in the given context.
200Validation result returned400Invalid request body401UnauthorizedRequest Body
json
{
"context": "loan-application",
"payload": {
"applicant": { "age": 25, "income": 75000 },
"loan": { "amount": 250000, "term": 30 }
}
}Response
json
{
"isValid": false,
"totalRulesEvaluated": 5,
"failures": [
{
"ruleCode": "INCOME-RATIO-001",
"ruleName": "Income to Loan Ratio",
"severity": "Error",
"message": "Loan amount exceeds 3x annual income",
"errorCode": "INCOME_RATIO",
"fieldPath": "loan.amount",
"actualValue": 250000,
"expectedValue": 225000
}
],
"executionTimeMs": 12
}bash
curl -X POST https://api.qawaid.ai/api/v1/validation/validate \
-H "X-Api-Key: qw_live_your_api_key" \
-H "X-Tenant-Id: your-tenant-id" \
-H "Content-Type: application/json" \
-d '{
"context": "loan-application",
"payload": {
"applicant": { "age": 25, "income": 75000 },
"loan": { "amount": 250000, "term": 30 }
}
}'POST
/api/v1/validation/validate-batchValidate multiple payloads in a single request. Ideal for bulk data processing scenarios.
200Batch results returned400Invalid request body401UnauthorizedRequest Body
json
{
"context": "order-validation",
"items": [
{ "id": "order-1", "payload": { "total": 150, "currency": "USD" } },
{ "id": "order-2", "payload": { "total": 25, "currency": "USD" } },
{ "id": "order-3", "payload": { "total": 500, "currency": "EUR" } }
]
}Response
json
{
"results": [
{ "id": "order-1", "isValid": true, "failures": [] },
{ "id": "order-2", "isValid": false, "failures": [{ "ruleCode": "MIN-ORDER-001", "message": "Order must be at least $50" }] },
{ "id": "order-3", "isValid": true, "failures": [] }
],
"totalProcessed": 3,
"totalFailed": 1,
"executionTimeMs": 28
}bash
curl -X POST https://api.qawaid.ai/api/v1/validation/validate-batch \
-H "X-Api-Key: qw_live_your_api_key" \
-H "X-Tenant-Id: your-tenant-id" \
-H "Content-Type: application/json" \
-d '{
"context": "order-validation",
"items": [
{ "id": "order-1", "payload": { "total": 150, "currency": "USD" } },
{ "id": "order-2", "payload": { "total": 25, "currency": "USD" } }
]
}'POST
/api/v1/validation/validate-transactionValidate a complete transaction with multiple rule contexts evaluated atomically.
200Transaction result returned400Invalid request body401UnauthorizedRequest Body
json
{
"transactionId": "txn-20240115-001",
"contexts": ["kyc-check", "aml-screening", "credit-assessment"],
"payload": {
"customer": { "name": "John Doe", "country": "US", "pep": false },
"transaction": { "amount": 50000, "type": "wire-transfer" }
}
}Response
json
{
"transactionId": "txn-20240115-001",
"overallResult": "Rejected",
"contextResults": [
{ "context": "kyc-check", "isValid": true, "failures": [] },
{ "context": "aml-screening", "isValid": true, "failures": [] },
{ "context": "credit-assessment", "isValid": false, "failures": [
{ "ruleCode": "CREDIT-LIMIT-001", "message": "Amount exceeds single transaction limit" }
]}
],
"executionTimeMs": 45
}bash
curl -X POST https://api.qawaid.ai/api/v1/validation/validate-transaction \
-H "X-Api-Key: qw_live_your_api_key" \
-H "X-Tenant-Id: your-tenant-id" \
-H "Content-Type: application/json" \
-d '{
"transactionId": "txn-20240115-001",
"contexts": ["kyc-check", "aml-screening", "credit-assessment"],
"payload": {
"customer": { "name": "John Doe", "country": "US" },
"transaction": { "amount": 50000, "type": "wire-transfer" }
}
}'HTTP Status Codes
| Code | Status | Description |
|---|---|---|
200 | OK | Request succeeded |
201 | Created | Resource created successfully |
204 | No Content | Resource deleted successfully |
400 | Bad Request | Invalid request body or parameters |
401 | Unauthorized | Missing or invalid API key |
402 | Payment Required | Payment method required for plan change |
404 | Not Found | Resource does not exist |
409 | Conflict | Resource state conflict (e.g., duplicate or wrong status) |
429 | Too Many Requests | Rate limit exceeded, retry after cooldown |
500 | Server Error | Internal server error, contact support |
Ready to Integrate?
Download our Postman collection or follow the integration guides to get started.