{
  "openapi": "3.0.3",
  "info": {
    "title": "Dynamic Capacity public API",
    "version": "1.0.0",
    "description": "The five public, unauthenticated endpoints on dynamiccapacity.ai: read the product catalog and its quantity price ladders, price a basket, read the planned production calendar, read the current mutual NDA, and send the team a message. Every endpoint is same-origin under /api/v1 and is proxied to the commerce backend by the site's web server.\n\nNot described here, deliberately: account creation and sign-in, NDA signing, order placement, the customer dashboard and the admin surface. They all require a bearer token issued to a signed-in person, and a pre-order is placed by a person who has signed the mutual NDA, so there is nothing for an unauthenticated agent to do with them.\n\nThere is no public checkout link. The order path for every SKU is https://dynamiccapacity.ai/devices; an optional online deposit, where offered, is started by the signed-in customer from their dashboard.\n\nPrices are in US dollar cents. Physical chips ship in 2027."
  },
  "servers": [
    { "url": "https://dynamiccapacity.ai", "description": "Production" }
  ],
  "tags": [
    { "name": "catalog", "description": "Products, prices and quotes" },
    { "name": "production", "description": "The planned 2027 first production run" },
    { "name": "legal", "description": "The mutual NDA" },
    { "name": "contact", "description": "Reaching a person" }
  ],
  "paths": {
    "/api/v1/products": {
      "get": {
        "operationId": "listProducts",
        "tags": ["catalog"],
        "summary": "The product catalog with its quantity price ladders",
        "description": "Every active SKU. `quote_only: 1` means no price is published for that SKU and its ladder entry carries no meaningful amount; it is quoted per configuration. The same data is published as static files at /pricing.json and /products.json.",
        "responses": {
          "200": {
            "description": "The catalog",
            "content": {
              "application/json": {
                "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Product" } }
              }
            }
          }
        }
      }
    },
    "/api/v1/quote": {
      "post": {
        "operationId": "createQuote",
        "tags": ["catalog"],
        "summary": "Price a basket, before anyone commits",
        "description": "Applies the published quantity ladder to each line and returns the subtotal. Creates nothing and commits to nothing. Lines whose SKU is quote-only come back with `quote_only: true` and are priced by Dynamic Capacity within one business day.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/QuoteRequest" }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The priced basket",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Quote" } } }
          },
          "400": {
            "description": "Unknown SKU or invalid quantity",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }
          }
        }
      }
    },
    "/api/v1/production": {
      "get": {
        "operationId": "getProduction",
        "tags": ["production"],
        "summary": "Aggregate pre-order counts for the 2027 first run",
        "description": "Totals only, never any customer detail. The round-by-round schedule itself is on https://dynamiccapacity.ai/production.",
        "responses": {
          "200": {
            "description": "Aggregate counts",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Production" } } }
          }
        }
      }
    },
    "/api/v1/nda/current": {
      "get": {
        "operationId": "getCurrentNda",
        "tags": ["legal"],
        "summary": "The text of the current mutual NDA",
        "description": "The agreement a customer signs electronically before a pre-order is confirmed, with its version and the SHA-256 of the body. Readable without signing in; signing it requires an account.",
        "responses": {
          "200": {
            "description": "The current agreement",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Nda" } } }
          }
        }
      }
    },
    "/api/v1/contact": {
      "post": {
        "operationId": "submitContact",
        "tags": ["contact"],
        "summary": "Send the team a message",
        "description": "The same submission the contact form makes. This site publishes no email address, so this is the way in. A member of the team replies from a human inbox, usually within one business day. `website` is a honeypot field and must be sent empty.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/ContactRequest" }
            }
          }
        },
        "responses": {
          "200": { "description": "Received" },
          "400": {
            "description": "Missing or invalid field",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Tier": {
        "type": "object",
        "description": "One rung of a published quantity ladder.",
        "properties": {
          "min_qty": { "type": "integer" },
          "max_qty": { "type": "integer", "nullable": true, "description": "null means no upper bound" },
          "unit_price_cents": { "type": "integer", "description": "US dollar cents. Not meaningful when the product is quote_only." },
          "currency": { "type": "string", "example": "USD" }
        }
      },
      "Product": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "sku": { "type": "string", "example": "OSSC-INF-1" },
          "name": { "type": "string", "example": "OSSC Card" },
          "tier": { "type": "string", "description": "The product line, e.g. \"rack line · add-in card\"" },
          "description": { "type": "string" },
          "unit": { "type": "string", "example": "card" },
          "lead_note": { "type": "string", "example": "First run · 2027" },
          "quote_only": { "type": "integer", "enum": [0, 1], "description": "1 = no published price; quoted per configuration" },
          "min_qty": { "type": "integer" },
          "active": { "type": "integer", "enum": [0, 1] },
          "sort": { "type": "integer" },
          "tiers": { "type": "array", "items": { "$ref": "#/components/schemas/Tier" } }
        }
      },
      "QuoteRequest": {
        "type": "object",
        "required": ["items"],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["sku", "qty"],
              "properties": {
                "sku": { "type": "string", "example": "OSSC-GW-1" },
                "qty": { "type": "integer", "minimum": 1, "example": 100 }
              }
            }
          }
        }
      },
      "Quote": {
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sku": { "type": "string" },
                "name": { "type": "string" },
                "qty": { "type": "integer" },
                "unit_price_cents": { "type": "integer" },
                "line_total_cents": { "type": "integer" },
                "quote_only": { "type": "boolean" }
              }
            }
          },
          "subtotal_cents": { "type": "integer" },
          "currency": { "type": "string", "example": "USD" },
          "has_quote_only": { "type": "boolean" }
        }
      },
      "Production": {
        "type": "object",
        "properties": {
          "positions": { "type": "integer", "description": "Units pre-ordered across all pre-orders" },
          "orders": { "type": "integer", "description": "Pre-orders on the books" },
          "by_sku": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sku": { "type": "string" },
                "name": { "type": "string" },
                "qty": { "type": "integer" }
              }
            }
          }
        }
      },
      "Nda": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "version": { "type": "integer" },
          "title": { "type": "string" },
          "body": { "type": "string" },
          "sha256": { "type": "string" },
          "is_draft": { "type": "integer", "enum": [0, 1] }
        }
      },
      "ContactRequest": {
        "type": "object",
        "required": ["name", "email", "message"],
        "properties": {
          "name": { "type": "string" },
          "email": { "type": "string", "format": "email" },
          "company": { "type": "string" },
          "inquiry_type": {
            "type": "string",
            "enum": [
              "Order and pricing",
              "Volume agreement",
              "Design partnership",
              "Technology partnership",
              "Government inquiry",
              "Licensing",
              "Press",
              "General"
            ]
          },
          "message": { "type": "string" },
          "website": { "type": "string", "description": "Honeypot. Send an empty string." }
        }
      },
      "Error": {
        "type": "object",
        "properties": { "error": { "type": "string" } }
      }
    }
  }
}
