{
  "openapi": "3.1.0",
  "info": {
    "title": "Borman Metal Autonomous AI Procurement & Dropshipping API",
    "version": "2.0.0",
    "description": "Production REST API for AI Procurement Agents (ChatGPT, Gemini, Claude, Perplexity, LangChain, n8n), B2B ERPs, and Sheet Metal Dropshipping Storefronts. Guarantees 100% price parity with https://bormanmetal.ro/project-editor — including live factory material rates, sheet nesting, laser cutting with pierce/lead-in timing, CNC press brake bending, surface finishes, Romania & EU shipping, EU VAT / reverse charge, optional dropshipping profit markup, white-label order creation, and live courier AWB tracking.",
    "contact": {
      "name": "Borman Metal Engineering & API Team",
      "url": "https://bormanmetal.ro/ghid/ai-procurement",
      "email": "contact@bormanmetal.ro"
    },
    "license": {
      "name": "Commercial Partner API - Borman Metal S.R.L.",
      "url": "https://bormanmetal.ro/ghid/terms"
    }
  },
  "servers": [
    {
      "url": "https://bormanmetal.ro",
      "description": "Production Cloud Server (Global HTTPS CDN)"
    }
  ],
  "security": [],
  "paths": {
    "/api/v1/capabilities": {
      "get": {
        "summary": "Retrieve Live Materials, Finishes, Shipping Zones & Machine Envelopes",
        "description": "Returns live in-stock materials, thicknesses, surface finishes, secondary operations, Romania & EU shipping rates, and laser/press-brake limits synchronized directly with the Borman Metal configurator.",
        "operationId": "getCapabilities",
        "tags": ["Capabilities"],
        "responses": {
          "200": {
            "description": "Live factory capabilities and pricing metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapabilitiesResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/quote/instant": {
      "get": {
        "summary": "Instant Sheet Metal Quote via Query Parameters (Ideal for LLMs & Chatbots)",
        "description": "Returns exact Borman Metal website pricing (including live shipping & EU VAT) from parametric dimensions or an HTTPS CAD file_url. Engineered for ChatGPT, Gemini, Claude, and Perplexity to answer questions like 'How much does my 3mm steel L-bracket cost with shipping?' using the returned human_summary_en / human_summary_ro fields.",
        "operationId": "getInstantQuote",
        "tags": ["Instant Quoting & Dropshipping"],
        "security": [{}, { "ApiKeyAuth": [] }, { "BearerAuth": [] }],
        "parameters": [
          { "name": "material", "in": "query", "required": false, "schema": { "type": "string", "default": "OTEL_S235" }, "description": "Material code or name (e.g. OTEL_S235, INOX_304, ALU_5754, Steel, Stainless Steel, Aluminum)" },
          { "name": "thickness_mm", "in": "query", "required": false, "schema": { "type": "number", "default": 3 }, "description": "Sheet thickness in mm (0.5 to 20)" },
          { "name": "width_mm", "in": "query", "required": false, "schema": { "type": "number" }, "description": "Flat unfolded width in mm (required unless file_url is supplied)" },
          { "name": "height_mm", "in": "query", "required": false, "schema": { "type": "number" }, "description": "Flat unfolded height in mm (required unless file_url is supplied)" },
          { "name": "bends", "in": "query", "required": false, "schema": { "type": "integer", "default": 0 }, "description": "Number of CNC press brake bends" },
          { "name": "hole_count", "in": "query", "required": false, "schema": { "type": "integer", "default": 0 }, "description": "Number of internal holes / cutouts (accounts for laser lead-in & pierce time)" },
          { "name": "cut_length_mm", "in": "query", "required": false, "schema": { "type": "number" }, "description": "Optional total laser cut perimeter in mm (estimated automatically if omitted)" },
          { "name": "quantity", "in": "query", "required": false, "schema": { "type": "integer", "default": 1, "minimum": 1 } },
          { "name": "surface_finish", "in": "query", "required": false, "schema": { "type": "string", "enum": ["RAW", "DEBURRED", "POWDER_COATED", "ANODIZED", "MIRROR_FINISH", "TEXTURE"], "default": "RAW" } },
          { "name": "shipping_country", "in": "query", "required": false, "schema": { "type": "string", "default": "RO" }, "description": "ISO 3166-1 alpha-2 country code (RO, DE, AT, HU, FR, IT, NL, etc.)" },
          { "name": "delivery_method", "in": "query", "required": false, "schema": { "type": "string", "enum": ["delivery", "pickup"], "default": "delivery" } },
          { "name": "client_type", "in": "query", "required": false, "schema": { "type": "string", "enum": ["personal", "company"], "default": "personal" } },
          { "name": "vat_number", "in": "query", "required": false, "schema": { "type": "string" }, "description": "EU VAT ID for B2B intra-community 0% reverse charge (e.g. DE123456789)" },
          { "name": "markup_percent", "in": "query", "required": false, "schema": { "type": "number" }, "description": "Dropshipping profit margin percentage added on top of Borman Metal wholesale parts cost" },
          { "name": "markup_fixed_eur", "in": "query", "required": false, "schema": { "type": "number" }, "description": "Optional fixed dropshipping profit in EUR" },
          { "name": "file_url", "in": "query", "required": false, "schema": { "type": "string", "format": "uri" }, "description": "Public HTTPS URL to a .STEP, .STP or .DXF CAD file" },
          { "name": "currency", "in": "query", "required": false, "schema": { "type": "string", "enum": ["EUR", "RON"], "default": "EUR" } },
          { "name": "language", "in": "query", "required": false, "schema": { "type": "string", "enum": ["RO", "EN"], "default": "RO" } }
        ],
        "responses": {
          "200": {
            "description": "Exact website-parity quote with shipping, VAT, dropshipping profit breakdown, LLM summaries, and signed 24h quote_token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstantQuoteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing geometry parameters",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
          },
          "422": {
            "description": "Manufacturing / DFM error (e.g. exceeds 3000x1500mm laser bed or 125T press brake)",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstantQuoteResponse" } } }
          }
        }
      },
      "post": {
        "summary": "Instant Automated Quote (STEP/DXF Upload, URL, Base64, Multi-Part Cart & Dropshipping)",
        "description": "Accepts multipart/form-data (.step/.stp/.dxf) or JSON (single part or multi-item `items[]`, with `file_url`, `file_base64`, or parametric dimensions). Computes exact Borman Metal website pricing (including sheet nesting, pierce/lead-in, finishes, secondary operations, partner discounts, live Romania/EU shipping, EU VAT) plus dropshipping profit calculations and a 24h HMAC-signed `quote_token` for 1-call order placement.",
        "operationId": "createInstantQuote",
        "tags": ["Instant Quoting & Dropshipping"],
        "security": [{}, { "ApiKeyAuth": [] }, { "BearerAuth": [] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/InstantQuoteJsonRequest" }
            },
            "multipart/form-data": {
              "schema": { "$ref": "#/components/schemas/InstantQuoteFormRequest" }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authoritative instant quote generated",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstantQuoteResponse" } } }
          },
          "400": {
            "description": "Invalid request payload or unsupported CAD file",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
          },
          "401": {
            "description": "Invalid or revoked Partner API key",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
          },
          "422": {
            "description": "Critical DFM manufacturing error detected (self-healing fix_suggestion included)",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstantQuoteResponse" } } }
          }
        }
      }
    },
    "/api/v1/orders": {
      "get": {
        "summary": "List Partner / Dropshipping Orders & Live Tracking",
        "description": "Returns all production and dropshipping orders submitted under the authenticated Partner API key, including production status, payment status, courier AWB tracking, and Keez invoice metadata.",
        "operationId": "listPartnerOrders",
        "tags": ["Orders & Fulfillment"],
        "security": [{ "ApiKeyAuth": [] }, { "BearerAuth": [] }],
        "responses": {
          "200": {
            "description": "List of partner orders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean" },
                    "count": { "type": "integer" },
                    "orders": { "type": "array", "items": { "$ref": "#/components/schemas/OrderSummary" } }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid Partner API key",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
          }
        }
      },
      "post": {
        "summary": "Place a Production or White-Label Dropshipping Order",
        "description": "Converts a 24h signed `quote_token` (from /api/v1/quote/instant) or inline `items[]` directly into a real Borman Metal production order. Supports white-label dropshipping directly to your end customer's address (no Borman Metal invoice/pricing in parcel), Stripe Checkout `payment_url`, or Bank Transfer (OP) proforma.",
        "operationId": "createPartnerOrder",
        "tags": ["Orders & Fulfillment"],
        "security": [{ "ApiKeyAuth": [] }, { "BearerAuth": [] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/CreateOrderRequest" }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Order created in Borman Metal production pipeline",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateOrderResponse" } } }
          },
          "400": {
            "description": "Invalid order payload, expired quote_token, or missing shipping address",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
          },
          "401": {
            "description": "Partner API key required (generate free at https://bormanmetal.ro/ghid/ai-procurement)",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
          }
        }
      }
    },
    "/api/v1/orders/{orderId}": {
      "get": {
        "summary": "Get Live Order Status, Courier AWB Tracking & Invoice",
        "description": "Polls the real-time status of a specific Borman Metal order (Submitted -> Approved -> In Production -> Ready to be Shipped -> Shipped -> Finished), including courier name, AWB tracking code, tracking URL, and Keez fiscal invoice status.",
        "operationId": "getPartnerOrder",
        "tags": ["Orders & Fulfillment"],
        "security": [{ "ApiKeyAuth": [] }, { "BearerAuth": [] }],
        "parameters": [
          { "name": "orderId", "in": "path", "required": true, "schema": { "type": "string" }, "example": "BOR-API-M1A2B3" }
        ],
        "responses": {
          "200": {
            "description": "Live order details & tracking",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderDetailResponse" } } }
          },
          "401": { "description": "Missing or invalid Partner API key" },
          "403": { "description": "Order belongs to a different account" },
          "404": { "description": "Order not found" }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "User-generated Borman Metal Partner API key (`bm_live_...`). Generate yours at https://bormanmetal.ro/ghid/ai-procurement#api-keys"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "bm_live_...",
        "description": "Pass `Authorization: Bearer bm_live_...` using your Partner API key."
      }
    },
    "schemas": {
      "CapabilitiesResponse": {
        "type": "object",
        "properties": {
          "facility": { "type": "string", "example": "BORMAN METAL S.R.L." },
          "api_version": { "type": "string", "example": "2.0" },
          "pricing_engine": { "type": "string", "example": "live_website_parity" },
          "eur_to_ron_rate": { "type": "number", "example": 4.98 },
          "laser_cutting": { "type": "object" },
          "press_brake_bending": { "type": "object" },
          "surface_finishes": { "type": "array", "items": { "type": "object" } },
          "secondary_operations": { "type": "array", "items": { "type": "string" } },
          "shipping_zones": { "type": "object" },
          "endpoints": { "type": "object" }
        }
      },
      "QuoteItemJson": {
        "type": "object",
        "properties": {
          "file_url": { "type": "string", "format": "uri", "description": "Public HTTPS URL to .step, .stp or .dxf CAD file" },
          "file_base64": { "type": "string", "description": "Base64-encoded .step, .stp or .dxf binary" },
          "file_name": { "type": "string", "example": "l_bracket_holder_3mm.step" },
          "material": { "type": "string", "example": "OTEL_S235" },
          "thickness_mm": { "type": "number", "example": 3.0 },
          "quantity": { "type": "integer", "minimum": 1, "example": 10 },
          "surface_finish": { "type": "string", "enum": ["RAW", "DEBURRED", "POWDER_COATED", "ANODIZED", "MIRROR_FINISH", "TEXTURE"], "default": "RAW" },
          "powder_coat_ral": { "type": "string", "example": "RAL9005_MATT" },
          "width_mm": { "type": "number", "example": 150, "description": "Flat unfolded width in mm (used when no CAD file is supplied)" },
          "height_mm": { "type": "number", "example": 80, "description": "Flat unfolded height in mm (used when no CAD file is supplied)" },
          "bends": { "type": "integer", "example": 1 },
          "hole_count": { "type": "integer", "example": 4 },
          "cut_length_mm": { "type": "number", "example": 540 },
          "secondary_operations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": { "type": "string", "example": "THREAD_M5" },
                "count": { "type": "integer", "example": 4 }
              }
            }
          }
        }
      },
      "InstantQuoteJsonRequest": {
        "type": "object",
        "description": "Pass either top-level single-part fields OR an `items[]` array for multi-part orders.",
        "properties": {
          "items": { "type": "array", "items": { "$ref": "#/components/schemas/QuoteItemJson" } },
          "file_url": { "type": "string", "format": "uri" },
          "file_base64": { "type": "string" },
          "file_name": { "type": "string", "example": "l_shape_holder.step" },
          "material": { "type": "string", "example": "OTEL_S235" },
          "thickness_mm": { "type": "number", "example": 3.0 },
          "quantity": { "type": "integer", "example": 5 },
          "surface_finish": { "type": "string", "enum": ["RAW", "DEBURRED", "POWDER_COATED", "ANODIZED", "MIRROR_FINISH", "TEXTURE"], "default": "RAW" },
          "powder_coat_ral": { "type": "string", "example": "RAL9005_MATT" },
          "width_mm": { "type": "number", "example": 150 },
          "height_mm": { "type": "number", "example": 80 },
          "bends": { "type": "integer", "example": 1 },
          "hole_count": { "type": "integer", "example": 4 },
          "shipping_country": { "type": "string", "example": "DE" },
          "delivery_method": { "type": "string", "enum": ["delivery", "pickup"], "default": "delivery" },
          "client_type": { "type": "string", "enum": ["personal", "company"], "default": "personal" },
          "vat_number": { "type": "string", "example": "DE123456789" },
          "markup_percent": { "type": "number", "example": 35, "description": "Partner dropshipping profit markup %" },
          "markup_fixed_eur": { "type": "number", "example": 0 },
          "currency": { "type": "string", "enum": ["EUR", "RON"], "default": "EUR" },
          "language": { "type": "string", "enum": ["RO", "EN"], "default": "EN" }
        }
      },
      "InstantQuoteFormRequest": {
        "type": "object",
        "properties": {
          "file": { "type": "string", "format": "binary", "description": "3D .STEP/.STP or 2D .DXF file (max 25 MB)" },
          "material": { "type": "string", "example": "OTEL_S235" },
          "thickness_mm": { "type": "number", "example": 3.0 },
          "quantity": { "type": "integer", "example": 10 },
          "surface_finish": { "type": "string", "enum": ["RAW", "DEBURRED", "POWDER_COATED", "ANODIZED", "MIRROR_FINISH", "TEXTURE"] },
          "powder_coat_ral": { "type": "string", "example": "RAL9005_MATT" },
          "shipping_country": { "type": "string", "example": "RO" },
          "markup_percent": { "type": "number", "example": 30 },
          "currency": { "type": "string", "enum": ["EUR", "RON"] },
          "language": { "type": "string", "enum": ["RO", "EN"] }
        }
      },
      "InstantQuoteResponse": {
        "type": "object",
        "required": ["success", "quote_id", "currency", "human_summary_en", "human_summary_ro", "pricing", "logistics", "dfm_analysis"],
        "properties": {
          "success": { "type": "boolean" },
          "quote_id": { "type": "string", "example": "BOR-API-849201" },
          "quote_token": { "type": "string", "description": "HMAC-signed 24h token accepted directly by POST /api/v1/orders" },
          "created_at": { "type": "string", "format": "date-time" },
          "expires_at": { "type": "string", "format": "date-time" },
          "currency": { "type": "string", "enum": ["EUR", "RON"] },
          "eur_to_ron_rate": { "type": "number", "example": 4.98 },
          "authenticated_partner": { "type": "boolean" },
          "human_summary_en": { "type": "string", "example": "On bormanmetal.ro, 10x 3mm Steel (150x80 mm, 1 bend) costs €45.00 total including shipping to Germany..." },
          "human_summary_ro": { "type": "string" },
          "checkout_url": { "type": "string", "format": "uri", "example": "https://bormanmetal.ro/project-editor" },
          "pricing": { "$ref": "#/components/schemas/PricingBreakdown" },
          "items": { "type": "array", "items": { "type": "object" } },
          "logistics": { "$ref": "#/components/schemas/LogisticsDetails" },
          "dfm_analysis": { "$ref": "#/components/schemas/DfmAnalysis" }
        }
      },
      "PricingBreakdown": {
        "type": "object",
        "properties": {
          "unit_price_net": { "type": "number" },
          "parts_subtotal_net": { "type": "number" },
          "partner_discount_percent": { "type": "number" },
          "partner_discount_amount": { "type": "number" },
          "parts_total_net": { "type": "number" },
          "shipping_net": { "type": "number" },
          "shipping_ron": { "type": "number" },
          "total_price_net": { "type": "number" },
          "vat_rate_percent": { "type": "number" },
          "vat_regime": { "type": "string" },
          "vat_amount": { "type": "number" },
          "total_price_gross": { "type": "number" },
          "total_price_gross_ron": { "type": "number" },
          "breakdown": {
            "type": "object",
            "properties": {
              "material_raw_net": { "type": "number" },
              "laser_cutting_net": { "type": "number" },
              "cnc_bending_net": { "type": "number" },
              "surface_finishing_net": { "type": "number" },
              "secondary_ops_net": { "type": "number" },
              "setup_and_nesting_net": { "type": "number" },
              "estimated_shipping_net": { "type": "number" },
              "estimated_shipping_ron": { "type": "number" }
            }
          },
          "dropshipping": {
            "type": "object",
            "properties": {
              "markup_percent": { "type": "number", "example": 35 },
              "markup_fixed_eur": { "type": "number", "example": 0 },
              "your_cost_net_eur": { "type": "number" },
              "your_cost_gross_eur": { "type": "number" },
              "your_cost_gross_ron": { "type": "number" },
              "your_profit_net_eur": { "type": "number" },
              "your_profit_net_ron": { "type": "number" },
              "customer_retail_net_eur": { "type": "number" },
              "customer_retail_gross_eur": { "type": "number" },
              "customer_retail_gross_ron": { "type": "number" }
            }
          }
        }
      },
      "LogisticsDetails": {
        "type": "object",
        "properties": {
          "delivery_method": { "type": "string", "enum": ["delivery", "pickup"] },
          "destination_country": { "type": "string", "example": "DE" },
          "carrier": { "type": "string", "example": "European Road Freight (Germany)" },
          "shipping_tier": { "type": "string" },
          "shipping_cost_ron": { "type": "number" },
          "shipping_cost_eur": { "type": "number" },
          "lead_time_business_days": { "type": "integer", "example": 5 },
          "estimated_dispatch_date": { "type": "string", "format": "date" },
          "shipping_weight_kg": { "type": "number" }
        }
      },
      "DfmAnalysis": {
        "type": "object",
        "properties": {
          "status": { "type": "string", "enum": ["quotations_ready", "warnings_present", "manufacturing_error", "manual_review_required"] },
          "geometry_source": { "type": "string", "enum": ["step_3d", "dxf_2d", "parametric"] },
          "detected_thickness_mm": { "type": "number" },
          "unfolded_dimensions_mm": {
            "type": "object",
            "properties": {
              "length": { "type": "number" },
              "width": { "type": "number" },
              "height_3d": { "type": "number" }
            }
          },
          "bend_count": { "type": "integer" },
          "cut_length_meters": { "type": "number" },
          "pierce_count": { "type": "integer" },
          "warnings": { "type": "array", "items": { "type": "object" } },
          "errors": { "type": "array", "items": { "type": "object" } }
        }
      },
      "CreateOrderRequest": {
        "type": "object",
        "properties": {
          "quote_token": { "type": "string", "description": "Signed 24h quote_token returned by /api/v1/quote/instant" },
          "items": { "type": "array", "items": { "$ref": "#/components/schemas/QuoteItemJson" }, "description": "Alternative to quote_token: quote & order in a single call" },
          "external_order_ref": { "type": "string", "example": "SHOP-10482", "description": "Your storefront or ERP order ID" },
          "project_name": { "type": "string", "example": "L-Shape Holder Order #10482" },
          "white_label": { "type": "boolean", "default": false, "description": "Dropshipping mode: ship directly to end customer with NO Borman Metal invoice or prices in the parcel" },
          "is_dropship": { "type": "boolean", "default": false },
          "payment_method": { "type": "string", "enum": ["stripe", "bank_transfer"], "default": "bank_transfer" },
          "delivery_method": { "type": "string", "enum": ["delivery", "pickup"], "default": "delivery" },
          "currency": { "type": "string", "enum": ["EUR", "RON"], "default": "EUR" },
          "language": { "type": "string", "enum": ["RO", "EN"], "default": "EN" },
          "markup_percent": { "type": "number", "example": 35 },
          "shipping_address": {
            "type": "object",
            "required": ["street", "city", "country"],
            "properties": {
              "name": { "type": "string", "example": "Max Mustermann" },
              "phone": { "type": "string", "example": "+49 170 1234567" },
              "email": { "type": "string", "example": "customer@example.com" },
              "street": { "type": "string", "example": "Hauptstrasse 42" },
              "city": { "type": "string", "example": "Munich" },
              "state": { "type": "string", "example": "Bavaria" },
              "zip": { "type": "string", "example": "80331" },
              "country": { "type": "string", "example": "DE" }
            }
          }
        }
      },
      "CreateOrderResponse": {
        "type": "object",
        "properties": {
          "success": { "type": "boolean" },
          "order_id": { "type": "string", "example": "BOR-API-M1X9K2" },
          "external_order_ref": { "type": "string" },
          "status": { "type": "string", "example": "Submitted" },
          "payment_status": { "type": "string", "example": "pending" },
          "payment_method": { "type": "string" },
          "payment_reference": { "type": "string" },
          "payment_url": { "type": "string", "nullable": true, "description": "Hosted Stripe Checkout URL when payment_method is 'stripe'" },
          "bank_transfer": { "type": "object", "description": "IBAN & payment reference when payment_method is 'bank_transfer'" },
          "dropshipping": { "type": "object" },
          "pricing": { "type": "object" },
          "tracking_endpoint": { "type": "string", "format": "uri" },
          "dashboard_url": { "type": "string", "format": "uri" }
        }
      },
      "OrderSummary": {
        "type": "object",
        "properties": {
          "order_id": { "type": "string" },
          "external_order_ref": { "type": "string", "nullable": true },
          "status": { "type": "string" },
          "payment_status": { "type": "string" },
          "total_gross_eur": { "type": "number" },
          "is_dropship": { "type": "boolean" },
          "white_label": { "type": "boolean" },
          "tracking": { "type": "object" },
          "created_at": { "type": "string", "format": "date-time" }
        }
      },
      "OrderDetailResponse": {
        "type": "object",
        "properties": {
          "success": { "type": "boolean" },
          "order_id": { "type": "string" },
          "external_order_ref": { "type": "string", "nullable": true },
          "status": { "type": "string" },
          "payment_status": { "type": "string" },
          "is_dropship": { "type": "boolean" },
          "white_label": { "type": "boolean" },
          "total_gross_eur": { "type": "number" },
          "tracking": { "type": "object" },
          "invoice": { "type": "object" },
          "items": { "type": "array", "items": { "type": "object" } },
          "created_at": { "type": "string", "format": "date-time" }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": ["error", "message"],
        "properties": {
          "success": { "type": "boolean", "example": false },
          "error": { "type": "string", "example": "API_KEY_REQUIRED" },
          "message": { "type": "string" }
        }
      }
    }
  }
}
