/ docsWebsite

Handle the unexpected.

Predictable validation, version conflicts, and bounded requests.

JSON responses#

Always send Accept: application/json. JSON requests also need Content-Type: application/json. Laravel validation errors contain a message and an errors object keyed by field. Other errors generally contain a message. Do not depend on exact wording or development debug fields.

422 · illustrative response
{
  "message": "The version field is required.",
  "errors": {
    "version": [
      "The version field is required."
    ]
  }
}

HTTP status codes#

StatusMeaning / next action
200 / 201 / 202 / 204Success / created / queued / no content. Parse only responses with a body.
400Malformed request. Check the request format.
401Missing, expired, invalid or revoked credential. Reauthenticate.
403Insufficient scope or inactive restaurant.
404Missing or inaccessible resource.
409Version conflict. Fetch the latest resource before retrying.
422Validation or invalid business transition. Correct input.
429Rate or capacity limit. Back off with jitter; honor Retry-After when supplied.
500 / 503Server or provider unavailable. Back off, then reconcile uncertain writes.

Rate limits#

The business API allows 180 requests per minute per IP, with an additional limit of 120 requests per minute per API key. Both limits apply.

The key limiter can return 429 without Retry-After, so implement your own bounded exponential backoff with jitter. Do not retry validation failures unchanged.

Optimistic concurrency#

Read a resource’s integer version, include it in supported edits, and retain the returned latest version. On 409, fetch the record again. Avoid automatically applying an outdated edit after refresh.

Retries and duplicates#

GET requests can usually be retried. Treat POST timeouts as ambiguous outcomes. Restaurant order creation has no general idempotency mechanism; unique reference validation is a guard, not an idempotent replay response.

Search guides, endpoints, parameters and authentication.