Errors

Status codes and the shape of every error.

Errors use HTTP status codes and a JSON body. message is written for people: you can show it to customers as it is.

400 Bad Request
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Pick a day in the next 30 days"
}

A body that doesn't fit the endpoint's schema says which fields are wrong:

400 Bad Request
{
  "statusCode": 400,
  "message": "Validation failed",
  "issues": {
    "formErrors": [],
    "fieldErrors": {
      "customerPhone": ["Enter a valid phone number"],
      "lines": ["Add at least one item"]
    }
  }
}

Status codes

StatusMeaningWhat to do
200 OK, 201 CreatedIt worked.
400 Bad RequestThe request is wrong: a missing field, a sold-out item, a time no longer free.Show message, or the field errors next to their fields.
401 UnauthorizedNo key, or not a current one.Check the key in Settings › Developers.
403 ForbiddenThe key is not allowed on this site.Add the site under Allowed sites.
404 Not FoundNo such product, order or service, or the store is closed.
409 ConflictA request with the same Idempotency-Key is still running.Wait a moment and retry.
429 Too Many RequestsToo many requests in a minute.Back off and retry: see Rate limits.
5xxSomething went wrong on Cashiar's side.Retry with the same Idempotency-Key.

Common messages

On this page