Route API

Assigns each record a destination using first-match-wins over an ordered rule set, falling back to a default when nothing matches. Reuses the shared safe rule engine. Deterministic and total — every record gets a destination. Billed per record.

What it does

Assign each record a destination by first-match-wins rules.

When to use it

Reach for Route when you need to answer: Where should this record go? It sits in the Decide stage of the catalog — score records and verify claims.

Endpoint & cost

POST /api/v1/route

Cost: Per credit. Zaps draw down your shared monthly allowance; requests that fail validation are not charged.

Authentication

Send your key as a bearer token: Authorization: Bearer zap_live_…. See Authentication for key management and the alternate header.

Example request

curl https://zapinner.com/api/v1/route \
  -H "Authorization: Bearer zap_live_••••••" \
  -H "Content-Type: application/json" \
  -d '{"data":{"region":"EU"},"rules":[{"name":"eu","when":[{"field":"region","op":"eq","value":"EU"}],"then":{"destination":"eu-queue"}}],"fallback":"default-queue"}'
Every response is structured JSON and includes a request_id. Full field-level request and response schemas for this endpoint live in the OpenAPI spec and the API reference.

Errors & limits

Errors use one consistent shape ( error.code, error.message, request_id). See Errors and Rate limits.

SDK

Route has typed methods in both the JavaScript and Python SDKs. Both are implemented and package-ready but not yet published to npm / PyPI — until they ship, vendor the package source or install from a git ref, or call the endpoint over HTTPS with the example above.

Try it

Select Route in the playground to see the request, or run it live with your API key.

  • Score Produce a structured priority score with a transparent factor breakdown.
  • Verification Check whether a claim is actually supported by the evidence you supply.
  • Rules Evaluate a data-only rule set against every record.