{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Errors","description":"REST API for the YOGO fitness platform — bookings, classes, customers, orders, teachers.","llmstxt":{"title":"YOGO API documentation","description":"REST API for the YOGO fitness platform. Customers can list classes, customers, teachers, orders, bookings, and the audit log; assign teachers to classes; and use the same data via an MCP server at mcp.yogobooking.com.","hide":false,"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"errors","__idx":0},"children":["Errors"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The API returns conventional HTTP status codes and a JSON body for every"," ","non-2xx response."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"response-shape","__idx":1},"children":["Response shape"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"statusCode\": 404,\n  \"message\": \"Customer not found\",\n  \"code\": \"NOT_FOUND\",\n  \"timestamp\": \"2026-05-07T08:30:00.000Z\",\n  \"path\": \"/customers/999\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Selected error responses include extra fields tailored for AI agents and"," ","tooling that act on errors without prior context:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"When it appears"},"children":["When it appears"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Always. Stable machine-readable classifier (e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INVALID_CURSOR"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PLAN_UPGRADE_REQUIRED"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INVALID_EXPAND"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hint"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["When the fix is non-obvious from the message alone — e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INVALID_CURSOR"]}," includes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"Restart pagination by omitting the 'after' parameter.\""]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["did_you_mean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["On ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INVALID_EXPAND"]}," when the bad value is close to a supported one (edit distance ≤ 2 or shared prefix ≥ 4 chars)."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"status-codes-youll-encounter","__idx":2},"children":["Status codes you'll encounter"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"right","data-label":"Code"},"children":["Code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"When"},"children":["When"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"What to do"},"children":["What to do"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"right"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Malformed request — bad parameter type, malformed booking ID, unknown ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expand"]}," value."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fix the request; don't retry as-is. Common codes: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INVALID_BOOKING_ID"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INVALID_CURSOR_FORMAT"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INVALID_EXPAND"]}," (with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["did_you_mean"]}," when applicable)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"right"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Missing or invalid ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-API-KEY"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Check the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/authentication"},"children":["authentication guide"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"right"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["API key is valid but the client's plan doesn't include API access."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Upgrade the plan. Body includes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code: \"PLAN_UPGRADE_REQUIRED\""]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"right"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The resource doesn't exist."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Don't retry; the ID is wrong."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"right"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["422"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Invalid pagination cursor — the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["after"]}," ID points to a resource that doesn't exist."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Restart pagination by omitting the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["after"]}," parameter. The response body's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INVALID_CURSOR"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hint"]}," repeats this guidance for agent tooling."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"right"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["429"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Rate limit exceeded."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Back off for the duration in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Retry-After"]}," header. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/rate-limiting"},"children":["rate limiting"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"right"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5xx"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Transient server error."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Retry with exponential backoff."]}]}]}]}]}]},"headings":[{"value":"Errors","id":"errors","depth":1},{"value":"Response shape","id":"response-shape","depth":2},{"value":"Status codes you'll encounter","id":"status-codes-youll-encounter","depth":2}],"frontmatter":{"title":"Errors","seo":{"title":"Errors"}},"lastModified":"2026-05-07T07:54:41.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/errors","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}