Errors
Every error from the Before partner API is an RFC 9457
application/problem+json body:
{
"type": "https://before.com/problems/location-required",
"title": "Unprocessable Entity",
"status": 422,
"detail": "Name the location_id to sell from; this tenant has several active locations.",
"instance": "/v1/partner/sessions",
"correlation_id": "4f6c2d1e-…",
"errors": [{ "id": "4b0d8c2e-…", "name": "Main Street Chapel" }]
}
Branch on the last segment of type, the error code. detail is for people
and can change wording at any time. Quote correlation_id when you email
hello@before.com.
Codes
| Status | Code | Route | Meaning and what to do |
|---|---|---|---|
| 400 | schema-validation-failed | sessions | The body does not match the schema. errors lists each path, code and message. Fix the request. |
| 400 | bad-request | sales | The id is not a UUID. |
| 401 | unauthorized | both | The key is missing, unknown or revoked. Check which funeral home's key you sent. |
| 403 | forbidden | both | The key may not call this route. Only the two partner routes accept API keys. |
| 404 | sale-not-found | sales | No sale with this id was opened by a key of this mode for this funeral home, or the key's user may not see it. |
| 409 | partner-reference-in-use | sessions | The reference names a sale of the other mode. Use a distinct reference. |
| 409 | sale-agent-mismatch | sessions | The sale belongs to another user, and the key's user may only see their own sales. Reopen it with the original user's key. |
| 409 | api-key-revoked | both | The key was revoked while the request was in flight. Use the new key Before issued. |
| 409 | key-user-inactive | both | The key's user is no longer an active member of the funeral home who can sell. Revoke the key and create one for the user who sells now. |
| 422 | location-required | sessions | Several active locations, or none. errors lists the active ones; send a location_id. |
| 422 | location-inactive | sessions | location_id is not an active location. errors lists the active ones. |
| 422 | prefill-invalid | sessions | A prefill value cannot be applied. errors lists each field, rule and detail; nothing was written. |
| 429 | too-many-requests | both | Rate limited. Retry with backoff. |
| 5xx | both | A fault at Before. Retry with backoff; POST /v1/partner/sessions is safe to retry because the reference makes it idempotent. |