KanalKanal API
Getting started

Errors

Error format, status codes, and how to handle them.

Errors are returned as JSON with the relevant HTTP status code.

Validation errors (422)

Invalid payloads return Laravel's standard validation shape:

422 Unprocessable Entity
{
  "message": "The customer.phone field is required.",
  "errors": {
    "customer.phone": ["The customer.phone field is required."]
  }
}

errors is keyed by field path (dot notation for nested fields). These are not retryable — fix the payload before sending again.

Other errors

4xx / 5xx
{ "error": "API key does not authorize this store" }

Status code reference

StatusMeaningRetry?
200Updated an existing record
201Created a new record
204Deleted (no body)
400Malformed requestNo
401Missing or invalid API keyNo
403Key not authorized for this storeNo
404Store or record not foundNo
422Validation failedNo
429Rate limit exceededYes — honor Retry-After
5xxTransient server errorYes — exponential backoff
2xx        → success, done
4xx (≠429) → log and alert, do NOT retry (payload/credentials bug)
429        → wait Retry-After, then retry
5xx / net  → exponential backoff + jitter, retry safely

Retries are always safe because writes are idempotent on (store_id, external_id) — see Idempotency.

On this page