{
  "openapi": "3.1.0",
  "info": {
    "title": "PrepPort Global Customer API v1",
    "version": "1.0.0",
    "summary": "Customer-owned integration API for supplier-side ecommerce operations.",
    "description": "Use PrepPort Customer API v1 to create and track inbound shipments, warehouse receiving profile, fulfillment orders, QC inspections, sourcing RFQs, quote readiness, support tickets, quote responses, invoice payment evidence, Shopify connection status, Shopify order sync cockpit, integration readiness, wallet retention cockpit, operations files, inventory, first shipment readiness, control tower status, and customer action center items."
  },
  "servers": [
    {
      "url": "https://api.prepportglobal.com",
      "description": "PrepPort Global production API"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    { "name": "Status" },
    { "name": "Inventory" },
    { "name": "Inbound ASNs" },
    { "name": "Fulfillment Orders" },
    { "name": "QC Inspections" },
    { "name": "Sourcing RFQs" },
    { "name": "Quote Readiness" },
    { "name": "Support Tickets" },
    { "name": "Quotes" },
    { "name": "Invoices" },
    { "name": "Shopify" },
    { "name": "Receiving" },
    { "name": "Wallet" },
    { "name": "Operations" },
    { "name": "CSV Intake" },
    { "name": "Developer Assets" }
  ],
  "x-prepport-developer-assets": {
    "openapi": "/prepport-customer-api-openapi.json",
    "postman": "/prepport-customer-api-postman.json",
    "examples": "/prepport-customer-api-examples.md",
    "portalApiAccess": "/customer-portal.html#apiaccess",
    "recommendedPilot": [
      "Create a portal account and API key.",
      "Call GET /api/v1/control-tower.",
      "Register a webhook endpoint and send a portal test delivery.",
      "Create one SANDBOX ASN or fulfillment order.",
      "Confirm the record appears in Control Tower, Action center, and webhook delivery log before production order flow."
    ]
  },
  "x-prepport-sandbox-flow": {
    "referencePrefix": "SANDBOX",
    "safeWriteEndpoints": [
      "/api/v1/asns",
      "/api/v1/fulfillment-orders",
      "/api/v1/qc-inspections",
      "/api/v1/sourcing-rfqs",
      "/api/v1/support-tickets",
      "/api/v1/csv-intake"
    ],
    "doesNotDo": [
      "No payment settlement",
      "No wallet credit",
      "No supplier purchase",
      "No goods release",
      "No external marketplace API call"
    ]
  },
  "paths": {
    "/api/v1": {
      "get": {
        "tags": ["Status"],
        "summary": "Customer API summary",
        "description": "Returns account context, counts, first shipment readiness, action center, inventory summary, and API links.",
        "operationId": "getCustomerApiSummary",
        "security": [{ "bearerAuth": ["read:status"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/CustomerSummaryResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/action-center": {
      "get": {
        "tags": ["Status"],
        "summary": "List prioritized customer actions",
        "operationId": "getCustomerActionCenter",
        "security": [{ "bearerAuth": ["read:status"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/ActionCenterResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/control-tower": {
      "get": {
        "tags": ["Status"],
        "summary": "Get customer control tower status",
        "description": "Returns one customer-safe health view across first shipment readiness, action center, exceptions, inbound/QC, fulfillment and drop shipping, inventory, sourcing/procurement, quotes, invoices, integrations, and support. This route is read-only and returns no API key secrets, webhook signing secrets, Shopify tokens, payment instructions, customer tokens, or internal notes.",
        "operationId": "getCustomerControlTower",
        "security": [{ "bearerAuth": ["read:status"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/ControlTowerResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/inventory": {
      "get": {
        "tags": ["Inventory"],
        "summary": "List customer inventory summary",
        "operationId": "getCustomerInventory",
        "security": [{ "bearerAuth": ["read:inventory"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/InventoryResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/asns": {
      "get": {
        "tags": ["Inbound ASNs"],
        "summary": "List inbound shipment notices",
        "operationId": "listCustomerAsns",
        "security": [{ "bearerAuth": ["read:orders"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/ListResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      },
      "post": {
        "tags": ["Inbound ASNs"],
        "summary": "Create inbound shipment notice",
        "operationId": "createCustomerAsn",
        "security": [{ "bearerAuth": ["write:asn"] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/AsnCreate" },
              "examples": {
                "basic": { "$ref": "#/components/examples/AsnCreate" }
              }
            }
          }
        },
        "responses": {
          "201": { "$ref": "#/components/responses/ItemResponse" },
          "400": { "$ref": "#/components/responses/ErrorResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/fulfillment-orders": {
      "get": {
        "tags": ["Fulfillment Orders"],
        "summary": "List outbound or drop-shipping orders",
        "operationId": "listCustomerFulfillmentOrders",
        "security": [{ "bearerAuth": ["read:orders"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/ListResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      },
      "post": {
        "tags": ["Fulfillment Orders"],
        "summary": "Create outbound or drop-shipping order",
        "operationId": "createCustomerFulfillmentOrder",
        "security": [{ "bearerAuth": ["write:fulfillment"] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/FulfillmentOrderCreate" },
              "examples": {
                "shopifyDropShip": { "$ref": "#/components/examples/FulfillmentOrderCreate" }
              }
            }
          }
        },
        "responses": {
          "201": { "$ref": "#/components/responses/ItemResponse" },
          "400": { "$ref": "#/components/responses/ErrorResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/qc-inspections": {
      "get": {
        "tags": ["QC Inspections"],
        "summary": "List QC inspection requests",
        "operationId": "listCustomerQcInspections",
        "security": [{ "bearerAuth": ["read:qc"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/ListResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      },
      "post": {
        "tags": ["QC Inspections"],
        "summary": "Create QC inspection request",
        "operationId": "createCustomerQcInspection",
        "security": [{ "bearerAuth": ["write:qc"] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/QcInspectionCreate" },
              "examples": {
                "preShipment": { "$ref": "#/components/examples/QcInspectionCreate" }
              }
            }
          }
        },
        "responses": {
          "201": { "$ref": "#/components/responses/ItemResponse" },
          "400": { "$ref": "#/components/responses/ErrorResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/sourcing-rfqs": {
      "get": {
        "tags": ["Sourcing RFQs"],
        "summary": "List product sourcing RFQs with qualification status",
        "operationId": "listCustomerSourcingRfqs",
        "security": [{ "bearerAuth": ["read:sourcing"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/ListResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      },
      "post": {
        "tags": ["Sourcing RFQs"],
        "summary": "Create product sourcing or procurement RFQ",
        "operationId": "createCustomerSourcingRfq",
        "security": [{ "bearerAuth": ["write:sourcing"] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/SourcingRfqCreate" },
              "examples": {
                "procurement": { "$ref": "#/components/examples/SourcingRfqCreate" }
              }
            }
          }
        },
        "responses": {
          "201": { "$ref": "#/components/responses/ItemResponse" },
          "400": { "$ref": "#/components/responses/ErrorResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/quote-readiness": {
      "get": {
        "tags": ["Quote Readiness"],
        "summary": "Get customer-safe quote readiness status",
        "description": "Returns missing customer inputs, quote response actions, invoice/payment evidence actions, and staff review status across service requests, sourcing RFQs, procurement, drop shipping, quotes, and invoices. This route does not expose internal rate-card totals, payment instructions, payment references, customer tokens, supplier risk notes, or internal notes.",
        "operationId": "getCustomerQuoteReadiness",
        "security": [{ "bearerAuth": ["read:quotes"] }],
        "responses": {
          "200": {
            "description": "Customer-safe quote readiness summary.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": { "type": "boolean" },
                    "quoteReadiness": { "type": "object", "additionalProperties": true }
                  },
                  "required": ["ok", "quoteReadiness"]
                }
              }
            }
          },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/support-tickets": {
      "get": {
        "tags": ["Support Tickets"],
        "summary": "List support tickets",
        "operationId": "listCustomerSupportTickets",
        "security": [{ "bearerAuth": ["read:support"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/ListResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      },
      "post": {
        "tags": ["Support Tickets"],
        "summary": "Create support or exception ticket",
        "operationId": "createCustomerSupportTicket",
        "security": [{ "bearerAuth": ["write:support"] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/SupportTicketCreate" },
              "examples": {
                "statusFollowUp": { "$ref": "#/components/examples/SupportTicketCreate" }
              }
            }
          }
        },
        "responses": {
          "201": { "$ref": "#/components/responses/ItemResponse" },
          "400": { "$ref": "#/components/responses/ErrorResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/quotes": {
      "get": {
        "tags": ["Quotes"],
        "summary": "List approved customer-visible quotes",
        "operationId": "listCustomerQuotes",
        "security": [{ "bearerAuth": ["read:quotes"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/ListResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/quotes/{quoteId}/response": {
      "post": {
        "tags": ["Quotes"],
        "summary": "Submit customer quote response",
        "operationId": "respondCustomerQuote",
        "security": [{ "bearerAuth": ["write:quotes"] }],
        "parameters": [
          {
            "name": "quoteId",
            "in": "path",
            "required": true,
            "schema": { "type": "string" }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/QuoteResponse" },
              "examples": {
                "accepted": { "$ref": "#/components/examples/QuoteResponse" }
              }
            }
          }
        },
        "responses": {
          "202": { "$ref": "#/components/responses/ItemResponse" },
          "400": { "$ref": "#/components/responses/ErrorResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" },
          "404": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/invoices": {
      "get": {
        "tags": ["Invoices"],
        "summary": "List invoices and deposit requests",
        "operationId": "listCustomerInvoices",
        "security": [{ "bearerAuth": ["read:invoices"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/ListResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/invoices/{invoiceId}/payment-evidence": {
      "post": {
        "tags": ["Invoices"],
        "summary": "Submit invoice payment evidence for staff verification",
        "description": "Creates a staff verification item. It does not mark the invoice paid, credit wallet balance, or release goods automatically.",
        "operationId": "submitCustomerInvoicePaymentEvidence",
        "security": [{ "bearerAuth": ["write:invoices"] }],
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": { "type": "string" }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/PaymentEvidence" },
              "examples": {
                "paypal": { "$ref": "#/components/examples/PaymentEvidence" }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Payment evidence accepted for staff verification.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": { "type": "boolean" },
                    "invoice": { "type": "object" },
                    "evidence": { "type": "object" }
                  }
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ErrorResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" },
          "404": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/shopify-connections": {
      "get": {
        "tags": ["Shopify"],
        "summary": "List Shopify connection status",
        "operationId": "listCustomerShopifyConnections",
        "security": [{ "bearerAuth": ["read:shopify"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/ListResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/integration-center": {
      "get": {
        "tags": ["Status"],
        "summary": "Get connection and integration readiness",
        "description": "Returns a customer-safe readiness view across Shopify sync, Customer API, customer webhooks, manual/CSV fallback, operations files, first shipment setup, and open customer actions. The API-key view returns credential counts only, not API key secrets or webhook signing secrets.",
        "operationId": "getCustomerIntegrationCenter",
        "security": [{ "bearerAuth": ["read:status"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/IntegrationCenterResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/receiving-profile": {
      "get": {
        "tags": ["Receiving"],
        "summary": "Get warehouse receiving profile",
        "description": "Returns the customer-safe receiving site profile, customer code, receiving reference format, carton marking format, pre-shipment checklist, current shipping hold/ready state, and recent ASN receiving references. This route does not create payment instructions, release goods, mutate inventory, expose private warehouse data unless intentionally configured, or call external platforms.",
        "operationId": "getCustomerReceivingProfile",
        "security": [{ "bearerAuth": ["read:operations"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/ReceivingProfileResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/wallet": {
      "get": {
        "tags": ["Wallet"],
        "summary": "Get wallet and top-up status",
        "operationId": "getCustomerWallet",
        "security": [{ "bearerAuth": ["read:wallet"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/WalletResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/operations": {
      "get": {
        "tags": ["Operations"],
        "summary": "Get operations files, standards, suppliers, and reports",
        "operationId": "getCustomerOperations",
        "security": [{ "bearerAuth": ["read:status"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/OperationsResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    },
    "/api/v1/csv-intake": {
      "post": {
        "tags": ["CSV Intake"],
        "summary": "Preflight or apply customer CSV rows",
        "description": "Validates and optionally imports template CSV rows for inbound ASNs, bulk drop-shipping orders, QC inspections, sourcing RFQs, SKU master, and supplier profiles. The route does not send messages, collect payment, release goods, or call external platforms.",
        "operationId": "customerCsvIntake",
        "security": [{ "bearerAuth": ["write:asn", "write:fulfillment", "write:qc", "write:sourcing", "write:operations"] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/CsvIntakeRequest" },
              "examples": {
                "skuMasterPreflight": { "$ref": "#/components/examples/CsvIntakeRequest" }
              }
            }
          }
        },
        "responses": {
          "200": { "$ref": "#/components/responses/ItemResponse" },
          "201": { "$ref": "#/components/responses/ItemResponse" },
          "400": { "$ref": "#/components/responses/ErrorResponse" },
          "401": { "$ref": "#/components/responses/ErrorResponse" },
          "403": { "$ref": "#/components/responses/ErrorResponse" }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "PrepPort API key"
      }
    },
    "responses": {
      "CustomerSummaryResponse": {
        "description": "Customer API summary.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "ok": { "type": "boolean" },
                "summary": {
                  "type": "object",
                  "properties": {
                    "account": { "type": "object" },
                    "counts": { "type": "object" },
                    "controlTower": { "$ref": "#/components/schemas/ControlTower" },
                    "firstShipmentPlan": { "$ref": "#/components/schemas/FirstShipmentPlan" },
                    "actionCenter": { "type": "object" },
                    "inventory": { "type": "object" },
                    "wallet": { "$ref": "#/components/schemas/WalletSummary" },
                    "receivingProfile": { "$ref": "#/components/schemas/WarehouseReceivingProfile" },
                    "shopify": {
                      "type": "object",
                      "properties": {
                        "connections": { "type": "array", "items": { "type": "object" } },
                        "setupActions": { "type": "array", "items": { "type": "object" } },
                        "syncCockpit": { "$ref": "#/components/schemas/ShopifySyncCockpit" }
                      },
                      "additionalProperties": true
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "firstShipmentPlan": { "type": "string", "example": "/api/v1" },
                        "actions": { "type": "string", "example": "/api/v1/action-center" },
                        "controlTower": { "type": "string", "example": "/api/v1/control-tower" },
                        "inventory": { "type": "string", "example": "/api/v1/inventory" },
                        "receivingProfile": { "type": "string", "example": "/api/v1/receiving-profile" }
                      },
                      "additionalProperties": { "type": "string" }
                    }
                  },
                  "required": ["account", "counts", "controlTower", "firstShipmentPlan", "actionCenter", "inventory", "wallet", "receivingProfile", "shopify", "links"],
                  "additionalProperties": true
                }
              },
              "required": ["ok", "summary"]
            }
          }
        }
      },
      "ActionCenterResponse": {
        "description": "Customer action center.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "ok": { "type": "boolean" },
                "actionCenter": { "type": "object" }
              },
              "required": ["ok", "actionCenter"]
            }
          }
        }
      },
      "ControlTowerResponse": {
        "description": "Customer control tower.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "ok": { "type": "boolean" },
                "controlTower": { "$ref": "#/components/schemas/ControlTower" }
              },
              "required": ["ok", "controlTower"]
            }
          }
        }
      },
      "InventoryResponse": {
        "description": "Customer inventory summary.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "ok": { "type": "boolean" },
                "inventory": { "type": "object" }
              },
              "required": ["ok", "inventory"]
            }
          }
        }
      },
      "WalletResponse": {
        "description": "Customer wallet summary.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "ok": { "type": "boolean" },
                "wallet": { "$ref": "#/components/schemas/WalletSummary" }
              },
              "required": ["ok", "wallet"]
            }
          }
        }
      },
      "OperationsResponse": {
        "description": "Customer operations snapshot.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "ok": { "type": "boolean" },
                "operations": { "type": "object" }
              },
              "required": ["ok", "operations"]
            }
          }
        }
      },
      "IntegrationCenterResponse": {
        "description": "Customer connection and integration readiness.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "ok": { "type": "boolean" },
                "integrationCenter": {
                  "type": "object",
                  "properties": {
                    "mode": { "type": "string", "const": "customer_integration_center" },
                    "readiness": { "type": "object" },
                    "channels": { "type": "array", "items": { "type": "object" } },
                    "connectionPlanner": { "$ref": "#/components/schemas/CustomerConnectionPlanner" },
                    "recommendedNextSteps": { "type": "array", "items": { "type": "object" } },
                    "customerCanOperateNow": { "type": "object" },
                    "marketplaceCoverage": { "$ref": "#/components/schemas/MarketplaceIntegrationWorkbench" },
                    "apiAccess": { "type": "object" }
                  },
                  "required": ["mode", "readiness", "channels", "connectionPlanner", "recommendedNextSteps", "customerCanOperateNow"]
                }
              },
              "required": ["ok", "integrationCenter"]
            }
          }
        }
      },
      "ReceivingProfileResponse": {
        "description": "Customer-safe warehouse receiving profile.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "ok": { "type": "boolean" },
                "receivingProfile": { "$ref": "#/components/schemas/WarehouseReceivingProfile" }
              },
              "required": ["ok", "receivingProfile"]
            }
          }
        }
      },
      "ListResponse": {
        "description": "List response.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "ok": { "type": "boolean" },
                "items": {
                  "type": "array",
                  "items": { "type": "object" }
                }
              },
              "required": ["ok", "items"]
            }
          }
        }
      },
      "ItemResponse": {
        "description": "Single created or updated customer-visible item.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "ok": { "type": "boolean" },
                "item": { "type": "object" }
              },
              "required": ["ok", "item"]
            }
          }
        }
      },
      "ErrorResponse": {
        "description": "Error response.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "ok": { "type": "boolean", "const": false },
                "error": { "type": "string" }
              },
              "required": ["ok", "error"]
            }
          }
        }
      }
    },
    "schemas": {
      "LineItem": {
        "type": "object",
        "properties": {
          "sku": { "type": "string" },
          "quantity": { "type": ["number", "string"] },
          "name": { "type": "string" },
          "cartonCount": { "type": ["number", "string"] }
        },
        "additionalProperties": true
      },
      "FirstShipmentPlan": {
        "type": "object",
        "description": "Customer-safe first shipment guided start checklist for customer portals, Shopify middleware, OMS, ERP, and agencies.",
        "properties": {
          "mode": { "type": "string", "const": "first_shipment_guided_start" },
          "title": { "type": "string" },
          "progressPercent": { "type": "integer", "minimum": 0, "maximum": 100 },
          "requiredDone": { "type": "integer" },
          "requiredTotal": { "type": "integer" },
          "blockedCount": { "type": "integer" },
          "nextStepId": { "type": "string" },
          "nextAction": { "type": "string" },
          "nextTargetTab": { "type": "string" },
          "readyForFirstOperationalReview": { "type": "boolean" },
          "steps": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/FirstShipmentStep" }
          }
        },
        "required": ["mode", "progressPercent", "requiredDone", "requiredTotal", "blockedCount", "nextAction", "steps"],
        "additionalProperties": true
      },
      "FirstShipmentStep": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "title": { "type": "string" },
          "status": { "type": "string", "enum": ["done", "blocked", "in_progress", "needed", "optional"] },
          "priority": { "type": "string", "enum": ["high", "medium", "low"] },
          "summary": { "type": "string" },
          "nextAction": { "type": "string" },
          "targetTab": { "type": "string" },
          "customerAction": { "type": "boolean" },
          "optional": { "type": "boolean" },
          "evidence": { "type": "object", "additionalProperties": true }
        },
        "required": ["id", "title", "status", "summary", "nextAction", "targetTab"],
        "additionalProperties": true
      },
      "CustomerConnectionPlanner": {
        "type": "object",
        "description": "Customer-safe connection planner that tells sellers which sales-channel path to use now, what inputs to prepare, and where native connector work is still behind external approval.",
        "properties": {
          "mode": { "type": "string", "const": "customer_connection_planner" },
          "objective": { "type": "string" },
          "summary": {
            "type": "object",
            "properties": {
              "totalPaths": { "type": "integer" },
              "startNowPaths": { "type": "integer" },
              "requestedPaths": { "type": "integer" },
              "nativeLaterPaths": { "type": "integer" },
              "apiOrWebhookReady": { "type": "boolean" },
              "manualFallbackReady": { "type": "boolean" },
              "shopifyNeedsExternalCredentials": { "type": "boolean" }
            },
            "additionalProperties": true
          },
          "recommendedStartOrder": { "type": "array", "items": { "type": "string" } },
          "planCards": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": { "type": "string" },
                "label": { "type": "string" },
                "status": { "type": "string" },
                "priority": { "type": "string" },
                "category": { "type": "string" },
                "recommendedPath": { "type": "string" },
                "startNow": { "type": "boolean" },
                "requestedByAccount": { "type": "boolean" },
                "externalApprovalRequired": { "type": "boolean" },
                "directIntegration": { "type": "boolean" },
                "fallbackReady": { "type": "boolean" },
                "customerInputs": { "type": "array", "items": { "type": "string" } },
                "prepportWorkflow": { "type": "array", "items": { "type": "string" } },
                "apiSurface": { "type": "array", "items": { "type": "string" } },
                "fallbackSurface": { "type": "array", "items": { "type": "string" } },
                "targetTab": { "type": "string" },
                "primaryHref": { "type": "string" },
                "primaryCta": { "type": "string" },
                "customerSafeNextAction": { "type": "string" }
              },
              "additionalProperties": true
            }
          },
          "customerSafeDefault": { "type": "string" },
          "benchmarkRule": { "type": "string" },
          "safetyBoundaries": { "type": "array", "items": { "type": "string" } }
        },
        "required": ["mode", "summary", "recommendedStartOrder", "planCards", "customerSafeDefault"],
        "additionalProperties": true
      },
      "MarketplaceIntegrationWorkbench": {
        "type": "object",
        "description": "Customer-safe marketplace coverage map for Shopify-first integration, Amazon FBA manual workflow, marketplace CSV/API fallback, and later native-platform connectors.",
        "properties": {
          "mode": { "type": "string", "const": "marketplace_integration_workbench_no_external_no_write" },
          "summary": {
            "type": "object",
            "properties": {
              "workbenchReady": { "type": "boolean" },
              "platformsCovered": { "type": "integer" },
              "coverageScore": { "type": "integer" },
              "fallbackReadyChannels": { "type": "integer" },
              "directReadyChannels": { "type": "integer" },
              "externalApprovalRequiredChannels": { "type": "integer" },
              "customerCanOperateAcrossMarketplaces": { "type": "boolean" },
              "manualCsvFallbackReady": { "type": "boolean" },
              "customerApiReady": { "type": "boolean" },
              "shopifyPrimaryPathReady": { "type": "boolean" },
              "amazonFbaManualPathReady": { "type": "boolean" },
              "amazonSpApiLater": { "type": "boolean" }
            },
            "additionalProperties": true
          },
          "platformCoverage": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": { "type": "string" },
                "label": { "type": "string" },
                "status": { "type": "string" },
                "priority": { "type": "string" },
                "currentBestPath": { "type": "string" },
                "directIntegration": { "type": "boolean" },
                "fallbackReady": { "type": "boolean" },
                "externalApprovalRequired": { "type": "boolean" },
                "customerFieldsToProvide": { "type": "array", "items": { "type": "string" } },
                "supportedWorkflows": { "type": "array", "items": { "type": "string" } },
                "apiSurface": { "type": "array", "items": { "type": "string" } },
                "fallbackSurface": { "type": "array", "items": { "type": "string" } }
              },
              "additionalProperties": true
            }
          },
          "nextBuildOrder": { "type": "array", "items": { "type": "object" } },
          "customerSafeExplanation": { "type": "string" }
        },
        "additionalProperties": true
      },
      "ShopifySyncCockpit": {
        "type": "object",
        "description": "Customer-safe Shopify order sync cockpit: store connection, paid-unfulfilled order import, SKU/inventory match, warehouse processing, tracking sync, and manual/API fallback.",
        "properties": {
          "mode": { "type": "string", "const": "shopify_order_sync_cockpit" },
          "benchmarkPattern": { "type": "string" },
          "generatedAt": { "type": "string", "format": "date-time" },
          "overall": { "type": "object" },
          "counts": { "type": "object" },
          "stages": { "type": "array", "items": { "$ref": "#/components/schemas/ShopifySyncStage" } },
          "orders": { "type": "array", "items": { "type": "object" } },
          "fallback": { "type": "object" }
        },
        "required": ["mode", "overall", "counts", "stages", "orders", "fallback"],
        "additionalProperties": true
      },
      "ShopifySyncStage": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "label": { "type": "string" },
          "status": { "type": "string", "enum": ["ready", "customer_action", "staff_action", "needs_attention", "external_blocked"] },
          "summary": { "type": "string" },
          "nextAction": { "type": "string" },
          "targetTab": { "type": "string" },
          "customerAction": { "type": "boolean" },
          "staffAction": { "type": "boolean" },
          "externalBlocked": { "type": "boolean" },
          "metrics": { "type": "object", "additionalProperties": true }
        },
        "required": ["id", "label", "status", "summary", "nextAction", "targetTab"],
        "additionalProperties": true
      },
      "WarehouseReceivingProfile": {
        "type": "object",
        "description": "Customer-safe warehouse receiving profile for supplier dispatch readiness, ASN reference, carton marking, and pre-shipment checklist. It does not create payment instructions, credit wallet, release goods, mutate inventory, or expose private warehouse data unless intentionally configured by PrepPort.",
        "properties": {
          "mode": { "type": "string", "const": "warehouse_receiving_profile_no_secret_no_payment_no_release" },
          "status": { "type": "string", "enum": ["configured", "owner_configuration_required"] },
          "receivingSiteName": { "type": "string" },
          "addressConfigured": { "type": "boolean" },
          "addressLines": { "type": "array", "items": { "type": "string" } },
          "city": { "type": "string" },
          "region": { "type": "string" },
          "country": { "type": "string" },
          "postalCode": { "type": "string" },
          "contactName": { "type": "string" },
          "contactPhoneAvailable": { "type": "boolean" },
          "contactEmail": { "type": "string" },
          "customerCode": { "type": "string" },
          "customerCanShipToWarehouse": { "type": "boolean" },
          "receivingReferenceFormat": { "type": "string" },
          "cartonMarkingFormat": { "type": "string" },
          "customerNextAction": { "type": "string" },
          "staffNextAction": { "type": "string" },
          "preShipmentChecklist": { "type": "array", "items": { "type": "string" } },
          "receivingRules": { "type": "array", "items": { "type": "string" } },
          "blockedUntilConfigured": { "type": "array", "items": { "type": "string" } },
          "recentAsns": { "type": "array", "items": { "type": "object" } },
          "safetyBoundaries": { "type": "array", "items": { "type": "string" } }
        },
        "required": ["mode", "status", "receivingSiteName", "addressConfigured", "customerCode", "customerCanShipToWarehouse", "receivingReferenceFormat", "cartonMarkingFormat", "customerNextAction", "staffNextAction", "preShipmentChecklist", "receivingRules", "recentAsns", "safetyBoundaries"],
        "additionalProperties": true
      },
      "WalletSummary": {
        "type": "object",
        "description": "Customer-safe wallet, top-up, and referral reward summary. It never confirms settlement or credits wallet from customer-submitted evidence alone.",
        "properties": {
          "customerAccountId": { "type": "string" },
          "loyaltyTier": { "type": "string" },
          "loyaltyTierLabel": { "type": "string" },
          "referralCode": { "type": "string" },
          "referralSignupUrl": { "type": "string" },
          "referralOffer": {
            "type": "object",
            "description": "Current governed customer referral offer. Credits require new-customer, first-settled-invoice, fraud, and staff approval gates.",
            "properties": {
              "referrerWalletCredit": { "type": "object" },
              "referredCustomerServiceCredit": { "type": "object" },
              "qualification": { "type": "string" },
              "exclusions": { "type": "string" }
            },
            "additionalProperties": true
          },
          "balances": { "type": "array", "items": { "type": "object" } },
          "pendingTopUps": { "type": "array", "items": { "type": "object" } },
          "referralCredits": { "type": "array", "items": { "type": "object" } },
          "referralStats": { "type": "object", "additionalProperties": true },
          "operationsCockpit": { "$ref": "#/components/schemas/WalletRetentionCockpit" },
          "loyalty": { "$ref": "#/components/schemas/LoyaltyRetentionLadder" },
          "retentionMechanisms": { "type": "array", "items": { "type": "object" } },
          "topUps": { "type": "array", "items": { "type": "object" } },
          "transactions": { "type": "array", "items": { "type": "object" } },
          "referrals": { "type": "array", "items": { "type": "object" } }
        },
        "required": ["customerAccountId", "loyaltyTier", "referralOffer", "operationsCockpit", "loyalty", "retentionMechanisms", "topUps", "transactions", "referrals"],
        "additionalProperties": true
      },
      "LoyaltyRetentionLadder": {
        "type": "object",
        "description": "Customer-safe retention ladder based on posted wallet credits and credited referral rewards. It does not promise discounts, payment settlement, or external account actions.",
        "properties": {
          "mode": { "type": "string", "const": "loyalty_retention_ladder_no_discount_no_external" },
          "currentTier": { "type": "string" },
          "currentTierLabel": { "type": "string" },
          "nextTier": { "type": "string" },
          "nextTierLabel": { "type": "string" },
          "activityScore": { "type": "number" },
          "postedWalletCredits": { "type": "number" },
          "creditedReferralRewards": { "type": "number" },
          "registeredReferrals": { "type": "number" },
          "remainingActivity": { "type": "number" },
          "progressPercent": { "type": "number" },
          "metric": { "type": "string" },
          "customerNextAction": { "type": "string" },
          "staffNextAction": { "type": "string" },
          "currentBenefits": { "type": "array", "items": { "type": "string" } },
          "nextBenefits": { "type": "array", "items": { "type": "string" } },
          "tiers": { "type": "array", "items": { "type": "object" } }
        },
        "required": ["mode", "currentTier", "currentTierLabel", "activityScore", "progressPercent", "metric", "customerNextAction", "staffNextAction", "currentBenefits", "tiers"],
        "additionalProperties": true
      },
      "WalletRetentionCockpit": {
        "type": "object",
        "description": "Read-only wallet and referral reward cockpit covering customer action, finance review, credit posting, and retention levers.",
        "properties": {
          "mode": { "type": "string", "const": "wallet_retention_cockpit_no_money_no_external" },
          "status": { "type": "string", "enum": ["ready", "customer_action", "staff_action"] },
          "summary": { "type": "string" },
          "customerNextAction": { "type": "string" },
          "staffNextAction": { "type": "string" },
          "counts": { "type": "object", "additionalProperties": true },
          "operatingRules": { "type": "array", "items": { "type": "string" } },
          "retentionLevers": { "type": "array", "items": { "type": "string" } }
        },
        "required": ["mode", "status", "summary", "customerNextAction", "staffNextAction", "counts", "operatingRules", "retentionLevers"],
        "additionalProperties": true
      },
      "ControlTower": {
        "type": "object",
        "description": "Read-only customer-safe health view for portal dashboards, OMS, ERP, Shopify middleware, and agencies.",
        "properties": {
          "mode": { "type": "string", "const": "customer_control_tower_no_secret_no_write_no_send" },
          "generatedAt": { "type": "string", "format": "date-time" },
          "account": { "type": "object" },
          "overall": { "type": "object" },
          "workstreams": { "type": "array", "items": { "type": "object" } },
          "nextBestActions": { "type": "array", "items": { "type": "object" } },
          "counts": { "type": "object" },
          "links": { "type": "object", "additionalProperties": { "type": "string" } },
          "safetyBoundaries": { "type": "array", "items": { "type": "string" } },
          "operationsPrinciples": { "type": "array", "items": { "type": "string" } }
        },
        "required": ["mode", "generatedAt", "account", "overall", "workstreams", "nextBestActions", "counts", "links", "safetyBoundaries"],
        "additionalProperties": true
      },
      "AsnCreate": {
        "type": "object",
        "properties": {
          "asnNumber": { "type": "string" },
          "supplierName": { "type": "string" },
          "trackingNumber": { "type": "string" },
          "expectedArrival": { "type": "string", "format": "date" },
          "warehouseNotes": { "type": "string" },
          "serviceNotes": { "type": "string" },
          "items": { "type": "array", "items": { "$ref": "#/components/schemas/LineItem" } }
        },
        "additionalProperties": true
      },
      "FulfillmentOrderCreate": {
        "type": "object",
        "properties": {
          "platform": { "type": "string" },
          "orderType": { "type": "string" },
          "orderNumber": { "type": "string" },
          "externalOrderId": { "type": "string" },
          "shipToCountry": { "type": "string" },
          "addressSummary": { "type": "string" },
          "shippingService": { "type": "string" },
          "shipBy": { "type": "string", "format": "date" },
          "items": { "type": "array", "items": { "$ref": "#/components/schemas/LineItem" } }
        },
        "additionalProperties": true
      },
      "QcInspectionCreate": {
        "type": "object",
        "properties": {
          "inspectionNumber": { "type": "string" },
          "inspectionType": { "type": "string" },
          "reference": { "type": "string" },
          "sku": { "type": "string" },
          "productName": { "type": "string" },
          "sampleSize": { "type": ["number", "string"] },
          "inspectedQuantity": { "type": ["number", "string"] },
          "inspectionCriteria": { "type": "string" },
          "photoEvidenceStatus": { "type": "string", "description": "requested, customer_to_provide, not_required, provided, or similar operational status." },
          "photoEvidenceUrls": {
            "type": "array",
            "description": "HTTPS-only customer evidence links. A string with newline-separated links is also accepted by the portal route.",
            "items": {
              "type": "object",
              "properties": {
                "url": { "type": "string", "format": "uri" },
                "label": { "type": "string" },
                "type": { "type": "string" },
                "notes": { "type": "string" }
              },
              "required": ["url"]
            }
          },
          "evidenceNotes": { "type": "string" },
          "photoRequired": { "type": "boolean", "deprecated": true }
        },
        "additionalProperties": true
      },
      "SourcingRfqCreate": {
        "type": "object",
        "properties": {
          "product": { "type": "string" },
          "productUrl": { "type": "string" },
          "quantity": { "type": "string" },
          "targetUnitPrice": { "type": "string" },
          "destination": { "type": "string" },
          "platform": { "type": "string" },
          "requirements": { "type": "string" },
          "needProcurement": { "type": "boolean" },
          "needDropShipping": { "type": "boolean" }
        },
        "additionalProperties": true
      },
      "SourcingRfqQualification": {
        "type": "object",
        "description": "Customer-safe qualification status for product sourcing, procurement, QC, FBA prep, and drop-shipping RFQs. It omits private customer contacts, supplier outreach commands, payment decisions, and internal notes.",
        "properties": {
          "mode": { "type": "string", "example": "customer_safe_rfq_qualification" },
          "stage": {
            "type": "string",
            "enum": ["needs_customer_input", "human_review", "supplier_rfq_ready", "quote_preparation", "in_progress"]
          },
          "statusLabel": { "type": "string" },
          "missingInputs": { "type": "array", "items": { "type": "string" } },
          "missingInputCount": { "type": "integer" },
          "customerActionRequired": { "type": "boolean" },
          "staffActionRequired": { "type": "boolean" },
          "supplierReady": { "type": "boolean" },
          "quotePrep": { "type": "boolean" },
          "humanReviewRequired": { "type": "boolean" },
          "sourcing": { "type": "boolean" },
          "dropShipping": { "type": "boolean" },
          "qcOrInspection": { "type": "boolean" },
          "fbaPrep": { "type": "boolean" },
          "supplierQuoteCount": { "type": "number" },
          "safeCustomerStatus": { "type": "string" },
          "nextAction": { "type": "string" },
          "customerPortalPath": { "type": "string", "example": "/customer-portal.html#sourcing" },
          "apiPath": { "type": "string", "example": "/api/v1/sourcing-rfqs" }
        },
        "additionalProperties": false
      },
      "SourcingRfq": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "product": { "type": "string" },
          "productUrl": { "type": "string" },
          "quantity": { "type": "string" },
          "destination": { "type": "string" },
          "services": { "type": "array", "items": { "type": "string" } },
          "supplierQuoteCount": { "type": "number" },
          "requiredInputs": { "type": "array", "items": { "type": "string" } },
          "requiredInputCount": { "type": "integer" },
          "nextAction": { "type": "string" },
          "customerVisibleStatus": { "type": "string" },
          "qualification": { "$ref": "#/components/schemas/SourcingRfqQualification" }
        },
        "additionalProperties": true
      },
      "SupportTicketCreate": {
        "type": "object",
        "properties": {
          "subject": { "type": "string" },
          "message": { "type": "string" },
          "issueType": { "type": "string" },
          "relatedReference": { "type": "string" },
          "urgency": { "type": "string" }
        },
        "additionalProperties": true
      },
      "QuoteResponse": {
        "type": "object",
        "properties": {
          "decision": {
            "type": "string",
            "enum": ["accepted", "request_changes", "declined"]
          },
          "message": { "type": "string" }
        },
        "required": ["decision"],
        "additionalProperties": true
      },
      "PaymentEvidence": {
        "type": "object",
        "properties": {
          "amount": { "type": "string" },
          "currency": { "type": "string" },
          "paymentMethod": { "type": "string" },
          "paymentReference": { "type": "string" },
          "proofUrl": { "type": "string" },
          "note": { "type": "string" }
        },
        "additionalProperties": true
      },
      "CsvIntakeRequest": {
        "type": "object",
        "properties": {
          "importType": {
            "type": "string",
            "enum": ["fulfillment_orders", "asns", "qc_inspections", "sourcing_rfqs", "sku_master", "suppliers"]
          },
          "mode": {
            "type": "string",
            "enum": ["preflight", "apply"]
          },
          "apply": { "type": "boolean" },
          "csvText": { "type": "string" },
          "sourceNote": { "type": "string" }
        },
        "required": ["importType", "csvText"],
        "additionalProperties": true
      }
    },
    "examples": {
      "AsnCreate": {
        "value": {
          "asnNumber": "ASN-1001",
          "supplierName": "Supplier One",
          "trackingNumber": "SF123456789",
          "expectedArrival": "2026-07-05",
          "items": [
            { "sku": "BOTTLE-750", "quantity": 240, "cartonCount": 12 }
          ],
          "serviceNotes": "Inbound QC, FNSKU labels, carton marks"
        }
      },
      "FulfillmentOrderCreate": {
        "value": {
          "platform": "shopify",
          "orderType": "drop_shipping",
          "orderNumber": "SHOP-1001",
          "shipToCountry": "United States",
          "addressSummary": "Seattle WA 98101",
          "shippingService": "Standard tracked",
          "items": [
            { "sku": "BOTTLE-750", "quantity": 2, "name": "Insulated bottle" }
          ]
        }
      },
      "QcInspectionCreate": {
        "value": {
          "inspectionNumber": "QC-1001",
          "inspectionType": "pre_shipment",
          "sku": "BOTTLE-750",
          "productName": "Insulated bottle",
          "sampleSize": 80,
          "inspectionCriteria": "Check quantity, logo, barcode, packaging, carton marks",
          "photoEvidenceUrls": [
            { "url": "https://example.com/qc/carton-side.jpg", "label": "Carton side photo", "type": "carton" },
            { "url": "https://example.com/qc/barcode-scan.jpg", "label": "Barcode scan", "type": "barcode" }
          ],
          "evidenceNotes": "Please compare carton marks, retail packaging, and barcode against the approved artwork."
        }
      },
      "SourcingRfqCreate": {
        "value": {
          "product": "Insulated bottle",
          "quantity": "500",
          "targetUnitPrice": "USD 4.50",
          "destination": "United States",
          "platform": "Shopify and Amazon FBA",
          "requirements": "Supplier quotes, samples, QC plan, and fulfillment handoff",
          "needProcurement": true,
          "needDropShipping": true
        }
      },
      "SupportTicketCreate": {
        "value": {
          "subject": "Check carton photos before release",
          "message": "Please review first inbound photos and advise if more evidence is needed.",
          "issueType": "shipment_status",
          "relatedReference": "ASN-1001"
        }
      },
      "QuoteResponse": {
        "value": {
          "decision": "accepted",
          "message": "Accepted for first batch."
        }
      },
      "PaymentEvidence": {
        "value": {
          "amount": "600.00",
          "currency": "USD",
          "paymentMethod": "paypal",
          "paymentReference": "PAYPAL-1001",
          "proofUrl": "https://example.com/payment-proof.pdf",
          "note": "Deposit paid for first batch."
        }
      },
      "CsvIntakeRequest": {
        "value": {
          "importType": "sku_master",
          "mode": "preflight",
          "csvText": "sku,productName,salesChannels,reorderPoint,monthlySalesEstimate\nBOTTLE-750,Insulated bottle,\"Shopify, Amazon FBA\",200,600"
        }
      }
    }
  },
  "x-prepport-webhook-events": [
    "webhook.test",
    "action.created",
    "asn.updated",
    "fulfillment.updated",
    "qc.updated",
    "sourcing.updated",
    "support_ticket.updated",
    "inventory.alert",
    "quote.updated",
    "invoice.updated",
    "shopify.order_imported"
  ],
  "x-prepport-webhook-signature": {
    "header": "X-PrepPort-Signature",
    "format": "t=TIMESTAMP,v1=HEX_HMAC_SHA256",
    "baseString": "TIMESTAMP + '.' + RAW_JSON_BODY",
    "note": "Use the one-time webhook signing secret shown when the endpoint is registered. Retry delivery metadata is visible in the customer portal."
  },
  "x-prepport-boundaries": [
    "API records are account-filtered and scope-gated.",
    "Payment evidence starts staff verification and does not mark invoices paid or release goods automatically.",
    "Webhook payloads exclude API keys, full webhook secrets, encrypted ciphertext, internal notes, payment instructions, customer passwords, and other customer records."
  ]
}
