{
  "swagger": "2.0",
  "info": {
    "title": "Atlas Labs API",
    "description": "Fictional 30-minute business sandbox. Every response has meta.simulation: true. Also reachable from MCP clients (Claude, Cursor, ChatGPT connectors) over Streamable HTTP at /labs/mcp — see docs/MCP.md and the labs://guide resource.",
    "version": "2026-09"
  },
  "host": "automationatlas.io",
  "basePath": "/labs/api/v1",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "api_key": {
      "type": "apiKey",
      "in": "header",
      "name": "Authorization",
      "x-ms-summary": "Sandbox key",
      "description": "Your Atlas Labs sandbox key as \"Bearer lab_fac_...\" or \"Bearer lab_off_...\" (Factory routes need lab_fac_, Head Office routes need lab_off_; the wrong one gets 403 wrong_system)."
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "paths": {
    "/": {
      "get": {
        "summary": "API index",
        "description": "Self-describing index (PLAN §4.2): what Atlas Labs is, how to start, key prefixes and headers, a create-sandbox example, links to OpenAPI, docs, llms files and MCP (with the labs://guide resource), and next_actions. Fictional simulation.",
        "operationId": "getApiIndex",
        "x-ms-summary": "API index",
        "tags": [
          "public"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/events": {
      "get": {
        "summary": "List events",
        "description": "Cursor feed of this fictional sandbox's events, seq-ascending after after_seq. Optional wait (≤25 s) long-polls. Either a Factory or Head Office key. Example: GET /labs/api/v1/events?after_seq=0&wait=0&system=office",
        "operationId": "listEvents",
        "x-ms-summary": "List events",
        "tags": [
          "events"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "after_seq",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "wait",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 0,
            "maximum": 25,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "system",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "factory",
              "office",
              "world"
            ],
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/exports": {
      "post": {
        "summary": "Create a CSV export link",
        "description": "Mint a read-only, tokenised CSV export URL for one dataset, valid for 30 minutes. GET on that URL needs no auth header at all, so Excel Power Query and Google Sheets IMPORTDATA can pull it directly. Either key; Idempotency-Key honoured. At most 10 live tokens per sandbox. Datasets: sales_orders, customers, work_orders, print_runs, purchase_orders, supplier_invoices, customer_invoices, ledger, inventory, employees, timesheets, payroll_runs — the last three (employees, timesheets, payroll_runs) need modules.hr. Errors: 422 invalid_dataset, 404 module_disabled, 409 export_limit_reached. Example: {\"dataset\":\"sales_orders\"}",
        "operationId": "createExport",
        "x-ms-summary": "Create a CSV export link",
        "tags": [
          "exports"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "dataset"
              ],
              "properties": {
                "dataset": {
                  "type": "string",
                  "enum": [
                    "sales_orders",
                    "customers",
                    "work_orders",
                    "print_runs",
                    "purchase_orders",
                    "supplier_invoices",
                    "customer_invoices",
                    "ledger",
                    "inventory",
                    "employees",
                    "timesheets",
                    "payroll_runs"
                  ],
                  "x-ms-visibility": "important"
                }
              },
              "example": {
                "dataset": "sales_orders"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/exports/{token}": {
      "get": {
        "summary": "Download a CSV export",
        "description": "Download a dataset CSV by its export token — no Authorization header, so spreadsheet tools can fetch it directly (e.g. Power Query \"From Web\", Google Sheets =IMPORTDATA(...)). A wrong, expired, revoked or forged token returns the identical 404 as one that never existed. Example: GET /labs/api/v1/exports/xpt_01J….csv",
        "operationId": "downloadExport",
        "x-ms-summary": "Download a CSV export",
        "tags": [
          "exports"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "dataset",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "token",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/factory": {
      "get": {
        "summary": "Get the Factory overview",
        "description": "Press state, stock and dock of this fictional Factory simulation. Example: GET /labs/api/v1/factory",
        "operationId": "getFactory",
        "x-ms-summary": "Get the Factory overview",
        "tags": [
          "factory"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/factory/deliveries": {
      "get": {
        "summary": "List Factory deliveries",
        "description": "Supplier deliveries at the dock in this fictional Factory simulation. Example: GET /labs/api/v1/factory/deliveries",
        "operationId": "listFactoryDeliveries",
        "x-ms-summary": "List Factory deliveries",
        "tags": [
          "factory"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/factory/goods-receipts": {
      "post": {
        "summary": "Receive a delivery into stock",
        "description": "Record a goods receipt against a dock delivery in this fictional Factory simulation. Example: {\"delivery_id\":\"dlv_xxx\",\"quantity_received\":4000}",
        "operationId": "createFactoryGoodsReceipt",
        "x-ms-summary": "Receive a delivery into stock",
        "tags": [
          "factory"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "delivery_id",
                "quantity_received"
              ],
              "properties": {
                "delivery_id": {
                  "minLength": 3,
                  "maxLength": 64,
                  "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
                  "type": "string",
                  "x-ms-visibility": "important"
                },
                "quantity_received": {
                  "minimum": 0,
                  "maximum": 1000000,
                  "type": "integer",
                  "x-ms-visibility": "important"
                }
              },
              "example": {
                "delivery_id": "dlv_xxx",
                "quantity_received": 4000
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/factory/inventory": {
      "get": {
        "summary": "List Factory stock",
        "description": "Paper, ink and atlas stock with warehouse caps for this fictional Factory simulation. Example: GET /labs/api/v1/factory/inventory",
        "operationId": "listFactoryInventory",
        "x-ms-summary": "List Factory stock",
        "tags": [
          "factory"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/factory/inventory/reorder-points": {
      "patch": {
        "summary": "Update reorder points",
        "description": "Set paper and ink reorder points in this fictional Factory simulation. Example: {\"paper_reorder_point\":8000,\"ink_reorder_point\":20000}",
        "operationId": "updateReorderPoints",
        "x-ms-summary": "Update reorder points",
        "tags": [
          "factory"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "paper_reorder_point",
                "ink_reorder_point"
              ],
              "properties": {
                "paper_reorder_point": {
                  "minimum": 0,
                  "maximum": 50000,
                  "type": "integer",
                  "x-ms-visibility": "important"
                },
                "ink_reorder_point": {
                  "minimum": 0,
                  "maximum": 200000,
                  "type": "integer",
                  "x-ms-visibility": "important"
                }
              },
              "example": {
                "paper_reorder_point": 8000,
                "ink_reorder_point": 20000
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/factory/ping": {
      "get": {
        "summary": "Check a Factory key",
        "description": "Confirms that a Factory key (`lab_fac_...`) is valid and returns the system and sandbox ID it belongs to. A Head Office key gets 403 wrong_system.",
        "operationId": "pingFactory",
        "x-ms-summary": "Check a Factory key",
        "tags": [
          "factory"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/factory/print-runs": {
      "get": {
        "summary": "List print runs",
        "description": "Print runs in this fictional Factory simulation. Example: GET /labs/api/v1/factory/print-runs",
        "operationId": "listPrintRuns",
        "x-ms-summary": "List print runs",
        "tags": [
          "factory"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "post": {
        "summary": "Start a print run",
        "description": "Start a print run in this fictional Factory simulation. Example: {\"quantity\":10,\"edition\":\"standard\"}",
        "operationId": "createPrintRun",
        "x-ms-summary": "Start a print run",
        "tags": [
          "factory"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "quantity",
                "edition"
              ],
              "properties": {
                "quantity": {
                  "minimum": 1,
                  "maximum": 100,
                  "type": "integer",
                  "x-ms-visibility": "important"
                },
                "edition": {
                  "type": "string",
                  "enum": [
                    "standard",
                    "gilded"
                  ],
                  "x-ms-visibility": "important"
                }
              },
              "example": {
                "quantity": 10,
                "edition": "standard"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/factory/print-runs/{id}": {
      "get": {
        "summary": "Get a print run",
        "description": "A single print run in this fictional Factory simulation. Example: GET /labs/api/v1/factory/print-runs/pr_xxx",
        "operationId": "getPrintRun",
        "x-ms-summary": "Get a print run",
        "tags": [
          "factory"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/factory/requisitions": {
      "get": {
        "summary": "List Factory requisitions",
        "description": "Material requisitions in this fictional Factory simulation. Example: GET /labs/api/v1/factory/requisitions",
        "operationId": "listFactoryRequisitions",
        "x-ms-summary": "List Factory requisitions",
        "tags": [
          "factory"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "post": {
        "summary": "Raise a requisition",
        "description": "Open a paper or ink requisition in this fictional Factory simulation. Example: {\"material\":\"paper\",\"quantity\":5000,\"needed_by\":4}",
        "operationId": "createFactoryRequisition",
        "x-ms-summary": "Raise a requisition",
        "tags": [
          "factory"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "material",
                "quantity",
                "needed_by"
              ],
              "properties": {
                "material": {
                  "type": "string",
                  "enum": [
                    "paper",
                    "ink"
                  ],
                  "x-ms-visibility": "important"
                },
                "quantity": {
                  "minimum": 1,
                  "maximum": 1000000,
                  "type": "integer",
                  "x-ms-visibility": "important"
                },
                "needed_by": {
                  "minimum": 0,
                  "maximum": 10000,
                  "type": "integer",
                  "x-ms-visibility": "important"
                }
              },
              "example": {
                "material": "paper",
                "quantity": 5000,
                "needed_by": 4
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/factory/shipments": {
      "get": {
        "summary": "List Factory shipments",
        "description": "Shipments in this fictional Factory simulation. Example: GET /labs/api/v1/factory/shipments",
        "operationId": "listFactoryShipments",
        "x-ms-summary": "List Factory shipments",
        "tags": [
          "factory"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "post": {
        "summary": "Ship finished atlases",
        "description": "Ship a ready work order, or deliver atlases against an accepted contract lot (partial deliveries sum; revenue is booked at the lot price), in this fictional Factory simulation. 409 insufficient_stock, 409 lot_expired, 409 lot_not_accepted. Example: {\"work_order_id\":\"wo_xxx\"} or {\"contract_lot_id\":\"lot_xxx\",\"quantity\":50}",
        "operationId": "createFactoryShipment",
        "x-ms-summary": "Ship finished atlases",
        "tags": [
          "factory"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "work_order_id"
              ],
              "properties": {
                "work_order_id": {
                  "minLength": 3,
                  "maxLength": 64,
                  "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
                  "type": "string",
                  "x-ms-visibility": "important"
                }
              },
              "example": {
                "work_order_id": "wo_xxx"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/factory/timesheets": {
      "get": {
        "summary": "List Factory timesheets",
        "description": "HR: daily hours per employee in this fictional Factory simulation. 404 module_disabled when HR is off. Example: GET /labs/api/v1/factory/timesheets",
        "operationId": "listFactoryTimesheets",
        "x-ms-summary": "List Factory timesheets",
        "tags": [
          "factory"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/factory/work-orders": {
      "get": {
        "summary": "List work orders",
        "description": "Work orders in this fictional Factory simulation. Example: GET /labs/api/v1/factory/work-orders",
        "operationId": "listWorkOrders",
        "x-ms-summary": "List work orders",
        "tags": [
          "factory"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "post": {
        "summary": "Create a work order",
        "description": "Bridge an accepted sales order into a work order in this fictional Factory simulation. Example: {\"sales_order_id\":\"so_xxx\",\"quantity\":10,\"due_date\":5}",
        "operationId": "createWorkOrder",
        "x-ms-summary": "Create a work order",
        "tags": [
          "factory"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "sales_order_id",
                "quantity",
                "due_date"
              ],
              "properties": {
                "sales_order_id": {
                  "minLength": 3,
                  "maxLength": 64,
                  "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
                  "type": "string",
                  "x-ms-visibility": "important"
                },
                "quantity": {
                  "minimum": 1,
                  "maximum": 100,
                  "type": "integer",
                  "x-ms-visibility": "important"
                },
                "due_date": {
                  "minimum": 0,
                  "maximum": 10000,
                  "type": "integer",
                  "x-ms-visibility": "important"
                }
              },
              "example": {
                "sales_order_id": "so_xxx",
                "quantity": 10,
                "due_date": 5
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/factory/work-orders/{id}": {
      "get": {
        "summary": "Get a work order",
        "description": "A single work order in this fictional Factory simulation. Example: GET /labs/api/v1/factory/work-orders/wo_xxx",
        "operationId": "getWorkOrder",
        "x-ms-summary": "Get a work order",
        "tags": [
          "factory"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/health": {
      "get": {
        "summary": "Health check",
        "description": "Liveness probe: status, version, factories open now (as GET /world counts them), the sandbox queue and the load level. Every number on this payload is from a fictional simulation.",
        "operationId": "getHealth",
        "x-ms-summary": "Health check",
        "tags": [
          "public"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/missions": {
      "get": {
        "summary": "List missions",
        "description": "Ordered missions for this fictional sandbox, detected from events. Either a Factory or Head Office key. Example: GET /labs/api/v1/missions",
        "operationId": "listMissions",
        "x-ms-summary": "List missions",
        "tags": [
          "missions"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/office": {
      "get": {
        "summary": "Get the Head Office overview",
        "description": "Cash, receivables, payables and open approvals for this fictional Head Office simulation. Example: GET /labs/api/v1/office",
        "operationId": "getOffice",
        "x-ms-summary": "Get the Head Office overview",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/office/candidates": {
      "get": {
        "summary": "List HR candidates",
        "description": "HR candidate pool for this fictional Head Office simulation. 404 module_disabled when HR is off. Example: GET /labs/api/v1/office/candidates",
        "operationId": "listCandidates",
        "x-ms-summary": "List HR candidates",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/office/contracts": {
      "get": {
        "summary": "List contracts on offer",
        "description": "Your contract lot offers in this fictional Head Office simulation, newest first. Each lot is yours alone; accept within 3 sim days and deliver within 7. Example: GET /labs/api/v1/office/contracts",
        "operationId": "listOfficeContracts",
        "x-ms-summary": "List contracts on offer",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/office/contracts/{lot_id}/accept": {
      "post": {
        "summary": "Accept a contract",
        "description": "Accept a contract lot offer in this fictional Head Office simulation. 409 lot_expired, 409 already_decided. Example: POST /labs/api/v1/office/contracts/lot_xxx/accept",
        "operationId": "acceptContract",
        "x-ms-summary": "Accept a contract",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "lot_id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/contracts/{lot_id}/decline": {
      "post": {
        "summary": "Decline a contract",
        "description": "Decline a contract lot offer in this fictional Head Office simulation; the lot is re-offered fairly to another factory. Example: {\"reason\":\"capacity\"}",
        "operationId": "declineContract",
        "x-ms-summary": "Decline a contract",
        "tags": [
          "office"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "lot_id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "reason"
              ],
              "properties": {
                "reason": {
                  "type": "string",
                  "enum": [
                    "capacity",
                    "price",
                    "timing",
                    "other"
                  ],
                  "x-ms-visibility": "important"
                }
              },
              "example": {
                "reason": "capacity"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/customer-invoices": {
      "get": {
        "summary": "List customer invoices",
        "description": "Customer invoices in this fictional Head Office simulation. Example: GET /labs/api/v1/office/customer-invoices",
        "operationId": "listCustomerInvoices",
        "x-ms-summary": "List customer invoices",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/office/customers": {
      "get": {
        "summary": "List customers",
        "description": "Fictional bookshop customers in this Head Office simulation. Example: GET /labs/api/v1/office/customers",
        "operationId": "listCustomers",
        "x-ms-summary": "List customers",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "post": {
        "summary": "Create a customer",
        "description": "Create or upsert a fictional customer. Example: {\"name\":\"Harbour Books\",\"external_id\":\"hb-1\"}",
        "operationId": "createCustomer",
        "x-ms-summary": "Create a customer",
        "tags": [
          "office"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "minLength": 1,
                  "maxLength": 256,
                  "description": "At most 256 UTF-8 bytes. NFC-normalised, no control characters (else 422 invalid_text); bidi controls are removed.",
                  "type": "string",
                  "x-ms-visibility": "important"
                },
                "external_id": {
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Your system's id for this customer, at most 64 UTF-8 bytes. NFC-normalised, no control characters (else 422 invalid_text); bidi controls are removed.",
                  "type": "string",
                  "x-ms-visibility": "advanced"
                },
                "payment_terms_sim_days": {
                  "minimum": 1,
                  "maximum": 90,
                  "type": "integer",
                  "x-ms-visibility": "advanced"
                }
              },
              "example": {
                "name": "Harbour Books",
                "external_id": "hb-1"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/customers/{id}": {
      "patch": {
        "summary": "Update a customer",
        "description": "Patch a fictional customer. Example: {\"name\":\"Harbour Books Ltd\"}",
        "operationId": "updateCustomer",
        "x-ms-summary": "Update a customer",
        "tags": [
          "office"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "properties": {
                "name": {
                  "minLength": 1,
                  "maxLength": 256,
                  "description": "At most 256 UTF-8 bytes. NFC-normalised, no control characters (else 422 invalid_text); bidi controls are removed.",
                  "type": "string",
                  "x-ms-visibility": "advanced"
                },
                "external_id": {
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Your system's id for this customer, at most 64 UTF-8 bytes. NFC-normalised, no control characters (else 422 invalid_text); bidi controls are removed.",
                  "type": "string",
                  "x-ms-visibility": "advanced"
                }
              },
              "example": {
                "name": "Harbour Books Ltd"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/employees": {
      "get": {
        "summary": "List employees",
        "description": "HR roster for this fictional Head Office simulation. 404 module_disabled when HR is off. Example: GET /labs/api/v1/office/employees",
        "operationId": "listEmployees",
        "x-ms-summary": "List employees",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "post": {
        "summary": "Hire a candidate",
        "description": "Hire a candidate in this fictional Head Office simulation. Starts 1-2 sim days later. Example: {\"candidate_id\":\"cand_xxx\"}",
        "operationId": "hireEmployee",
        "x-ms-summary": "Hire a candidate",
        "tags": [
          "office"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "candidate_id"
              ],
              "properties": {
                "candidate_id": {
                  "minLength": 3,
                  "maxLength": 64,
                  "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
                  "type": "string",
                  "x-ms-visibility": "important"
                }
              },
              "example": {
                "candidate_id": "cand_xxx"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/employees/{id}": {
      "delete": {
        "summary": "Dismiss an employee",
        "description": "Let an employee go in this fictional Head Office simulation. Example: DELETE /labs/api/v1/office/employees/emp_xxx",
        "operationId": "dismissEmployee",
        "x-ms-summary": "Dismiss an employee",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/goods-receipts": {
      "get": {
        "summary": "List goods receipts",
        "description": "Head Office goods receipts in this fictional simulation. Example: GET /labs/api/v1/office/goods-receipts",
        "operationId": "listOfficeGoodsReceipts",
        "x-ms-summary": "List goods receipts",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "post": {
        "summary": "Record a goods receipt",
        "description": "Bridge a Factory goods receipt into Head Office in this fictional simulation. Example: {\"goods_receipt_id\":\"grn_xxx\",\"purchase_order_id\":\"po_xxx\",\"quantity_received\":4000}",
        "operationId": "createOfficeGoodsReceipt",
        "x-ms-summary": "Record a goods receipt",
        "tags": [
          "office"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "goods_receipt_id",
                "purchase_order_id",
                "quantity_received"
              ],
              "properties": {
                "goods_receipt_id": {
                  "minLength": 3,
                  "maxLength": 64,
                  "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
                  "type": "string",
                  "x-ms-visibility": "important"
                },
                "purchase_order_id": {
                  "minLength": 3,
                  "maxLength": 64,
                  "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
                  "type": "string",
                  "x-ms-visibility": "important"
                },
                "quantity_received": {
                  "minimum": 0,
                  "maximum": 1000000,
                  "type": "integer",
                  "x-ms-visibility": "important"
                }
              },
              "example": {
                "goods_receipt_id": "grn_xxx",
                "purchase_order_id": "po_xxx",
                "quantity_received": 4000
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/leave-requests": {
      "get": {
        "summary": "List leave requests",
        "description": "HR leave requests for this fictional Head Office simulation. 404 module_disabled when HR is off. Example: GET /labs/api/v1/office/leave-requests",
        "operationId": "listLeaveRequests",
        "x-ms-summary": "List leave requests",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/office/leave-requests/{id}/approve": {
      "post": {
        "summary": "Approve a leave request",
        "description": "Approve a leave request in this fictional Head Office simulation. Example: POST /labs/api/v1/office/leave-requests/lv_xxx/approve",
        "operationId": "approveLeaveRequest",
        "x-ms-summary": "Approve a leave request",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/leave-requests/{id}/deny": {
      "post": {
        "summary": "Deny a leave request",
        "description": "Deny a leave request in this fictional Head Office simulation. Example: POST /labs/api/v1/office/leave-requests/lv_xxx/deny",
        "operationId": "denyLeaveRequest",
        "x-ms-summary": "Deny a leave request",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/ledger": {
      "get": {
        "summary": "List ledger entries",
        "description": "Ledger entries in this fictional Head Office simulation. Example: GET /labs/api/v1/office/ledger",
        "operationId": "listLedgerEntries",
        "x-ms-summary": "List ledger entries",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/office/market": {
      "get": {
        "summary": "Get spot market prices",
        "description": "Spot prices for your continent on your sim date in this fictional Head Office simulation: buy paper or ink (per 1,000 units), sell atlases (capped per sim day). Example: GET /labs/api/v1/office/market",
        "operationId": "getMarketPrices",
        "x-ms-summary": "Get spot market prices",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "post": {
        "summary": "Trade on the spot market",
        "description": "Trade on the fictional spot market. Buys arrive in Factory stock on the next tick; sells are capped per sim day. 402 insufficient_funds, 409 insufficient_stock, 409 sell_cap_reached, 409 warehouse_full. Idempotency-Key required. Example: {\"side\":\"buy\",\"item\":\"paper\",\"quantity\":2000}",
        "operationId": "tradeOnMarket",
        "x-ms-summary": "Trade on the spot market",
        "tags": [
          "office"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "side",
                "item",
                "quantity"
              ],
              "properties": {
                "side": {
                  "type": "string",
                  "enum": [
                    "buy",
                    "sell"
                  ],
                  "x-ms-visibility": "important"
                },
                "item": {
                  "type": "string",
                  "enum": [
                    "paper",
                    "ink",
                    "atlases",
                    "gilded_atlases"
                  ],
                  "x-ms-visibility": "important"
                },
                "quantity": {
                  "minimum": 1,
                  "maximum": 200000,
                  "type": "integer",
                  "x-ms-visibility": "important"
                }
              },
              "example": {
                "side": "buy",
                "item": "paper",
                "quantity": 2000
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/payroll-runs": {
      "get": {
        "summary": "List payroll runs",
        "description": "HR payroll runs for this fictional Head Office simulation. 404 module_disabled when HR is off. Example: GET /labs/api/v1/office/payroll-runs",
        "operationId": "listPayrollRuns",
        "x-ms-summary": "List payroll runs",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "post": {
        "summary": "Run payroll",
        "description": "Pay the oldest outstanding payroll run in this fictional Head Office simulation (HR). 422 timesheets_missing, 402 insufficient_funds. Example: POST /labs/api/v1/office/payroll-runs",
        "operationId": "createPayrollRun",
        "x-ms-summary": "Run payroll",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/ping": {
      "get": {
        "summary": "Check a Head Office key",
        "description": "Confirms that a Head Office key (`lab_off_...`) is valid and returns the system and sandbox ID it belongs to. A Factory key gets 403 wrong_system.",
        "operationId": "pingOffice",
        "x-ms-summary": "Check a Head Office key",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/office/pnl": {
      "get": {
        "summary": "Get profit and loss",
        "description": "P&L rollup by sim week for this fictional Head Office simulation. Example: GET /labs/api/v1/office/pnl",
        "operationId": "getProfitAndLoss",
        "x-ms-summary": "Get profit and loss",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/office/purchase-orders": {
      "get": {
        "summary": "List purchase orders",
        "description": "Purchase orders in this fictional Head Office simulation. Example: GET /labs/api/v1/office/purchase-orders",
        "operationId": "listPurchaseOrders",
        "x-ms-summary": "List purchase orders",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "post": {
        "summary": "Create a purchase order",
        "description": "Create a purchase order from a quote in this fictional Head Office simulation. Example: {\"quote_id\":\"qt_xxx\"}",
        "operationId": "createPurchaseOrder",
        "x-ms-summary": "Create a purchase order",
        "tags": [
          "office"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "quote_id"
              ],
              "properties": {
                "quote_id": {
                  "minLength": 3,
                  "maxLength": 64,
                  "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
                  "type": "string",
                  "x-ms-visibility": "important"
                },
                "requisition_id": {
                  "minLength": 3,
                  "maxLength": 64,
                  "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
                  "type": "string",
                  "x-ms-visibility": "advanced"
                }
              },
              "example": {
                "quote_id": "qt_xxx"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/purchase-orders/{id}/approve": {
      "post": {
        "summary": "Approve a purchase order",
        "description": "Approve a pending purchase order in this fictional Head Office simulation. Example: POST /labs/api/v1/office/purchase-orders/po_xxx/approve",
        "operationId": "approvePurchaseOrder",
        "x-ms-summary": "Approve a purchase order",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/quotes": {
      "post": {
        "summary": "Create a quote",
        "description": "Request a quote in this fictional Head Office simulation. Example: {\"supplier_id\":\"sup_xxx\",\"material\":\"paper\",\"quantity\":5000}",
        "operationId": "createQuote",
        "x-ms-summary": "Create a quote",
        "tags": [
          "office"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "supplier_id",
                "material",
                "quantity"
              ],
              "properties": {
                "supplier_id": {
                  "minLength": 3,
                  "maxLength": 64,
                  "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
                  "type": "string",
                  "x-ms-visibility": "important"
                },
                "material": {
                  "type": "string",
                  "enum": [
                    "paper",
                    "ink"
                  ],
                  "x-ms-visibility": "important"
                },
                "quantity": {
                  "minimum": 1,
                  "maximum": 1000000,
                  "type": "integer",
                  "x-ms-visibility": "important"
                }
              },
              "example": {
                "supplier_id": "sup_xxx",
                "material": "paper",
                "quantity": 5000
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/requisitions": {
      "get": {
        "summary": "List Head Office requisitions",
        "description": "Factory requisitions received by this fictional Head Office simulation. Example: GET /labs/api/v1/office/requisitions",
        "operationId": "listOfficeRequisitions",
        "x-ms-summary": "List Head Office requisitions",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "post": {
        "summary": "Send a requisition to the Factory",
        "description": "Bridge a Factory requisition into Head Office in this fictional simulation. Example: {\"factory_requisition_id\":\"req_xxx\",\"material\":\"paper\",\"quantity\":5000,\"needed_by\":4}",
        "operationId": "createOfficeRequisition",
        "x-ms-summary": "Send a requisition to the Factory",
        "tags": [
          "office"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "factory_requisition_id",
                "material",
                "quantity",
                "needed_by"
              ],
              "properties": {
                "factory_requisition_id": {
                  "minLength": 3,
                  "maxLength": 64,
                  "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
                  "type": "string",
                  "x-ms-visibility": "important"
                },
                "material": {
                  "type": "string",
                  "enum": [
                    "paper",
                    "ink"
                  ],
                  "x-ms-visibility": "important"
                },
                "quantity": {
                  "minimum": 1,
                  "maximum": 1000000,
                  "type": "integer",
                  "x-ms-visibility": "important"
                },
                "needed_by": {
                  "minimum": 0,
                  "maximum": 10000,
                  "type": "integer",
                  "x-ms-visibility": "important"
                }
              },
              "example": {
                "factory_requisition_id": "req_xxx",
                "material": "paper",
                "quantity": 5000,
                "needed_by": 4
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/requisitions/{id}/approve": {
      "post": {
        "summary": "Approve a requisition",
        "description": "Approve a requisition in this fictional Head Office simulation. Example: POST /labs/api/v1/office/requisitions/hreq_xxx/approve",
        "operationId": "approveRequisition",
        "x-ms-summary": "Approve a requisition",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/requisitions/{id}/reject": {
      "post": {
        "summary": "Reject a requisition",
        "description": "Reject a requisition in this fictional Head Office simulation. Example: POST /labs/api/v1/office/requisitions/hreq_xxx/reject",
        "operationId": "rejectRequisition",
        "x-ms-summary": "Reject a requisition",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/sales-orders": {
      "get": {
        "summary": "List sales orders",
        "description": "Sales orders in this fictional Head Office simulation. Example: GET /labs/api/v1/office/sales-orders",
        "operationId": "listSalesOrders",
        "x-ms-summary": "List sales orders",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "post": {
        "summary": "Create a sales order",
        "description": "Inject demand into this fictional Head Office simulation. Example: {\"customer_id\":\"cus_xxx\",\"quantity\":8}",
        "operationId": "createSalesOrder",
        "x-ms-summary": "Create a sales order",
        "tags": [
          "office"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "customer_id",
                "quantity"
              ],
              "properties": {
                "customer_id": {
                  "minLength": 3,
                  "maxLength": 64,
                  "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
                  "type": "string",
                  "x-ms-visibility": "important"
                },
                "quantity": {
                  "minimum": 1,
                  "maximum": 100,
                  "type": "integer",
                  "x-ms-visibility": "important"
                },
                "unit_price_minor": {
                  "minimum": 0,
                  "maximum": 5400,
                  "type": "integer",
                  "x-ms-visibility": "advanced"
                },
                "due_sim_day": {
                  "minimum": 0,
                  "maximum": 10000,
                  "type": "integer",
                  "x-ms-visibility": "advanced"
                }
              },
              "example": {
                "customer_id": "cus_xxx",
                "quantity": 8
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/sales-orders/{id}": {
      "get": {
        "summary": "Get a sales order",
        "description": "A single sales order in this fictional Head Office simulation. Example: GET /labs/api/v1/office/sales-orders/so_xxx",
        "operationId": "getSalesOrder",
        "x-ms-summary": "Get a sales order",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/office/sales-orders/{id}/accept": {
      "post": {
        "summary": "Accept a sales order",
        "description": "Accept a sales order in this fictional Head Office simulation. Returns the sales order row; with bridge: auto the Factory work order is made in the same call, so the row comes back in_production with bridged_work_order_id set. Example: POST /labs/api/v1/office/sales-orders/so_xxx/accept",
        "operationId": "acceptSalesOrder",
        "x-ms-summary": "Accept a sales order",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/sales-orders/{id}/decline": {
      "post": {
        "summary": "Decline a sales order",
        "description": "Decline a sales order in this fictional Head Office simulation. Example: {\"reason\":\"capacity\"}",
        "operationId": "declineSalesOrder",
        "x-ms-summary": "Decline a sales order",
        "tags": [
          "office"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "reason"
              ],
              "properties": {
                "reason": {
                  "type": "string",
                  "enum": [
                    "price",
                    "capacity",
                    "other"
                  ],
                  "x-ms-visibility": "important"
                }
              },
              "example": {
                "reason": "capacity"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/shipments": {
      "get": {
        "summary": "List shipments",
        "description": "Head Office shipments in this fictional simulation. Example: GET /labs/api/v1/office/shipments",
        "operationId": "listOfficeShipments",
        "x-ms-summary": "List shipments",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "post": {
        "summary": "Record a shipment to a customer",
        "description": "Bridge a Factory shipment into Head Office and raise a customer invoice in this fictional simulation. Example: {\"shipment_id\":\"shp_xxx\",\"sales_order_id\":\"so_xxx\",\"quantity\":10}",
        "operationId": "createOfficeShipment",
        "x-ms-summary": "Record a shipment to a customer",
        "tags": [
          "office"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "shipment_id",
                "sales_order_id",
                "quantity"
              ],
              "properties": {
                "shipment_id": {
                  "minLength": 3,
                  "maxLength": 64,
                  "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
                  "type": "string",
                  "x-ms-visibility": "important"
                },
                "sales_order_id": {
                  "minLength": 3,
                  "maxLength": 64,
                  "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
                  "type": "string",
                  "x-ms-visibility": "important"
                },
                "quantity": {
                  "minimum": 1,
                  "maximum": 100,
                  "type": "integer",
                  "x-ms-visibility": "important"
                }
              },
              "example": {
                "shipment_id": "shp_xxx",
                "sales_order_id": "so_xxx",
                "quantity": 10
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/supplier-invoices": {
      "get": {
        "summary": "List supplier invoices",
        "description": "Supplier invoices in this fictional Head Office simulation. Example: GET /labs/api/v1/office/supplier-invoices",
        "operationId": "listSupplierInvoices",
        "x-ms-summary": "List supplier invoices",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/office/supplier-invoices/{id}/pay": {
      "post": {
        "summary": "Pay a supplier invoice",
        "description": "Pay a supplier invoice in this fictional Head Office simulation. Query override=true or 1 pays despite a three-way mismatch. Example: POST /labs/api/v1/office/supplier-invoices/sinv_xxx/pay",
        "operationId": "paySupplierInvoice",
        "x-ms-summary": "Pay a supplier invoice",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/office/suppliers": {
      "get": {
        "summary": "List suppliers",
        "description": "Global mills and ink makers for this fictional Head Office simulation. Example: GET /labs/api/v1/office/suppliers",
        "operationId": "listSuppliers",
        "x-ms-summary": "List suppliers",
        "tags": [
          "office"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/office/timesheets": {
      "post": {
        "summary": "Submit a timesheet",
        "description": "Bridge Factory timesheets into Head Office in this fictional simulation (HR). 404 source_not_found, 422 bridge_mismatch, 409 already_bridged. Example: {\"entries\":[{\"timesheet_id\":\"ts_xxx\",\"employee_id\":\"emp_xxx\",\"sim_day\":6,\"hours\":8}]}",
        "operationId": "createOfficeTimesheet",
        "x-ms-summary": "Submit a timesheet",
        "tags": [
          "office"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "entries"
              ],
              "properties": {
                "entries": {
                  "minItems": 1,
                  "maxItems": 100,
                  "type": "array",
                  "items": {
                    "additionalProperties": false,
                    "type": "object",
                    "required": [
                      "timesheet_id",
                      "employee_id",
                      "sim_day",
                      "hours"
                    ],
                    "properties": {
                      "timesheet_id": {
                        "minLength": 3,
                        "maxLength": 64,
                        "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
                        "type": "string"
                      },
                      "employee_id": {
                        "minLength": 3,
                        "maxLength": 64,
                        "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
                        "type": "string"
                      },
                      "sim_day": {
                        "minimum": 0,
                        "maximum": 10000,
                        "type": "integer"
                      },
                      "hours": {
                        "minimum": 0,
                        "maximum": 24,
                        "type": "integer"
                      }
                    }
                  },
                  "x-ms-visibility": "important"
                }
              },
              "example": {
                "entries": [
                  {
                    "timesheet_id": "ts_xxx",
                    "employee_id": "emp_xxx",
                    "sim_day": 6,
                    "hours": 8
                  }
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/queue/{ticket_id}": {
      "get": {
        "summary": "Check a queue ticket",
        "description": "Poll a sandbox queue ticket. Ready tickets return the 201 body once.",
        "operationId": "getQueueTicket",
        "x-ms-summary": "Check a queue ticket",
        "tags": [
          "public"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "ticket_id",
            "in": "path",
            "required": true,
            "type": "string",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/sandbox": {
      "delete": {
        "summary": "End the sandbox",
        "description": "End this fictional sandbox early. Either a Factory or Head Office key.",
        "operationId": "deleteSandbox",
        "x-ms-summary": "End the sandbox",
        "tags": [
          "sandbox"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "get": {
        "summary": "Get sandbox status",
        "description": "Status of this fictional sandbox: expiry, sim date, pace, automation and bridge settings. Either a Factory or Head Office key.",
        "operationId": "getSandbox",
        "x-ms-summary": "Get sandbox status",
        "tags": [
          "sandbox"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "patch": {
        "summary": "Update sandbox settings",
        "description": "Change this fictional sandbox's automation (`automate`), bridge mode (`bridge`) or pace (`pace`). Either a Factory or Head Office key.",
        "operationId": "updateSandbox",
        "x-ms-summary": "Update sandbox settings",
        "tags": [
          "sandbox"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "properties": {
                "automate": {
                  "type": "string",
                  "enum": [
                    "office",
                    "factory",
                    "both"
                  ],
                  "x-ms-visibility": "advanced"
                },
                "bridge": {
                  "type": "string",
                  "enum": [
                    "auto",
                    "manual"
                  ],
                  "x-ms-visibility": "advanced"
                },
                "pace": {
                  "type": "string",
                  "enum": [
                    "normal",
                    "slow",
                    "manual"
                  ],
                  "x-ms-visibility": "advanced"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/sandbox/extend": {
      "post": {
        "summary": "Extend the sandbox",
        "description": "Add time to this fictional sandbox. Only allowed when ten minutes or fewer remain, and a limited number of times (400 extend_too_early, 409 extend_exhausted). Either a Factory or Head Office key.",
        "operationId": "extendSandbox",
        "x-ms-summary": "Extend the sandbox",
        "tags": [
          "sandbox"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/sandbox/receipt": {
      "get": {
        "summary": "Get the sandbox receipt",
        "description": "A summary receipt for this fictional sandbox: atlases in stock and achievements earned. Either a Factory or Head Office key.",
        "operationId": "getSandboxReceipt",
        "x-ms-summary": "Get the sandbox receipt",
        "tags": [
          "sandbox"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/sandbox/reset": {
      "post": {
        "summary": "Reset the sandbox",
        "description": "Return this fictional sandbox to its starting state. A limited number of resets is allowed (409 reset_exhausted). Either a Factory or Head Office key.",
        "operationId": "resetSandbox",
        "x-ms-summary": "Reset the sandbox",
        "tags": [
          "sandbox"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/sandbox/tick": {
      "post": {
        "summary": "Advance the simulation",
        "description": "Advance a manual-pace fictional sandbox by `days` sim days (1 to 7). Only for `pace: manual` (409 tick_not_manual otherwise). Either a Factory or Head Office key.",
        "operationId": "tickSandbox",
        "x-ms-summary": "Advance the simulation",
        "tags": [
          "sandbox"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "days"
              ],
              "properties": {
                "days": {
                  "minimum": 1,
                  "maximum": 7,
                  "type": "integer",
                  "x-ms-visibility": "important"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/sandboxes": {
      "post": {
        "summary": "Create a sandbox",
        "description": "Create a 30-minute fictional sandbox. Keys are shown once. Without a body continent, the team comes from the visitor's country (only the continent is stored), or is assigned when the country is unknown; AN only by choice. Simulation: true. Errors: 503 feature_disabled (sandbox creation paused by the operator, or by load shedding — retry after Retry-After), 202 (queued; see PLAN §3.1). When the operator has switched on first-party proof-of-work (off by default), this returns 428 pow_required with {challenge, difficulty, expires_at}; retry with header `Atlas-PoW: <challenge>.<nonce>` where SHA-256(challenge + nonce) has `difficulty` leading zero bits. See docs/POW.md for TypeScript and Python solvers.",
        "operationId": "createSandbox",
        "x-ms-summary": "Create a sandbox",
        "tags": [
          "public"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "properties": {
                "preset": {
                  "type": "string",
                  "enum": [
                    "starter",
                    "standard",
                    "full",
                    "custom"
                  ],
                  "x-ms-visibility": "advanced"
                },
                "automate": {
                  "type": "string",
                  "enum": [
                    "office",
                    "factory",
                    "both"
                  ],
                  "x-ms-visibility": "advanced"
                },
                "bridge": {
                  "type": "string",
                  "enum": [
                    "auto",
                    "manual"
                  ],
                  "x-ms-visibility": "advanced"
                },
                "modules": {
                  "additionalProperties": false,
                  "type": "object",
                  "properties": {
                    "hr": {
                      "type": "boolean"
                    },
                    "disruptions": {
                      "type": "boolean"
                    }
                  },
                  "x-ms-visibility": "advanced"
                },
                "pace": {
                  "type": "string",
                  "enum": [
                    "normal",
                    "slow",
                    "manual"
                  ],
                  "x-ms-visibility": "advanced"
                },
                "continent": {
                  "type": "string",
                  "enum": [
                    "NA",
                    "SA",
                    "EU",
                    "AF",
                    "AS",
                    "OC",
                    "AN"
                  ],
                  "x-ms-visibility": "advanced"
                },
                "seed": {
                  "type": "string",
                  "enum": [
                    "fresh",
                    "history"
                  ],
                  "x-ms-visibility": "advanced"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/stream": {
      "get": {
        "summary": "Stream events",
        "description": "Server-sent events for this fictional sandbox. Resume with Last-Event-ID (seq). Keepalive comment every 15 s. Cap 3 streams per sandbox (4th → 429 sse_limit). Either a Factory or Head Office key. Example: GET /labs/api/v1/stream",
        "operationId": "streamEvents",
        "x-ms-summary": "Stream events",
        "tags": [
          "events"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "system",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "factory",
              "office",
              "world"
            ],
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhooks": {
      "get": {
        "summary": "List webhooks",
        "description": "Webhook subscriptions of this fictional sandbox (at most 3). Either key. URLs are never returned, only url_host. Example: GET /labs/api/v1/webhooks",
        "operationId": "listWebhooks",
        "x-ms-summary": "List webhooks",
        "tags": [
          "webhooks"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "post": {
        "summary": "Create a webhook",
        "description": "Subscribe a public HTTPS URL (port 443) to this fictional sandbox's events. Either key; Idempotency-Key honoured (a replay never repeats the secret). Returns the whsec_ secret once. The subscription is pending_verification until a webhook.test ping gets a 2xx. Errors: 422 webhook_url_rejected (details.reason: scheme_not_https, port_not_allowed, userinfo_not_allowed, hostname_not_public, ip_not_public, denylisted, invalid_url), 422 invalid_event_type, 409 webhook_limit_reached. Event types: office.sales_order.received, office.sales_order.accepted, office.sales_order.declined, office.sales_order.expired, office.requisition.received, office.requisition.approved, office.requisition.rejected, office.purchase_order.created, office.purchase_order.approval_required, office.purchase_order.approved, office.supplier_invoice.received, office.supplier_invoice.paid, office.customer_invoice.created, office.customer_invoice.paid, office.customer_invoice.overdue, office.payment.received, office.payment.overdue, office.goods_receipt.recorded, office.contract_lot.offered, office.contract_lot.accepted, office.contract_lot.declined, office.contract_lot.expired, office.contract_lot.delivered, office.market_trade.executed, factory.work_order.created, factory.work_order.ready, factory.shipment.created, factory.print_run.started, factory.print_run.completed, factory.requisition.created, factory.stock.below_reorder_point, factory.delivery.arrived, factory.goods_receipt.recorded, factory.market_delivery.received, hr.employee.sick, hr.employee.returned, hr.employee.quit, hr.employee.dismissed, hr.employee.hired, hr.leave_request.created, hr.payroll.due, hr.payroll.late, hr.payroll.paid, world.major_order.updated, world.lore_event.started, sandbox.mission.completed, sandbox.achievement.unlocked, sandbox.expiring, sandbox.bankrupt, sandbox.disruption.ended, or \"*\" for all. Deliveries are signed with Standard Webhooks headers (webhook-id, webhook-timestamp, webhook-signature: v1,<base64 HMAC-SHA256 of id.timestamp.body>). For 24 h after rotate-secret (or until the sandbox ends), webhook-signature carries two space-separated values, \"v1,<new> v1,<old>\", so a receiver mid-rotation verifies against either. Retries after 10 s, 60 s and 5 min; 5 consecutive failures disable the subscription. Example: {\"url\":\"https://hooks.zapier.com/hooks/catch/123456/abcdef/\",\"events\":[\"office.sales_order.received\"],\"description\":\"Zapier: new orders\"}",
        "operationId": "createWebhook",
        "x-ms-summary": "Create a webhook",
        "tags": [
          "webhooks"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "url",
                "events"
              ],
              "properties": {
                "url": {
                  "minLength": 9,
                  "maxLength": 2048,
                  "description": "Public HTTPS URL on port 443. No userinfo; private, reserved and loopback destinations are refused.",
                  "type": "string",
                  "example": "https://hooks.zapier.com/hooks/catch/123456/abcdef/",
                  "x-ms-visibility": "important"
                },
                "events": {
                  "minItems": 1,
                  "maxItems": 64,
                  "type": "array",
                  "items": {
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^(?:\\*|[a-z]+(?:\\.[a-z_]+){2})$",
                    "description": "A catalogue event type (e.g. \"office.sales_order.received\") or \"*\" for all.",
                    "type": "string"
                  },
                  "x-ms-visibility": "important"
                },
                "description": {
                  "minLength": 1,
                  "maxLength": 256,
                  "description": "Your own label (≤256 bytes). Returned to key holders only, never shown publicly.",
                  "type": "string",
                  "x-ms-visibility": "advanced"
                }
              },
              "example": {
                "url": "https://hooks.zapier.com/hooks/catch/123456/abcdef/",
                "events": [
                  "office.sales_order.received"
                ],
                "description": "Zapier: new orders"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/webhooks/{id}": {
      "delete": {
        "summary": "Delete a webhook",
        "description": "Delete a webhook subscription and its delivery history. Example: DELETE /labs/api/v1/webhooks/whk_01J…",
        "operationId": "deleteWebhook",
        "x-ms-summary": "Delete a webhook",
        "tags": [
          "webhooks"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      },
      "get": {
        "summary": "Get a webhook",
        "description": "One webhook subscription: status (pending_verification, active, verification_failed, disabled), events, url_host and failure count. Example: GET /labs/api/v1/webhooks/whk_01J…",
        "operationId": "getWebhook",
        "x-ms-summary": "Get a webhook",
        "tags": [
          "webhooks"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "patch": {
        "summary": "Update a webhook",
        "description": "Enable, disable or change the events of a webhook subscription. enabled:true on a disabled or failed subscription re-runs the webhook.test verification. Errors: 404 not_found, 422 invalid_event_type, 422 webhook_url_rejected (denylisted). Example: {\"enabled\":false} or {\"events\":[\"*\"]}",
        "operationId": "updateWebhook",
        "x-ms-summary": "Update a webhook",
        "tags": [
          "webhooks"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "additionalProperties": false,
              "minProperties": 1,
              "type": "object",
              "properties": {
                "enabled": {
                  "description": "false disables; true re-runs the webhook.test verification ping.",
                  "type": "boolean",
                  "x-ms-visibility": "advanced"
                },
                "events": {
                  "minItems": 1,
                  "maxItems": 64,
                  "type": "array",
                  "items": {
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^(?:\\*|[a-z]+(?:\\.[a-z_]+){2})$",
                    "description": "A catalogue event type (e.g. \"office.sales_order.received\") or \"*\" for all.",
                    "type": "string"
                  },
                  "x-ms-visibility": "advanced"
                },
                "description": {
                  "minLength": 1,
                  "maxLength": 256,
                  "type": "string",
                  "x-nullable": true,
                  "x-ms-visibility": "advanced"
                }
              },
              "example": {
                "enabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/webhooks/{id}/deliveries": {
      "get": {
        "summary": "List webhook deliveries",
        "description": "Delivery attempts for one subscription, newest first: kind, event id and type, status, attempt, status_code, latency_ms and error_class (dns_blocked, tls_error, timeout, refused, http_4xx, http_5xx, …). Response bodies and headers are never stored or shown. Example: GET /labs/api/v1/webhooks/whk_01J…/deliveries?limit=20",
        "operationId": "listWebhookDeliveries",
        "x-ms-summary": "List webhook deliveries",
        "tags": [
          "webhooks"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^[ -~]+$",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "x-ms-visibility": "advanced"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "type": "string",
            "minLength": 10,
            "maxLength": 64,
            "pattern": "^[ -~]+$",
            "description": "ISO-8601 date or timestamp",
            "x-ms-summary": "2026-09-17T12:00:00Z",
            "x-ms-visibility": "advanced"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhooks/{id}/rotate-secret": {
      "post": {
        "summary": "Rotate a webhook secret",
        "description": "Replace the signing secret. The new whsec_ secret is returned once. The old secret keeps verifying for 24 h (or until the sandbox ends, whichever is first): during that overlap window, deliveries carry both signatures space-separated in webhook-signature. Example: POST /labs/api/v1/webhooks/whk_01J…/rotate-secret",
        "operationId": "rotateWebhookSecret",
        "x-ms-summary": "Rotate a webhook secret",
        "tags": [
          "webhooks"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/webhooks/{id}/test": {
      "post": {
        "summary": "Send a test webhook",
        "description": "Queue a webhook.test ping (202). On an active subscription it is a test delivery; on a pending or failed one it is the verification ping that activates it on 2xx. Errors: 409 webhook_disabled. Example: POST /labs/api/v1/webhooks/whk_01J…/test",
        "operationId": "testWebhook",
        "x-ms-summary": "Send a test webhook",
        "tags": [
          "webhooks"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9]{0,15}_[A-Za-z0-9_-]{1,60}$",
            "x-ms-visibility": "important"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "423": {
            "description": "Locked (sandbox_bankrupt or sandbox_expired): read-only."
          }
        }
      }
    },
    "/world": {
      "get": {
        "summary": "Get the world summary",
        "description": "Fictional world summary: factories open now, the sandbox queue, atlases shipped in the last 24 h, all-time bankruptcies, contracts completed and Major Orders won and lost, and the current Major Order. The open and shipped counts are the sums of the continents' figures. Aggregates only; no key. Example: GET /labs/api/v1/world",
        "operationId": "getWorld",
        "x-ms-summary": "Get the world summary",
        "tags": [
          "world"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/world/continents": {
      "get": {
        "summary": "Get the continent standings",
        "description": "Per continent team in the fictional world: factories open now, qualifying factories and atlases shipped in the last 24 h, on-time %, shipped per factory-hour, contract lot completion, score, rank and plaques. Continents need 5 qualifying factories to rank. Example: GET /labs/api/v1/world/continents",
        "operationId": "getWorldContinents",
        "x-ms-summary": "Get the continent standings",
        "tags": [
          "world"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/world/contracts": {
      "get": {
        "summary": "List the active world contracts",
        "description": "Active fictional continental contracts with aggregate progress only. Example: GET /labs/api/v1/world/contracts",
        "operationId": "listWorldContracts",
        "x-ms-summary": "List the active world contracts",
        "tags": [
          "world"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/world/events": {
      "get": {
        "summary": "List recent world events",
        "description": "Recent fictional world events, newest first, at most 60: contracts issued and completed, bankruptcies, Major Order news, and factories opening, closing and shipping. Example: GET /labs/api/v1/world/events",
        "operationId": "listWorldEvents",
        "x-ms-summary": "List recent world events",
        "tags": [
          "world"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/world/major-order": {
      "get": {
        "summary": "Get the Major Order",
        "description": "The current (or most recent) fictional Major Order: objective, progress, per-continent contributions (which add up to progress), end time and perk. The order is won when progress reaches the target before it ends. Example: GET /labs/api/v1/world/major-order",
        "operationId": "getWorldMajorOrder",
        "x-ms-summary": "Get the Major Order",
        "tags": [
          "world"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    }
  }
}
