{
  "openapi": "3.1.0",
  "info": {
    "title": "British Noble | The AI Operating System for Publishing REST & Webhook API",
    "version": "8.0.0",
    "description": "Production OpenAPI 3.1 specification for Single Title Record management, ONIX 3.1.2 metadata dispatch across 108 channels, 42-connector webhooks, and ERP/royalty ledger synchronization.",
    "contact": {
      "name": "British Noble AI Architecture",
      "email": "contact@britishnoble.com",
      "url": "https://britishnoble.com/integrations/"
    }
  },
  "servers": [
    { "url": "https://britishnoble.com/api", "description": "Production & Sandbox Gateway" }
  ],
  "paths": {
    "/app/bootstrap": {
      "get": {
        "summary": "Retrieve tenant workspace metrics, 40+ Single Title Records, and immutable audit events",
        "security": [{ "bearerAuth": [] }],
        "responses": { "200": { "description": "Authenticated workspace snapshot" } }
      }
    },
    "/app/titles": {
      "post": {
        "summary": "Create a new Single Title Record with automatic ISBN-13 check-digit assignment",
        "security": [{ "bearerAuth": [] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["title", "author"],
                "properties": {
                  "title": { "type": "string" },
                  "author": { "type": "string" },
                  "category": { "type": "string" },
                  "trimSize": { "type": "string" },
                  "pageCount": { "type": "integer" },
                  "listPriceUsd": { "type": "number" }
                }
              }
            }
          }
        },
        "responses": { "201": { "description": "Created Single Title Record" } }
      }
    },
    "/app/titles/{id}/onix.xml": {
      "get": {
        "summary": "Export validated EDItEUR ONIX 3.1.2 XML Product record",
        "parameters": [{ "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } }],
        "responses": { "200": { "description": "Valid ONIX 3.1.2 XML stream" } }
      }
    },
    "/app/royalties/run": {
      "post": {
        "summary": "Execute multi-tier royalty calculation, advance recoupment, and return-reserve settlement",
        "responses": { "200": { "description": "Itemized royalty settlement batch" } }
      }
    },
    "/integrations/status": {
      "get": {
        "summary": "Live telemetry and protocol verification across all 42 native publishing connectors",
        "responses": { "200": { "description": "Connector health matrix" } }
      }
    },
    "/integrations/test": {
      "post": {
        "summary": "Execute live sandbox handshake and schema validation against a specific connector",
        "responses": { "200": { "description": "Signed request/response verification trace" } }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "HMAC-SHA256" }
    }
  }
}
