Response envelopes
Success:details is present for validation errors (an array of { field, message }) and for
rate-limit errors ({ limit, retryAfter }).
Error codes
Handling tips
- Branch on
error.code, not the message (messages may change). 400 INVALID_INPUTwithdetails→ surface the per-field messages to your operators.403 FORBIDDENon purchase almost always means your organization isn’tVERIFIEDyet — checkGET /api/organizations/me.403 TIER_NOT_ENTITLEDis not a transient failure and must not be retried. It means the policy was sold underDETERMINATION: MicroCrop will never settle it, and the obligation is yours. Route to the Tier 1 flow.404 NOT_FOUNDon a determination id is deliberately indistinguishable from “belongs to another organization” — the endpoint never confirms that someone else’s id is real.409 CONFLICTon farmer registration → the farmer already exists; look them up instead of re-creating.429→ back off and retry after theretryAfterseconds indetails.
Retrying a
POST /api/determinations/{id}/settlement-report after a timeout is safe:
it is idempotent on (determinationId, partnerReference) and a replay returns 200
with replayed: true and the stored report, not a 409.Removed endpoints
The org-facing wallet and reserve endpoints were removed with the non-custodial model and now return404 NOT_FOUND: GET /me/wallet, POST /me/wallet/fund, GET /me/reserve,
POST /me/reserve/deposit, POST /me/reserve/withdraw. See
Requirements.