What you will complete
In this guide, you will create credentials, send one request, and verify that normalized outputs are usable in your workflow logic.
Step 1: Set your environment
Store your key in .env.local and load it only from server-side runtime.
# .env.local
MAZERIK_API_KEY=your_key_here
MAZERIK_BASE_URL=https://api.mazerik.com
Step 2: Send your first call
curl -X POST "$MAZERIK_BASE_URL/v1/txen/normalize" \
-H "Authorization: Bearer $MAZERIK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"transaction": {
"id": "txn_001",
"description": "CARD PURCHASE GROCERY MART",
"amount": 54.13,
"currency": "USD"
}
}'
Step 3: Validate response shape
{
"transaction_id": "txn_001",
"normalized_description": "grocery purchase",
"entity": {
"name": "Grocery Mart",
"confidence": 0.95
},
"category": {
"primary": "groceries",
"confidence": 0.92
},
"recurrence": {
"status": "non_recurring"
}
}
Step 4: Production checklist
- Preserve
transaction_idfor traceability. - Store raw and enriched values together.
- Add retries for
429and503only. - Use idempotency keys for safe replays.