PlanDocket

Error Handling

How the API communicates errors and how to handle them.

HTTP Status Codes

Code Description
200 Request successful
201 Resource successfully created
204 Success, no content returned (e.g. on DELETE)
400 Bad request
401 Not authenticated
403 No permission (missing scope, feature not in your plan, or plan limit reached: "code": "plan_limit_reached")
404 Resource not found (also returned when a lookup filter such as event_key, category_key, customer_number or invoice_number matches nothing)
405 HTTP method not allowed
409 Conflict with the current state (e.g. the record has already been invoiced)
422 Validation error
429 Request limit exceeded
500 Internal server error

Error Format

// Validation error (422)
{
  "error": "Validation failed",
  "errors": {
    "email": ["The email field is required."],
    "name": ["The name must be at least 2 characters."]
  }
}

// Bad request (400, 401, 403, 404, 429, 500)
{
  "error": "Resource not found"
}