INVOICE PACKET PREFLIGHT · API QUICKSTART
Connect your workflow
Check structured invoice and work-order records against your saved requirements. Get specific findings your team can act on.
Payments are disabled. Signing in or creating a key does not grant checks. Use fictional data while preview restrictions apply. The free browser demo needs no account.
1. Save requirements in your account
Sign in to your workspace and save a rule ID and version. Review every supported requirement. Saved versions are immutable; changed requirements need a new version. Rules belong to your account and are not an endorsement by a property manager.
An integration key can check packets, but cannot create or manage rules. Browser checks can use a verified signed-in session; integration keys are for your software.
2. Keep your integration key private
Create a labeled key only when authorized and copy it directly into your own secret manager or server environment. It is shown once. Never place it in frontend code, source control, URLs or support messages. Revoke it in your account when no longer needed.
Keys authorize only POST /preflight. All checks still require eligible account quota. The API uses your saved rule and its server clock; you cannot override the account, rules, payment mode or evaluation time in a request.
3. Send a fictional packet
First save the matching fictional UTC rules under synthetic-reviewable-example, version 1. Then download a fresh example with completion set to one hour ago. This button only creates a local file; it does not send a check or create access.
Set LATCHGROVE_API_KEY through your secure runtime configuration. Generate a UUID once for this check and keep it for retries. Run this from the directory containing your downloaded latchgrove-request.json.
LATCHGROVE_REQUEST_ID="$(python -c 'import uuid; print(uuid.uuid4())')"
curl --fail-with-body --silent --show-error \
'https://zjmdzogypzvyemkxplul.supabase.co/functions/v1/latchgrove-api/preflight' \
-H "Authorization: Bearer $LATCHGROVE_API_KEY" \
-H 'Content-Type: application/json' \
-H "Idempotency-Key: $LATCHGROVE_REQUEST_ID" \
--data-binary @latchgrove-request.json4. Read findings and retry safely
HTTP 200 means the check ran. Inspect result.status: pass, review or blocked. Findings include a code, field path, message and correction. A pass covers only the supplied structured data and supported rules. It is not buyer approval or a payment guarantee.
The response also includes replayed and remaining. Each new valid evaluation consumes one check, including review and blocked results. Invalid input consumes none. Repeating the same logical body and UUID returns the saved result without another debit. A changed body under that UUID returns 409.
After a timeout or uncertain response, reuse the same UUID. Generate a new one only for an intentional new check. Saved-result replay expires after 24 hours; an expired retry does not authorize silently creating a new charged check.
- 401
- Missing, invalid or revoked credential; expired session
- 402
- No eligible access or exhausted quota
- 403
- Disallowed origin, key scope or sandbox account
- 404
- Rule version or route unavailable
- 409
- Conflicting retry, expired result or immutable-rule conflict
- 413 / 415
- Body too large / use uncompressed application/json
- 422
- Malformed or unsupported input; correct before submitting
- 429
- Rate limit; respect Retry-After
- 503
- Service unavailable; retry an uncertain check with the same UUID
Current contract and coverage
Use integer cents and whole-number quantities. Decimal or exponent JSON numbers, unknown fields, duplicate keys and null amounts are rejected. Limit requests to 128 KiB, 200 line items and 200 evidence entries. Account requests share a 60-per-minute limit.
Timestamps require seconds, an explicit offset or Z, at most milliseconds and years 2000–2099. Completion offsets must currently match the saved IANA timezone at that instant. Equivalent UTC and local-offset strings can therefore produce TIMEZONE_OFFSET_MISMATCH; use UTC rules with UTC timestamps for the example. Deadlines mean inclusive elapsed hours, not business days or weekly payment cutoffs.
The service checks supplied records and an evidence manifest. It does not read uploaded documents, verify evidence authenticity or work quality, submit to portals, or guarantee acceptance. Requirements outside the saved rule contract need separate review.
Raw packet bodies are not stored by application code. Findings may contain supplied identifiers. Result contents have a 24-hour replay lifetime and hourly cleanup, normally cleared within about 25 hours when healthy; errors or backlogs may delay it. Usage, hashes, references, saved rules and billing records remain separately. See the privacy notice.