# Generated by scripts/generate-appmarket-operations-contract.rb; DO NOT EDIT.
{
  "openapi": "3.1.0",
  "info": {
    "title": "AppMarket business operations API",
    "version": "2.0.0",
    "description": "User OAuth back-office API. Requires current application relationship, enabled business capability, scope, stable environment permission, consent and current domain permission. No machine identity or cross-application access."
  },
  "servers": [
    {
      "url": "/open-platform/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": [

      ]
    }
  ],
  "paths": {
    "/appmarket/companies:context": {
      "get": {
        "operationId": "publicGetDeveloperCompanyAvailability",
        "tags": [
          "AppMarket business operations"
        ],
        "summary": "读取当前应用公司能力与当前人员允许操作",
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "responses": {
          "200": {
            "description": "当前可用状态，Cache-Control为no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperCompanyAvailability"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "401": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.company.read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          }
        ]
      }
    },
    "/appmarket/companies": {
      "get": {
        "operationId": "publicListDeveloperCompanies",
        "tags": [
          "AppMarket business operations"
        ],
        "summary": "查询当前产品和环境的接入方公司目录",
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 2048
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CRM Owner的有界实时目录，先校验范围再筛选分页；不代表法律审批或客户付款授权",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppMarketCompanyList"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "401": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.company.read"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result."
      },
      "post": {
        "operationId": "publicCreateDeveloperCompany",
        "tags": [
          "AppMarket business operations"
        ],
        "summary": "创建公司经营资料",
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppMarketCompanyCommand"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "创建目录资料，不创建组织、Membership、商业Party或付款关系",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppMarketCompany"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "401": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.company.manage"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result."
      }
    },
    "/appmarket/companies/{company_id}": {
      "get": {
        "operationId": "publicGetDeveloperCompany",
        "tags": [
          "AppMarket business operations"
        ],
        "summary": "精确回读当前应用的公司资料",
        "responses": {
          "200": {
            "description": "当前资料及版本，CRM逐次核验当前真人权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppMarketCompany"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "401": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.company.read"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "publicUpdateDeveloperCompany",
        "tags": [
          "AppMarket business operations"
        ],
        "summary": "按当前版本更新公司经营资料",
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppMarketCompanyCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "按精确版本更新资料",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppMarketCompany"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "401": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.company.manage"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result."
      }
    },
    "/appmarket/companies/{company_id}/{transition}": {
      "post": {
        "operationId": "publicTransitionDeveloperCompany",
        "tags": [
          "AppMarket business operations"
        ],
        "summary": "按当前版本归档或恢复公司经营资料",
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "transition",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "archive",
                "restore"
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppMarketCompanyTransition"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "归档或恢复并记录审计；重复键返回原结果，当前授权仍须有效",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppMarketCompany"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "401": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.company.manage"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result."
      }
    },
    "/appmarket/companies/{company_id}/commercial-parties": {
      "get": {
        "operationId": "publicListDeveloperCompanyCommercialParties",
        "tags": [
          "AppMarket business operations"
        ],
        "summary": "按名称选择本服务商已有客户商业档案",
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            }
          }
        ],
        "responses": {
          "200": {
            "description": "精确公司版本的非敏感候选，no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppMarketCommercialCandidateList"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "401": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.company.commercial.read"
        ]
      }
    },
    "/appmarket/companies/{company_id}/commercial-link": {
      "get": {
        "operationId": "publicGetDeveloperCompanyCommercialLink",
        "tags": [
          "AppMarket business operations"
        ],
        "summary": "按当前CRM档案回读公司商业引用及允许动作",
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "responses": {
          "200": {
            "description": "当前引用状态及Owner允许动作，no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppMarketCommercialLinkView"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "401": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.company.commercial.read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "post": {
        "operationId": "publicLinkDeveloperCompanyCommercialParty",
        "tags": [
          "AppMarket business operations"
        ],
        "summary": "绑定或替换已有客户商业档案引用",
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppMarketCommercialLinkCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "非敏感历史命令收据，no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppMarketCommercialReceipt"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "401": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.company.commercial.manage"
        ]
      }
    },
    "/appmarket/companies/{company_id}/commercial-link/unlink": {
      "post": {
        "operationId": "publicUnlinkDeveloperCompanyCommercialParty",
        "tags": [
          "AppMarket business operations"
        ],
        "summary": "解除公司商业引用而不改变客户事实",
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppMarketCommercialUnlinkCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "非敏感历史解除收据，no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppMarketCommercialReceipt"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "401": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.company.commercial.manage"
        ]
      }
    },
    "/appmarket/companies/{company_id}/purchases": {
      "get": {
        "summary": "查看当前应用产品和环境内的公司购买",
        "operationId": "publicListDeveloperCompanyPurchases",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "pending_approval",
                "approved",
                "awaiting_payment",
                "paid",
                "fulfilling",
                "fulfilled",
                "cancelled",
                "refund_pending",
                "refunded",
                "payment_unknown"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            }
          }
        ],
        "responses": {
          "200": {
            "description": "当前公司购买页或明确的关联不可用状态；no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppMarketPurchaseList"
                }
              }
            }
          },
          "403": {
            "description": "当前经营能力或独立购买权限不可用"
          },
          "409": {
            "description": "公司购买上下文变化，需要重新查询"
          },
          "503": {
            "description": "授权、依赖或来源记录无法核验，不返回部分数据"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "401": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "x-required-scopes": [
          "operations.purchase.read"
        ],
        "tags": [
          "AppMarket business operations"
        ]
      }
    },
    "/appmarket/sales:context": {
      "get": {
        "operationId": "publicDeveloperReadSalesContext",
        "summary": "ReadSalesContext",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          }
        ],
        "responses": {
          "200": {
            "description": "Current scoped sales projection",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperSalesAvailability"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.lead.read"
        ]
      }
    },
    "/appmarket/leads": {
      "get": {
        "operationId": "publicDeveloperListLeads",
        "summary": "ListLeads",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Current page filter; unknown, empty or repeated parameters are rejected."
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string",
              "maxLength": 2048,
              "minLength": 1
            },
            "description": "Current page filter; unknown, empty or repeated parameters are rejected."
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Current page filter; unknown, empty or repeated parameters are rejected."
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Current page filter; unknown, empty or repeated parameters are rejected."
          }
        ],
        "responses": {
          "200": {
            "description": "Current scoped sales projection",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadPage"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.lead.read"
        ]
      },
      "post": {
        "operationId": "publicDeveloperCreateLead",
        "summary": "CreateLead",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Historical command receipt",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadCreate"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.lead.manage"
        ]
      }
    },
    "/appmarket/leads/{sales_id}": {
      "get": {
        "operationId": "publicDeveloperReadLead",
        "summary": "ReadLead",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "path",
            "name": "sales_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current scoped sales projection",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.lead.read"
        ]
      },
      "patch": {
        "operationId": "publicDeveloperUpdateLead",
        "summary": "UpdateLead",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "path",
            "name": "sales_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical command receipt",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadUpdate"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.lead.manage"
        ]
      }
    },
    "/appmarket/leads/{sales_id}/followups": {
      "get": {
        "operationId": "publicDeveloperListLeadFollowups",
        "summary": "ListLeadFollowups",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "path",
            "name": "sales_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Current page filter; unknown, empty or repeated parameters are rejected."
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string",
              "maxLength": 2048,
              "minLength": 1
            },
            "description": "Current page filter; unknown, empty or repeated parameters are rejected."
          }
        ],
        "responses": {
          "200": {
            "description": "Current scoped sales projection",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FollowupPage"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.lead.read"
        ]
      }
    },
    "/appmarket/leads/{sales_id}/assign": {
      "post": {
        "operationId": "publicDeveloperLeadAssign",
        "summary": "LeadAssign",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "path",
            "name": "sales_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical command receipt",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Assignment"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.lead.manage"
        ]
      }
    },
    "/appmarket/leads/{sales_id}/reopen": {
      "post": {
        "operationId": "publicDeveloperLeadReopen",
        "summary": "LeadReopen",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "path",
            "name": "sales_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical command receipt",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Decision"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.lead.manage"
        ]
      }
    },
    "/appmarket/leads/{sales_id}/duplicate": {
      "post": {
        "operationId": "publicDeveloperLeadDuplicate",
        "summary": "LeadDuplicate",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "path",
            "name": "sales_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical command receipt",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Duplicate"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.lead.manage"
        ]
      }
    },
    "/appmarket/leads/{sales_id}/followup": {
      "post": {
        "operationId": "publicDeveloperLeadFollowup",
        "summary": "LeadFollowup",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "path",
            "name": "sales_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical command receipt",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FollowupReceipt"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FollowupCreate"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.lead.manage"
        ]
      }
    },
    "/appmarket/leads/{sales_id}/qualify": {
      "post": {
        "operationId": "publicDeveloperLeadQualify",
        "summary": "LeadQualify",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "path",
            "name": "sales_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical command receipt",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Decision"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.lead.manage"
        ]
      }
    },
    "/appmarket/leads/{sales_id}/disqualify": {
      "post": {
        "operationId": "publicDeveloperLeadDisqualify",
        "summary": "LeadDisqualify",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "path",
            "name": "sales_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical command receipt",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Decision"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.lead.manage"
        ]
      }
    },
    "/appmarket/leads/{sales_id}/convert": {
      "post": {
        "operationId": "publicDeveloperLeadConvert",
        "summary": "LeadConvert",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "path",
            "name": "sales_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical command receipt",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conversion"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpportunityUpdate"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.lead.manage"
        ]
      }
    },
    "/appmarket/opportunities": {
      "get": {
        "operationId": "publicDeveloperListOpportunities",
        "summary": "ListOpportunities",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Current page filter; unknown, empty or repeated parameters are rejected."
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string",
              "maxLength": 2048,
              "minLength": 1
            },
            "description": "Current page filter; unknown, empty or repeated parameters are rejected."
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Current page filter; unknown, empty or repeated parameters are rejected."
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Current page filter; unknown, empty or repeated parameters are rejected."
          }
        ],
        "responses": {
          "200": {
            "description": "Current scoped sales projection",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpportunityPage"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.read"
        ]
      }
    },
    "/appmarket/opportunities/{sales_id}": {
      "get": {
        "operationId": "publicDeveloperReadOpportunity",
        "summary": "ReadOpportunity",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "path",
            "name": "sales_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current scoped sales projection",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opportunity"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.read"
        ]
      },
      "patch": {
        "operationId": "publicDeveloperUpdateOpportunity",
        "summary": "UpdateOpportunity",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "path",
            "name": "sales_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical command receipt",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opportunity"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpportunityUpdate"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.manage"
        ]
      }
    },
    "/appmarket/opportunities/{sales_id}/assign": {
      "post": {
        "operationId": "publicDeveloperOpportunityAssign",
        "summary": "OpportunityAssign",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "path",
            "name": "sales_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical command receipt",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opportunity"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Assignment"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.manage"
        ]
      }
    },
    "/appmarket/opportunities/{sales_id}/stage": {
      "post": {
        "operationId": "publicDeveloperOpportunityStage",
        "summary": "OpportunityStage",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "path",
            "name": "sales_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical command receipt",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opportunity"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Stage"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.manage"
        ]
      }
    },
    "/appmarket/opportunities/{sales_id}/reopen": {
      "post": {
        "operationId": "publicDeveloperOpportunityReopen",
        "summary": "OpportunityReopen",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "in": "path",
            "name": "sales_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical command receipt",
            "headers": {
              "Cache-Control": {
                "description": "Sensitive sales responses are never cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opportunity"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Decision"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.manage"
        ]
      }
    },
    "/appmarket/sales-report": {
      "get": {
        "operationId": "publicReadDeveloperSalesReport",
        "summary": "ReadSalesReport",
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Original human and gateway authentication required."
          },
          "403": {
            "description": "Current authority denied."
          },
          "422": {
            "description": "Invalid dates, duplicated or unknown query parameters, or cursor binding."
          },
          "503": {
            "description": "Source or authorization dependency cannot be verified; never substitute zero."
          },
          "200": {
            "description": "Current scoped projection; authority is resolved again after reading.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Never cached."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesReport"
                }
              }
            }
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.sales.report.read"
        ]
      }
    },
    "/appmarket/sales-audits": {
      "get": {
        "operationId": "publicReadDeveloperSalesAudits",
        "summary": "ReadSalesAudits",
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            }
          },
          {
            "name": "target_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "appmarket_lead",
                "appmarket_opportunity",
                "appmarket_lead_followup"
              ]
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Original human and gateway authentication required."
          },
          "403": {
            "description": "Current authority denied."
          },
          "422": {
            "description": "Invalid dates, duplicated or unknown query parameters, or cursor binding."
          },
          "503": {
            "description": "Source or authorization dependency cannot be verified; never substitute zero."
          },
          "200": {
            "description": "Current scoped projection; authority is resolved again after reading.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Never cached."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesAuditPage"
                }
              }
            }
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.sales.audit.read"
        ]
      }
    },
    "/appmarket/webhook-deliveries": {
      "get": {
        "tags": [
          "AppMarket business operations"
        ],
        "operationId": "publicListDeveloperApplicationWebhookDeliveries",
        "summary": "查询当前应用的 Webhook 投递摘要",
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "in_flight",
                "delivered",
                "failed",
                "dead_letter"
              ]
            }
          },
          {
            "name": "event_type",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "事件类型、事件ID及投递ID的字面子串，不搜索正文。",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "精确应用与环境的投递摘要",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperApplicationDeliveries"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "401": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.event.read"
        ]
      }
    },
    "/appmarket/companies/{company_id}/users": {
      "get": {
        "operationId": "publicReadDeveloperCompanyProductUsers",
        "summary": "查询客户已授权的产品使用者与购买分配",
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          },
          {
            "name": "assigned_only",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Product members and current purchased Access state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperCompanyProductTeam"
                }
              }
            }
          },
          "403": {
            "description": "Current application, company or customer personnel authority denied"
          },
          "409": {
            "description": "Customer link or product source changed"
          },
          "503": {
            "description": "Owner unavailable; clear stale data and retry"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "401": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.user.read"
        ],
        "tags": [
          "AppMarket business operations"
        ]
      }
    },
    "/appmarket/companies/{company_id}/users/{membership_id}/assignment": {
      "put": {
        "operationId": "publicAssignDeveloperCompanyProductUser",
        "summary": "在客户授权与已购买容量内分配产品使用者",
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "membership_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "subscription_id",
                  "assigned",
                  "expected_version"
                ],
                "properties": {
                  "subscription_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "assigned": {
                    "type": "boolean"
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "license_kind": {
                    "type": "string",
                    "enum": [
                      "builder",
                      "ordinary_user"
                    ],
                    "description": "分类容量必须明确类别（含撤销）；旧总容量禁止提供。Access 核验目标容量与原子迁类。"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current Access assignment snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperCompanyProductAssignment"
                }
              }
            }
          },
          "403": {
            "description": "Current customer or operator authority denied"
          },
          "409": {
            "description": "Source, capacity or version changed; read again before confirming"
          },
          "503": {
            "description": "Unknown result; retain original request"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "401": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.user.assign"
        ],
        "tags": [
          "AppMarket business operations"
        ]
      }
    },
    "/appmarket/subscription-usage:context": {
      "get": {
        "operationId": "publicGetDeveloperUsageAvailability",
        "summary": "Read current subscription usage capability and human actions",
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          }
        ],
        "responses": {
          "200": {
            "description": "Current availability",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperUsageAvailability"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "401": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.usage.read"
        ],
        "tags": [
          "AppMarket business operations"
        ],
        "description": "Current application usage capability and human authority are required. Responses are no-store."
      }
    },
    "/appmarket/subscription-usage": {
      "get": {
        "operationId": "publicReadDeveloperSubscriptionUsage",
        "summary": "Read actual subscription usage and full-window statistics",
        "description": "Requires active customer operations and current seller usage authority. Events are product-reported evidence; quantities remain separate by metric/unit and do not represent charges, balances or verified customer identities. from is included and to excluded; maximum window is 366 days. Historical events remain readable after subscription lifecycle changes.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "subscription_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "customer_organization_id",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "metric",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "succeeded",
                "failed",
                "cancelled"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Seller-scoped immutable events and one-snapshot statistics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionUsageList"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "401": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.usage.read"
        ],
        "tags": [
          "AppMarket business operations"
        ]
      },
      "post": {
        "operationId": "publicRecordDeveloperSubscriptionUsage",
        "summary": "Report actual usage of an accepted subscription",
        "description": "Event ID is the original idempotency key; preserve the exact event ID and body after unknown results. Seller/app/product/environment and commercial period evidence are resolved by the service. First acceptance requires an eligible current subscription period, including occurred_at. Identical replay can recover a historical event after renewal/cancellation; changed contents conflict. Late events outside the current period require a future explicit historical-correction contract and are rejected, never silently charged.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionUsageInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Immutable event or original replay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionUsageEvent"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "503": {
            "$ref": "#/components/responses/Problem"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "401": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.usage.record"
        ],
        "tags": [
          "AppMarket business operations"
        ]
      }
    },
    "/appmarket/tasks": {
      "get": {
        "operationId": "publicDeveloperListTasks",
        "summary": "ListTasks",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 0,
              "maxLength": 2048
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 0,
              "maxLength": 200
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "working",
                "review_pending",
                "closed",
                "cancelled"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped task or immutable command receipt",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Task data is never cached."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or request key"
          },
          "401": {
            "description": "Original identity or gateway required"
          },
          "403": {
            "description": "Current sales duty denied"
          },
          "404": {
            "description": "Source or task not in this scope"
          },
          "409": {
            "description": "State, source version, task CAS or replay conflict"
          },
          "422": {
            "description": "Invalid fields or filters"
          },
          "503": {
            "description": "Authority or atomic storage unavailable"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.read"
        ]
      },
      "post": {
        "operationId": "publicDeveloperCreateTask",
        "summary": "CreateTask",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Scoped task or immutable command receipt",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Task data is never cached."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or request key"
          },
          "401": {
            "description": "Original identity or gateway required"
          },
          "403": {
            "description": "Current sales duty denied"
          },
          "404": {
            "description": "Source or task not in this scope"
          },
          "409": {
            "description": "State, source version, task CAS or replay conflict"
          },
          "422": {
            "description": "Invalid fields or filters"
          },
          "503": {
            "description": "Authority or atomic storage unavailable"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskCreate"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.manage"
        ]
      }
    },
    "/appmarket/tasks/{sales_id}": {
      "get": {
        "operationId": "publicDeveloperGetTask",
        "summary": "GetTask",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped task or immutable command receipt",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Task data is never cached."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or request key"
          },
          "401": {
            "description": "Original identity or gateway required"
          },
          "403": {
            "description": "Current sales duty denied"
          },
          "404": {
            "description": "Source or task not in this scope"
          },
          "409": {
            "description": "State, source version, task CAS or replay conflict"
          },
          "422": {
            "description": "Invalid fields or filters"
          },
          "503": {
            "description": "Authority or atomic storage unavailable"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.read"
        ]
      },
      "patch": {
        "operationId": "publicDeveloperUpdateTask",
        "summary": "UpdateTask",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped task or immutable command receipt",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Task data is never cached."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or request key"
          },
          "401": {
            "description": "Original identity or gateway required"
          },
          "403": {
            "description": "Current sales duty denied"
          },
          "404": {
            "description": "Source or task not in this scope"
          },
          "409": {
            "description": "State, source version, task CAS or replay conflict"
          },
          "422": {
            "description": "Invalid fields or filters"
          },
          "503": {
            "description": "Authority or atomic storage unavailable"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskUpdate"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.manage"
        ]
      }
    },
    "/appmarket/tasks/{sales_id}/history": {
      "get": {
        "operationId": "publicDeveloperReadTaskHistory",
        "summary": "ReadTaskHistory",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 0,
              "maxLength": 2048
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped task or immutable command receipt",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Task data is never cached."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskHistory"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or request key"
          },
          "401": {
            "description": "Original identity or gateway required"
          },
          "403": {
            "description": "Current sales duty denied"
          },
          "404": {
            "description": "Source or task not in this scope"
          },
          "409": {
            "description": "State, source version, task CAS or replay conflict"
          },
          "422": {
            "description": "Invalid fields or filters"
          },
          "503": {
            "description": "Authority or atomic storage unavailable"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.read"
        ]
      }
    },
    "/appmarket/tasks/{sales_id}/assign": {
      "post": {
        "operationId": "publicDeveloperAssignTask",
        "summary": "AssignTask",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped task or immutable command receipt",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Task data is never cached."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or request key"
          },
          "401": {
            "description": "Original identity or gateway required"
          },
          "403": {
            "description": "Current sales duty denied"
          },
          "404": {
            "description": "Source or task not in this scope"
          },
          "409": {
            "description": "State, source version, task CAS or replay conflict"
          },
          "422": {
            "description": "Invalid fields or filters"
          },
          "503": {
            "description": "Authority or atomic storage unavailable"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskAssignment"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.manage"
        ]
      }
    },
    "/appmarket/tasks/{sales_id}/start": {
      "post": {
        "operationId": "publicDeveloperStartTask",
        "summary": "StartTask",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped task or immutable command receipt",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Task data is never cached."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or request key"
          },
          "401": {
            "description": "Original identity or gateway required"
          },
          "403": {
            "description": "Current sales duty denied"
          },
          "404": {
            "description": "Source or task not in this scope"
          },
          "409": {
            "description": "State, source version, task CAS or replay conflict"
          },
          "422": {
            "description": "Invalid fields or filters"
          },
          "503": {
            "description": "Authority or atomic storage unavailable"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskDecision"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.manage"
        ]
      }
    },
    "/appmarket/tasks/{sales_id}/submit": {
      "post": {
        "operationId": "publicDeveloperSubmitTask",
        "summary": "SubmitTask",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped task or immutable command receipt",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Task data is never cached."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or request key"
          },
          "401": {
            "description": "Original identity or gateway required"
          },
          "403": {
            "description": "Current sales duty denied"
          },
          "404": {
            "description": "Source or task not in this scope"
          },
          "409": {
            "description": "State, source version, task CAS or replay conflict"
          },
          "422": {
            "description": "Invalid fields or filters"
          },
          "503": {
            "description": "Authority or atomic storage unavailable"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskSubmission"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.manage"
        ]
      }
    },
    "/appmarket/tasks/{sales_id}/review": {
      "post": {
        "operationId": "publicDeveloperReviewTask",
        "summary": "ReviewTask",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped task or immutable command receipt",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Task data is never cached."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or request key"
          },
          "401": {
            "description": "Original identity or gateway required"
          },
          "403": {
            "description": "Current sales duty denied"
          },
          "404": {
            "description": "Source or task not in this scope"
          },
          "409": {
            "description": "State, source version, task CAS or replay conflict"
          },
          "422": {
            "description": "Invalid fields or filters"
          },
          "503": {
            "description": "Authority or atomic storage unavailable"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskDecision"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.manage"
        ]
      }
    },
    "/appmarket/tasks/{sales_id}/return": {
      "post": {
        "operationId": "publicDeveloperReturnTask",
        "summary": "ReturnTask",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped task or immutable command receipt",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Task data is never cached."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or request key"
          },
          "401": {
            "description": "Original identity or gateway required"
          },
          "403": {
            "description": "Current sales duty denied"
          },
          "404": {
            "description": "Source or task not in this scope"
          },
          "409": {
            "description": "State, source version, task CAS or replay conflict"
          },
          "422": {
            "description": "Invalid fields or filters"
          },
          "503": {
            "description": "Authority or atomic storage unavailable"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskDecision"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.manage"
        ]
      }
    },
    "/appmarket/tasks/{sales_id}/cancel": {
      "post": {
        "operationId": "publicDeveloperCancelTask",
        "summary": "CancelTask",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped task or immutable command receipt",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Task data is never cached."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or request key"
          },
          "401": {
            "description": "Original identity or gateway required"
          },
          "403": {
            "description": "Current sales duty denied"
          },
          "404": {
            "description": "Source or task not in this scope"
          },
          "409": {
            "description": "State, source version, task CAS or replay conflict"
          },
          "422": {
            "description": "Invalid fields or filters"
          },
          "503": {
            "description": "Authority or atomic storage unavailable"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskDecision"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.manage"
        ]
      }
    },
    "/appmarket/tasks/{sales_id}/reopen": {
      "post": {
        "operationId": "publicDeveloperReopenTask",
        "summary": "ReopenTask",
        "tags": [
          "AppMarket business operations"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped task or immutable command receipt",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "Task data is never cached."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or request key"
          },
          "401": {
            "description": "Original identity or gateway required"
          },
          "403": {
            "description": "Current sales duty denied"
          },
          "404": {
            "description": "Source or task not in this scope"
          },
          "409": {
            "description": "State, source version, task CAS or replay conflict"
          },
          "422": {
            "description": "Invalid fields or filters"
          },
          "503": {
            "description": "Authority or atomic storage unavailable"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskDecision"
              }
            }
          }
        },
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "x-required-scopes": [
          "operations.opportunity.manage"
        ]
      }
    },
    "/appmarket/quotes:context": {
      "get": {
        "operationId": "publicDeveloperReadQuoteContext",
        "summary": "readQuoteContext",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          }
        ],
        "responses": {
          "200": {
            "description": "Owner quotation projection; no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperQuoteAvailability"
                }
              }
            }
          },
          "401": {
            "description": "Original person or gateway identity missing"
          },
          "403": {
            "description": "Current sales and commercial duty or customer payer relationship denied"
          },
          "404": {
            "description": "Quotation outside the selected scope"
          },
          "409": {
            "description": "Version, state or original request conflict"
          },
          "422": {
            "description": "Explicit fields or fixed-price terms invalid"
          },
          "503": {
            "description": "Current relationship, commercial source or atomic storage unavailable"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "x-required-scopes": [
          "operations.opportunity.read"
        ],
        "tags": [
          "AppMarket business operations"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result."
      }
    },
    "/appmarket/quotes": {
      "get": {
        "operationId": "publicDeveloperListQuotes",
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result.",
        "summary": "listQuotes",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 2048
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "review_pending",
                "approved",
                "sent",
                "accepted",
                "declined",
                "withdrawn",
                "expired"
              ]
            }
          },
          {
            "name": "opportunity_id",
            "in": "query",
            "description": "Exact opportunity; filter before pagination and preserve this filter with the original cursor.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owner quotation projection; no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuotePage"
                }
              }
            }
          },
          "401": {
            "description": "Original person or gateway identity missing"
          },
          "403": {
            "description": "Current sales and commercial duty or customer payer relationship denied"
          },
          "404": {
            "description": "Quotation outside the selected scope"
          },
          "409": {
            "description": "Version, state or original request conflict"
          },
          "422": {
            "description": "Explicit fields or fixed-price terms invalid"
          },
          "503": {
            "description": "Current relationship, commercial source or atomic storage unavailable"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "x-required-scopes": [
          "operations.opportunity.read"
        ],
        "tags": [
          "AppMarket business operations"
        ]
      },
      "post": {
        "operationId": "publicDeveloperCreateQuote",
        "summary": "createQuote",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Owner quotation projection; no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "401": {
            "description": "Original person or gateway identity missing"
          },
          "403": {
            "description": "Current sales and commercial duty or customer payer relationship denied"
          },
          "404": {
            "description": "Quotation outside the selected scope"
          },
          "409": {
            "description": "Version, state or original request conflict"
          },
          "422": {
            "description": "Explicit fields or fixed-price terms invalid"
          },
          "503": {
            "description": "Current relationship, commercial source or atomic storage unavailable"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteDraftRequest"
              }
            }
          }
        },
        "x-required-scopes": [
          "operations.opportunity.manage"
        ],
        "tags": [
          "AppMarket business operations"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result."
      }
    },
    "/appmarket/quotes/{sales_id}": {
      "get": {
        "operationId": "publicDeveloperReadQuote",
        "summary": "readQuote",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owner quotation projection; no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "401": {
            "description": "Original person or gateway identity missing"
          },
          "403": {
            "description": "Current sales and commercial duty or customer payer relationship denied"
          },
          "404": {
            "description": "Quotation outside the selected scope"
          },
          "409": {
            "description": "Version, state or original request conflict"
          },
          "422": {
            "description": "Explicit fields or fixed-price terms invalid"
          },
          "503": {
            "description": "Current relationship, commercial source or atomic storage unavailable"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "x-required-scopes": [
          "operations.opportunity.read"
        ],
        "tags": [
          "AppMarket business operations"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result."
      },
      "patch": {
        "operationId": "publicDeveloperUpdateQuote",
        "summary": "updateQuote",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owner quotation projection; no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "401": {
            "description": "Original person or gateway identity missing"
          },
          "403": {
            "description": "Current sales and commercial duty or customer payer relationship denied"
          },
          "404": {
            "description": "Quotation outside the selected scope"
          },
          "409": {
            "description": "Version, state or original request conflict"
          },
          "422": {
            "description": "Explicit fields or fixed-price terms invalid"
          },
          "503": {
            "description": "Current relationship, commercial source or atomic storage unavailable"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteDraftRequest"
              }
            }
          }
        },
        "x-required-scopes": [
          "operations.opportunity.manage"
        ],
        "tags": [
          "AppMarket business operations"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result."
      }
    },
    "/appmarket/quotes/{sales_id}/history": {
      "get": {
        "operationId": "publicDeveloperReadQuoteHistory",
        "summary": "readQuoteHistory",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 2048
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owner quotation projection; no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteHistory"
                }
              }
            }
          },
          "401": {
            "description": "Original person or gateway identity missing"
          },
          "403": {
            "description": "Current sales and commercial duty or customer payer relationship denied"
          },
          "404": {
            "description": "Quotation outside the selected scope"
          },
          "409": {
            "description": "Version, state or original request conflict"
          },
          "422": {
            "description": "Explicit fields or fixed-price terms invalid"
          },
          "503": {
            "description": "Current relationship, commercial source or atomic storage unavailable"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "x-required-scopes": [
          "operations.opportunity.read"
        ],
        "tags": [
          "AppMarket business operations"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result."
      }
    },
    "/appmarket/quotes/{sales_id}/submit": {
      "post": {
        "operationId": "publicDeveloperSubmitQuote",
        "summary": "submitQuote",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owner quotation projection; no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "401": {
            "description": "Original person or gateway identity missing"
          },
          "403": {
            "description": "Current sales and commercial duty or customer payer relationship denied"
          },
          "404": {
            "description": "Quotation outside the selected scope"
          },
          "409": {
            "description": "Version, state or original request conflict"
          },
          "422": {
            "description": "Explicit fields or fixed-price terms invalid"
          },
          "503": {
            "description": "Current relationship, commercial source or atomic storage unavailable"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteCommand"
              }
            }
          }
        },
        "x-required-scopes": [
          "operations.opportunity.manage"
        ],
        "tags": [
          "AppMarket business operations"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result."
      }
    },
    "/appmarket/quotes/{sales_id}/approve": {
      "post": {
        "operationId": "publicDeveloperApproveQuote",
        "summary": "approveQuote",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owner quotation projection; no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "401": {
            "description": "Original person or gateway identity missing"
          },
          "403": {
            "description": "Current sales and commercial duty or customer payer relationship denied"
          },
          "404": {
            "description": "Quotation outside the selected scope"
          },
          "409": {
            "description": "Version, state or original request conflict"
          },
          "422": {
            "description": "Explicit fields or fixed-price terms invalid"
          },
          "503": {
            "description": "Current relationship, commercial source or atomic storage unavailable"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteApproval"
              }
            }
          }
        },
        "x-required-scopes": [
          "operations.opportunity.manage"
        ],
        "tags": [
          "AppMarket business operations"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result."
      }
    },
    "/appmarket/quotes/{sales_id}/return": {
      "post": {
        "operationId": "publicDeveloperReturnQuote",
        "summary": "returnQuote",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owner quotation projection; no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "401": {
            "description": "Original person or gateway identity missing"
          },
          "403": {
            "description": "Current sales and commercial duty or customer payer relationship denied"
          },
          "404": {
            "description": "Quotation outside the selected scope"
          },
          "409": {
            "description": "Version, state or original request conflict"
          },
          "422": {
            "description": "Explicit fields or fixed-price terms invalid"
          },
          "503": {
            "description": "Current relationship, commercial source or atomic storage unavailable"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteCommand"
              }
            }
          }
        },
        "x-required-scopes": [
          "operations.opportunity.manage"
        ],
        "tags": [
          "AppMarket business operations"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result."
      }
    },
    "/appmarket/quotes/{sales_id}/send": {
      "post": {
        "operationId": "publicDeveloperSendQuote",
        "summary": "sendQuote",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owner quotation projection; no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "401": {
            "description": "Original person or gateway identity missing"
          },
          "403": {
            "description": "Current sales and commercial duty or customer payer relationship denied"
          },
          "404": {
            "description": "Quotation outside the selected scope"
          },
          "409": {
            "description": "Version, state or original request conflict"
          },
          "422": {
            "description": "Explicit fields or fixed-price terms invalid"
          },
          "503": {
            "description": "Current relationship, commercial source or atomic storage unavailable"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteCommand"
              }
            }
          }
        },
        "x-required-scopes": [
          "operations.opportunity.manage"
        ],
        "tags": [
          "AppMarket business operations"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result."
      }
    },
    "/appmarket/quotes/{sales_id}/withdraw": {
      "post": {
        "operationId": "publicDeveloperWithdrawQuote",
        "summary": "withdrawQuote",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owner quotation projection; no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "401": {
            "description": "Original person or gateway identity missing"
          },
          "403": {
            "description": "Current sales and commercial duty or customer payer relationship denied"
          },
          "404": {
            "description": "Quotation outside the selected scope"
          },
          "409": {
            "description": "Version, state or original request conflict"
          },
          "422": {
            "description": "Explicit fields or fixed-price terms invalid"
          },
          "503": {
            "description": "Current relationship, commercial source or atomic storage unavailable"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteCommand"
              }
            }
          }
        },
        "x-required-scopes": [
          "operations.opportunity.manage"
        ],
        "tags": [
          "AppMarket business operations"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result."
      }
    },
    "/appmarket/quotes/{sales_id}/revise": {
      "post": {
        "operationId": "publicDeveloperReviseQuote",
        "summary": "reviseQuote",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owner quotation projection; no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "401": {
            "description": "Original person or gateway identity missing"
          },
          "403": {
            "description": "Current sales and commercial duty or customer payer relationship denied"
          },
          "404": {
            "description": "Quotation outside the selected scope"
          },
          "409": {
            "description": "Version, state or original request conflict"
          },
          "422": {
            "description": "Explicit fields or fixed-price terms invalid"
          },
          "503": {
            "description": "Current relationship, commercial source or atomic storage unavailable"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteCommand"
              }
            }
          }
        },
        "x-required-scopes": [
          "operations.opportunity.manage"
        ],
        "tags": [
          "AppMarket business operations"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result."
      }
    },
    "/appmarket/quotes/{sales_id}/expire": {
      "post": {
        "operationId": "publicDeveloperExpireQuote",
        "summary": "expireQuote",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "sales_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owner quotation projection; no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "401": {
            "description": "Original person or gateway identity missing"
          },
          "403": {
            "description": "Current sales and commercial duty or customer payer relationship denied"
          },
          "404": {
            "description": "Quotation outside the selected scope"
          },
          "409": {
            "description": "Version, state or original request conflict"
          },
          "422": {
            "description": "Explicit fields or fixed-price terms invalid"
          },
          "503": {
            "description": "Current relationship, commercial source or atomic storage unavailable"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteCommand"
              }
            }
          }
        },
        "x-required-scopes": [
          "operations.opportunity.manage"
        ],
        "tags": [
          "AppMarket business operations"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result."
      }
    },
    "/appmarket/quotes:options": {
      "get": {
        "operationId": "publicDeveloperReadQuoteOptions",
        "summary": "Select current customer fixed-price plans",
        "security": [
          {
            "bearerAuth": [

            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Organization"
          },
          {
            "$ref": "#/components/parameters/Application"
          },
          {
            "$ref": "#/components/parameters/Environment"
          },
          {
            "$ref": "#/components/parameters/APIProduct"
          },
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Product"
          },
          {
            "name": "company_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "opportunity_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "opportunity_version",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owner quotation projection; no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteOptions"
                }
              }
            }
          },
          "401": {
            "description": "Original person or gateway identity missing"
          },
          "403": {
            "description": "Current sales and commercial duty or customer payer relationship denied"
          },
          "404": {
            "description": "Quotation outside the selected scope"
          },
          "409": {
            "description": "Version, state or original request conflict"
          },
          "422": {
            "description": "Explicit fields or fixed-price terms invalid"
          },
          "503": {
            "description": "Current relationship, commercial source or atomic storage unavailable"
          },
          "400": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          },
          "429": {
            "description": "Current authorization, input, quota or dependency failure; no-store"
          }
        },
        "x-required-scopes": [
          "operations.opportunity.read"
        ],
        "tags": [
          "AppMarket business operations"
        ],
        "description": "Current application business scope and user authority are required. Responses are no-store. Writes require the original Idempotency-Key and current resource version; preserve both after an unknown result."
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "parameters": {
      "Organization": {
        "name": "X-GV-Organization-ID",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1
        }
      },
      "Application": {
        "name": "X-GV-Application-ID",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1
        }
      },
      "Environment": {
        "name": "X-GV-Environment",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1,
          "enum": [
            "sandbox",
            "production"
          ]
        }
      },
      "APIProduct": {
        "name": "X-GV-API-Product-ID",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1
        }
      },
      "Grant": {
        "name": "X-GV-Delegated-Grant-ID",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1
        }
      },
      "Product": {
        "name": "X-GV-Product-Code",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "schemas": {
      "DeveloperCompanyAvailability": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "environment",
          "product_code",
          "enabled",
          "reason_code",
          "allowed_actions"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "product_code": {
            "type": "string",
            "maxLength": 80
          },
          "enabled": {
            "type": "boolean"
          },
          "reason_code": {
            "type": "string",
            "enum": [
              "CAPABILITY_NOT_ACTIVE",
              "COMPANY_PERMISSION_REQUIRED",
              "COMPANY_AVAILABLE"
            ]
          },
          "allowed_actions": {
            "type": "array",
            "uniqueItems": true,
            "maxItems": 6,
            "items": {
              "type": "string",
              "enum": [
                "company.read",
                "company.create",
                "company.update",
                "company.archive",
                "company.restore",
                "purchase.read"
              ]
            }
          }
        }
      },
      "Problem": {
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "code": {
            "type": "string",
            "description": "稳定错误码；动作级认证不足时为 recent_authentication_required"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "reauthenticate": {
            "type": "boolean",
            "description": "仅 recent_authentication_required 时为 true；客户端应提供重新验证入口，不得自动循环跳转"
          },
          "verification_stage": {
            "type": "string",
            "description": "内置兼容验证拒绝时的固定阶段，不含资源地址、应用正文或原始浏览器诊断；缺失时不得推测失败阶段。",
            "enum": [
              "manifest_read",
              "asset_read",
              "asset_integrity",
              "browser_start",
              "browser_sandbox",
              "mount",
              "update",
              "dispose",
              "browser_timeout",
              "browser_protocol"
            ]
          }
        }
      },
      "AppMarketCompanyList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "items",
          "next_cursor"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/AppMarketCompany"
            }
          },
          "next_cursor": {
            "type": "string",
            "maxLength": 2048
          }
        }
      },
      "AppMarketCompany": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "display_name",
          "legal_name",
          "country_code",
          "status",
          "version",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "legal_name": {
            "type": "string",
            "maxLength": 300
          },
          "country_code": {
            "type": "string",
            "pattern": "^(?:[A-Z]{2})?$"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AppMarketCompanyCommand": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "display_name",
          "legal_name",
          "country_code",
          "resource_version",
          "reason"
        ],
        "properties": {
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "legal_name": {
            "type": "string",
            "maxLength": 300
          },
          "country_code": {
            "type": "string",
            "pattern": "^(?:[A-Z]{2})?$"
          },
          "resource_version": {
            "type": "integer",
            "minimum": 0
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        }
      },
      "AppMarketCompanyTransition": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resource_version",
          "reason"
        ],
        "properties": {
          "resource_version": {
            "type": "integer",
            "minimum": 1
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        }
      },
      "AppMarketCommercialCandidateList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "company_id",
          "company_version",
          "items",
          "next_cursor"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "company_id": {
            "type": "string",
            "format": "uuid"
          },
          "company_version": {
            "type": "integer",
            "minimum": 1
          },
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/AppMarketCommercialCandidate"
            }
          },
          "next_cursor": {
            "type": "string",
            "maxLength": 2048
          }
        }
      },
      "AppMarketCommercialCandidate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "party_id",
          "party_version",
          "display_name",
          "customer_organization_id"
        ],
        "properties": {
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "party_version": {
            "type": "integer",
            "minimum": 1
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "customer_organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        }
      },
      "AppMarketCommercialLinkView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "company_id",
          "company_version",
          "resource_version",
          "status",
          "party_id",
          "party_version",
          "party_display_name",
          "customer_organization_id",
          "allowed_actions"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "company_id": {
            "type": "string",
            "format": "uuid"
          },
          "company_version": {
            "type": "integer",
            "minimum": 1
          },
          "resource_version": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "enum": [
              "unlinked",
              "linked",
              "party_inactive",
              "company_archived"
            ]
          },
          "party_id": {
            "type": "string",
            "maxLength": 36,
            "description": "Empty for unlinked; exact CRM UUID otherwise"
          },
          "party_version": {
            "type": "integer",
            "minimum": 0
          },
          "party_display_name": {
            "type": "string",
            "maxLength": 200
          },
          "customer_organization_id": {
            "type": "string",
            "maxLength": 200,
            "description": "Empty unless both company and referenced Party are currently eligible in CRM; not an Access status proof"
          },
          "allowed_actions": {
            "type": "array",
            "maxItems": 3,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "commercial.read",
                "commercial.link",
                "commercial.unlink"
              ]
            }
          }
        }
      },
      "AppMarketCommercialLinkCommand": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "party_id",
          "party_version",
          "company_version",
          "resource_version",
          "reason"
        ],
        "properties": {
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "party_version": {
            "type": "integer",
            "minimum": 1
          },
          "company_version": {
            "type": "integer",
            "minimum": 1
          },
          "resource_version": {
            "type": "integer",
            "minimum": 0
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        }
      },
      "AppMarketCommercialReceipt": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "company_id",
          "resource_version",
          "command"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "company_id": {
            "type": "string",
            "format": "uuid"
          },
          "resource_version": {
            "type": "integer",
            "minimum": 1
          },
          "command": {
            "type": "string",
            "enum": [
              "commercial.link",
              "commercial.unlink"
            ]
          }
        }
      },
      "AppMarketCommercialUnlinkCommand": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "company_version",
          "resource_version",
          "reason"
        ],
        "properties": {
          "company_version": {
            "type": "integer",
            "minimum": 1
          },
          "resource_version": {
            "type": "integer",
            "minimum": 1
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        }
      },
      "AppMarketPurchaseList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "company_id",
          "company_version",
          "link_version",
          "party_version",
          "status",
          "items",
          "next_cursor"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "company_id": {
            "type": "string",
            "format": "uuid"
          },
          "company_version": {
            "type": "integer",
            "minimum": 1
          },
          "link_version": {
            "type": "integer",
            "minimum": 0
          },
          "party_version": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "enum": [
              "ready",
              "unlinked",
              "party_inactive",
              "company_archived"
            ]
          },
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/AppMarketPurchaseItem"
            }
          },
          "next_cursor": {
            "type": "string",
            "maxLength": 2048
          }
        }
      },
      "AppMarketPurchaseItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "order_id",
          "order_no",
          "order_version",
          "order_status",
          "order_kind",
          "plan_code",
          "plan_version",
          "accepted_at",
          "created_at",
          "updated_at",
          "subscription_id",
          "subscription_version",
          "subscription_status",
          "current_plan_code",
          "current_plan_version",
          "current_period_start",
          "current_period_end"
        ],
        "properties": {
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "order_no": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "order_version": {
            "type": "integer",
            "minimum": 1
          },
          "order_status": {
            "type": "string",
            "enum": [
              "draft",
              "pending_approval",
              "approved",
              "awaiting_payment",
              "paid",
              "fulfilling",
              "fulfilled",
              "cancelled",
              "refund_pending",
              "refunded",
              "payment_unknown"
            ]
          },
          "order_kind": {
            "type": "string",
            "enum": [
              "one_time",
              "subscription"
            ]
          },
          "plan_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "plan_version": {
            "type": "integer",
            "minimum": 1
          },
          "accepted_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "subscription_id": {
            "type": "string",
            "maxLength": 36,
            "description": "Empty for one_time; exact UUID for subscription"
          },
          "subscription_version": {
            "type": "integer",
            "minimum": 0
          },
          "subscription_status": {
            "type": "string",
            "enum": [
              "",
              "draft",
              "trialing",
              "trial_ending",
              "pending_payment",
              "payment_failed",
              "active",
              "renewal_pending",
              "plan_change_pending",
              "pause_pending",
              "paused",
              "cancellation_pending",
              "cancelled",
              "past_due",
              "grace_period",
              "suspended",
              "expired",
              "terminated"
            ]
          },
          "current_plan_code": {
            "type": "string",
            "maxLength": 120,
            "description": "Empty for one_time; current subscription plan may differ from original order"
          },
          "current_plan_version": {
            "type": "integer",
            "minimum": 0
          },
          "current_period_start": {
            "type": "string",
            "maxLength": 40,
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$",
            "description": "Empty for one_time; RFC3339 otherwise"
          },
          "current_period_end": {
            "type": "string",
            "maxLength": 40,
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$",
            "description": "Empty for one_time; RFC3339 otherwise"
          }
        }
      },
      "DeveloperSalesAvailability": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "environment",
          "product_code",
          "enabled",
          "reason_code",
          "allowed_actions"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "product_code": {
            "type": "string",
            "maxLength": 80
          },
          "enabled": {
            "type": "boolean"
          },
          "reason_code": {
            "type": "string",
            "enum": [
              "CAPABILITY_NOT_ACTIVE",
              "SALES_PERMISSION_REQUIRED",
              "SALES_AVAILABLE"
            ]
          },
          "allowed_actions": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "lead.read",
                "lead.create",
                "lead.update",
                "lead.assign",
                "lead.followup",
                "lead.qualify",
                "lead.disqualify",
                "lead.reopen",
                "lead.duplicate",
                "lead.convert",
                "opportunity.read",
                "opportunity.update",
                "opportunity.assign",
                "opportunity.stage",
                "opportunity.reopen"
              ]
            },
            "maxItems": 15
          }
        }
      },
      "LeadPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "items",
          "next_cursor"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "application_id": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "product_code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$",
            "maxLength": 80
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Lead"
            }
          },
          "next_cursor": {
            "type": "string",
            "maxLength": 2048
          }
        }
      },
      "Lead": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "id",
          "version",
          "created_at",
          "updated_at",
          "source_system",
          "source_object_ref",
          "collection_basis",
          "collection_basis_ref",
          "contact_ref",
          "company_name",
          "owner_ref",
          "status",
          "qualification_reason",
          "duplicate_of_id",
          "opportunity_id"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "application_id": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "product_code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$",
            "maxLength": 80
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "source_system": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "source_object_ref": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "collection_basis": {
            "type": "string",
            "enum": [
              "consent",
              "business_relationship",
              "public_business",
              "referral"
            ]
          },
          "collection_basis_ref": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "contact_ref": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "company_name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "owner_ref": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "qualified",
              "disqualified",
              "converted"
            ]
          },
          "qualification_reason": {
            "type": "string",
            "maxLength": 500
          },
          "duplicate_of_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
            "description": "The zero UUID means no reference; nonzero references are scoped by the Owner."
          },
          "opportunity_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
            "description": "The zero UUID means no reference; nonzero references are scoped by the Owner."
          }
        }
      },
      "LeadCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "source_system",
          "source_object_ref",
          "collection_basis",
          "collection_basis_ref",
          "contact_ref",
          "company_name",
          "owner_ref",
          "resource_version",
          "reason"
        ],
        "properties": {
          "source_system": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "source_object_ref": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "collection_basis": {
            "type": "string",
            "enum": [
              "consent",
              "business_relationship",
              "public_business",
              "referral"
            ]
          },
          "collection_basis_ref": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "contact_ref": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "company_name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "owner_ref": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "resource_version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 0
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        }
      },
      "LeadUpdate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "collection_basis",
          "collection_basis_ref",
          "contact_ref",
          "company_name",
          "resource_version",
          "reason"
        ],
        "properties": {
          "collection_basis": {
            "type": "string",
            "enum": [
              "consent",
              "business_relationship",
              "public_business",
              "referral"
            ]
          },
          "collection_basis_ref": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "contact_ref": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "company_name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "resource_version": {
            "type": "integer",
            "minimum": 1
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        }
      },
      "FollowupPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "items",
          "next_cursor"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "application_id": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "product_code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$",
            "maxLength": 80
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Followup"
            }
          },
          "next_cursor": {
            "type": "string",
            "maxLength": 2048
          }
        }
      },
      "Followup": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "id",
          "version",
          "created_at",
          "updated_at",
          "lead_id",
          "actor_ref",
          "note",
          "status"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "application_id": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "product_code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$",
            "maxLength": 80
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "lead_id": {
            "type": "string",
            "format": "uuid"
          },
          "actor_ref": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "status": {
            "type": "string",
            "enum": [
              "recorded"
            ]
          }
        }
      },
      "Assignment": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "owner_ref",
          "resource_version",
          "reason"
        ],
        "properties": {
          "owner_ref": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "resource_version": {
            "type": "integer",
            "minimum": 1
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        }
      },
      "Decision": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resource_version",
          "reason"
        ],
        "properties": {
          "resource_version": {
            "type": "integer",
            "minimum": 1
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        }
      },
      "Duplicate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "duplicate_of_id",
          "target_version",
          "resource_version",
          "reason"
        ],
        "properties": {
          "duplicate_of_id": {
            "type": "string",
            "format": "uuid"
          },
          "target_version": {
            "type": "integer",
            "minimum": 1
          },
          "resource_version": {
            "type": "integer",
            "minimum": 1
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        }
      },
      "FollowupReceipt": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "lead",
          "followup"
        ],
        "properties": {
          "lead": {
            "$ref": "#/components/schemas/Lead"
          },
          "followup": {
            "$ref": "#/components/schemas/Followup"
          }
        }
      },
      "FollowupCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "note",
          "resource_version",
          "reason"
        ],
        "properties": {
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "resource_version": {
            "type": "integer",
            "minimum": 1
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        }
      },
      "Conversion": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "lead",
          "opportunity"
        ],
        "properties": {
          "lead": {
            "$ref": "#/components/schemas/Lead"
          },
          "opportunity": {
            "$ref": "#/components/schemas/Opportunity"
          }
        }
      },
      "Opportunity": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "id",
          "version",
          "created_at",
          "updated_at",
          "source_lead_id",
          "company_name",
          "contact_ref",
          "name",
          "requirements",
          "owner_ref",
          "estimated_amount",
          "expected_date",
          "status",
          "last_outcome",
          "outcome_reason"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "application_id": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "product_code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$",
            "maxLength": 80
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "source_lead_id": {
            "type": "string",
            "format": "uuid"
          },
          "company_name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "contact_ref": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "requirements": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "owner_ref": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "estimated_amount": {
            "$ref": "#/components/schemas/EstimatedAmount"
          },
          "expected_date": {
            "type": "string",
            "format": "date"
          },
          "status": {
            "type": "string",
            "enum": [
              "discovery",
              "proposal",
              "negotiation",
              "won",
              "lost"
            ]
          },
          "last_outcome": {
            "type": "string",
            "enum": [
              "",
              "won",
              "lost"
            ]
          },
          "outcome_reason": {
            "type": "string",
            "maxLength": 500
          }
        }
      },
      "EstimatedAmount": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "value",
          "scale",
          "currency"
        ],
        "properties": {
          "value": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "scale": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          }
        }
      },
      "OpportunityUpdate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "requirements",
          "estimated_amount",
          "expected_date",
          "owner_ref",
          "resource_version",
          "reason"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "requirements": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "estimated_amount": {
            "$ref": "#/components/schemas/EstimatedAmount"
          },
          "expected_date": {
            "type": "string",
            "format": "date"
          },
          "owner_ref": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "resource_version": {
            "type": "integer",
            "minimum": 1
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        }
      },
      "OpportunityPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "items",
          "next_cursor"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "application_id": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "product_code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$",
            "maxLength": 80
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Opportunity"
            }
          },
          "next_cursor": {
            "type": "string",
            "maxLength": 2048
          }
        }
      },
      "Stage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "status",
          "resource_version",
          "reason"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "proposal",
              "negotiation",
              "won",
              "lost"
            ]
          },
          "resource_version": {
            "type": "integer",
            "minimum": 1
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        }
      },
      "SalesReport": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "from",
          "to",
          "as_of",
          "source_updated_at",
          "counts",
          "pipeline"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80,
            "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "source_updated_at": {
            "type": "string",
            "maxLength": 40
          },
          "counts": {
            "type": "array",
            "maxItems": 9,
            "items": {
              "$ref": "#/components/schemas/StatusCount"
            }
          },
          "pipeline": {
            "type": "array",
            "maxItems": 1000,
            "items": {
              "$ref": "#/components/schemas/PipelineAmount"
            }
          }
        }
      },
      "StatusCount": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resource_type",
          "status",
          "count"
        ],
        "properties": {
          "resource_type": {
            "type": "string",
            "enum": [
              "lead",
              "opportunity"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "qualified",
              "disqualified",
              "converted",
              "discovery",
              "proposal",
              "negotiation",
              "won",
              "lost"
            ]
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        }
      },
      "PipelineAmount": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "currency",
          "scale",
          "minor_units",
          "opportunity_count"
        ],
        "properties": {
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "scale": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6
          },
          "minor_units": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)$",
            "maxLength": 100
          },
          "opportunity_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        }
      },
      "SalesAuditPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "items",
          "next_cursor"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80,
            "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/SalesAudit"
            }
          },
          "next_cursor": {
            "type": "string",
            "maxLength": 2048
          }
        }
      },
      "SalesAudit": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "actor_ref",
          "action",
          "target_type",
          "target_id",
          "result",
          "request_id",
          "occurred_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "actor_ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "action": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^appmarket\\.(lead|opportunity)\\.[a-z_.]+$"
          },
          "target_type": {
            "type": "string",
            "enum": [
              "appmarket_lead",
              "appmarket_opportunity",
              "appmarket_lead_followup"
            ]
          },
          "target_id": {
            "type": "string",
            "format": "uuid"
          },
          "result": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "request_id": {
            "type": "string",
            "maxLength": 200
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DeveloperApplicationDeliveries": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "environment",
          "items"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1
          },
          "application_id": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "items": {
            "type": "array",
            "maxItems": 200,
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            }
          },
          "next_cursor": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "存在下一页时返回本页末条投递ID，末页省略。"
          }
        }
      },
      "WebhookDelivery": {
        "type": "object",
        "required": [
          "id",
          "subscription_id",
          "event_id",
          "event_type",
          "status",
          "attempt_count",
          "next_attempt_at",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "subscription_id": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "event_type": {
            "type": "string"
          },
          "correlation_id": {
            "type": "string",
            "description": "与规范事件一致的脱敏链路标识，用于发送端与接收端日志关联。"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "in_flight",
              "delivered",
              "failed",
              "dead_letter"
            ]
          },
          "attempt_count": {
            "type": "integer"
          },
          "last_response_code": {
            "type": "integer"
          },
          "last_error_code": {
            "type": "string",
            "description": "稳定错误码，不包含第三方自由文本或请求正文。"
          },
          "next_attempt_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DeveloperCompanyProductTeam": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "company_id",
          "company_version",
          "commercial_link_version",
          "customer_organization_id",
          "team"
        ],
        "properties": {
          "company_id": {
            "type": "string",
            "format": "uuid"
          },
          "company_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "commercial_link_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "customer_organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "team": {
            "$ref": "#/components/schemas/ProductTeam"
          }
        }
      },
      "ProductTeam": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "assignments",
          "items",
          "has_more"
        ],
        "properties": {
          "assignments": {
            "$ref": "#/components/schemas/ProductMemberAssignments"
          },
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ProductTeamMember"
            }
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "ProductMemberAssignments": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "product_code",
          "subscription_id",
          "open_platform_application_id",
          "environment",
          "subscription_version",
          "unlimited",
          "eligible",
          "valid_from",
          "valid_until",
          "version",
          "assigned_membership_ids",
          "direct_membership_ids",
          "assigned_group_ids",
          "used_seats",
          "allowed_actions"
        ],
        "properties": {
          "license_slots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductLicenseSlot"
            },
            "description": "Materialized active slots, ordered by category and ordinal. Absent only for an older consumer; never infer slots from member array order."
          },
          "classified_member_allocation": {
            "$ref": "#/components/schemas/ClassifiedMemberAllocation"
          },
          "builder_membership_ids": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "$ref": "#/components/schemas/UUID"
            }
          },
          "ordinary_user_membership_ids": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "$ref": "#/components/schemas/UUID"
            }
          },
          "organization_id": {
            "$ref": "#/components/schemas/UUID"
          },
          "product_code": {
            "type": "string",
            "minLength": 1
          },
          "subscription_id": {
            "$ref": "#/components/schemas/UUID"
          },
          "open_platform_application_id": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "subscription_version": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "seat_limit": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "unlimited": {
            "type": "boolean"
          },
          "eligible": {
            "type": "boolean",
            "description": "Current commercial period and exact fulfilled ProductAccess; over-capacity assignment still denies product use"
          },
          "valid_from": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "valid_until": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "version": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "assigned_membership_ids": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "$ref": "#/components/schemas/UUID"
            }
          },
          "direct_membership_ids": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "$ref": "#/components/schemas/UUID"
            },
            "description": "Direct sources; always a subset of assigned_membership_ids"
          },
          "assigned_group_ids": {
            "type": "array",
            "uniqueItems": true,
            "maxItems": 20,
            "items": {
              "$ref": "#/components/schemas/UUID"
            },
            "description": "Active group sources for the current exact subscription"
          },
          "used_seats": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "allowed_actions": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "access.product-assignments.change"
              ]
            }
          }
        }
      },
      "ProductLicenseSlot": {
        "type": "object",
        "additionalProperties": false,
        "description": "Access-owned slot in the exact subscription and license category. Reassignment keeps its ID; vacant slots have no membership_id. Slots do not grant access or issue allowances. New subscriptions have independent identities. Only materialized active slots are listed; their count is not the sold capacity. A holder still requires current active Membership, exact fulfilled subscription and final product authorization.",
        "required": [
          "id",
          "license_kind",
          "ordinal",
          "version"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/UUID"
          },
          "license_kind": {
            "type": "string",
            "enum": [
              "standard",
              "builder",
              "ordinary_user"
            ]
          },
          "ordinal": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "membership_id": {
            "$ref": "#/components/schemas/UUID"
          },
          "version": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        }
      },
      "UUID": {
        "type": "string",
        "format": "uuid"
      },
      "ClassifiedMemberAllocation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema_version",
          "builder_seats",
          "ordinary_user_seats"
        ],
        "description": "版本1软件容量；两类和为正的安全整数，与旧总容量互斥，分类只允许直接分配。",
        "properties": {
          "schema_version": {
            "type": "integer",
            "enum": [
              1
            ]
          },
          "builder_seats": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "ordinary_user_seats": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        }
      },
      "Timestamp": {
        "type": "string",
        "format": "date-time"
      },
      "ProductTeamMember": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "membership_id",
          "display_name",
          "membership_status",
          "identity_status",
          "assigned",
          "direct_assigned",
          "can_use"
        ],
        "properties": {
          "license_kind": {
            "type": "string",
            "enum": [
              "builder",
              "ordinary_user"
            ],
            "description": "仅返回最终许可核验通过的类别"
          },
          "membership_id": {
            "$ref": "#/components/schemas/UUID"
          },
          "display_name": {
            "type": "string"
          },
          "membership_status": {
            "type": "string",
            "enum": [
              "invited",
              "active",
              "suspended",
              "left"
            ]
          },
          "identity_status": {
            "type": "string",
            "enum": [
              "invited",
              "active",
              "suspended",
              "closed"
            ]
          },
          "assigned": {
            "type": "boolean"
          },
          "direct_assigned": {
            "type": "boolean"
          },
          "can_use": {
            "type": "boolean",
            "description": "Current Access product context eligibility; does not prove historical activity or grant every product action."
          }
        }
      },
      "DeveloperCompanyProductAssignment": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "company_id",
          "company_version",
          "commercial_link_version",
          "customer_organization_id",
          "assignments"
        ],
        "properties": {
          "company_id": {
            "type": "string",
            "format": "uuid"
          },
          "company_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "commercial_link_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "customer_organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "assignments": {
            "$ref": "#/components/schemas/ProductMemberAssignments"
          }
        }
      },
      "DeveloperUsageAvailability": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "environment",
          "product_code",
          "enabled",
          "reason_code",
          "allowed_actions"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1
          },
          "application_id": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "product_code": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "reason_code": {
            "type": "string",
            "enum": [
              "CAPABILITY_NOT_ACTIVE",
              "USAGE_AVAILABLE",
              "USAGE_PERMISSION_REQUIRED"
            ]
          },
          "allowed_actions": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "usage.read",
                "usage.record"
              ]
            }
          }
        }
      },
      "SubscriptionUsageList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "query",
          "items",
          "summary",
          "metrics",
          "trend",
          "has_more",
          "as_of"
        ],
        "properties": {
          "query": {
            "$ref": "#/components/schemas/SubscriptionUsageQuery"
          },
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/SubscriptionUsageEvent"
            }
          },
          "summary": {
            "$ref": "#/components/schemas/SubscriptionUsageSummary"
          },
          "metrics": {
            "type": "array",
            "maxItems": 64,
            "items": {
              "$ref": "#/components/schemas/SubscriptionUsageMetric"
            }
          },
          "trend": {
            "type": "array",
            "maxItems": 8192,
            "items": {
              "$ref": "#/components/schemas/SubscriptionUsageTrend"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SubscriptionUsageQuery": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "scope",
          "from",
          "to",
          "subscription_id",
          "customer_organization_id",
          "metric",
          "status",
          "limit",
          "offset"
        ],
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/SubscriptionUsageScope"
          },
          "from": {
            "type": "string",
            "format": "date-time",
            "description": "Included UTC instant"
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "description": "Excluded instant; maximum window is 366 days"
          },
          "subscription_id": {
            "type": "string",
            "maxLength": 36,
            "description": "Empty or exact canonical UUID"
          },
          "customer_organization_id": {
            "type": "string",
            "maxLength": 200
          },
          "metric": {
            "type": "string",
            "maxLength": 80
          },
          "status": {
            "type": "string",
            "enum": [
              "",
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000
          }
        }
      },
      "SubscriptionUsageScope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "provider_organization_id",
          "application_id",
          "product_code",
          "environment"
        ],
        "properties": {
          "provider_organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          }
        }
      },
      "SubscriptionUsageEvent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "evidence",
          "received_at"
        ],
        "properties": {
          "evidence": {
            "$ref": "#/components/schemas/SubscriptionUsageEvidence"
          },
          "received_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SubscriptionUsageEvidence": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "scope",
          "input",
          "order_id",
          "subscription_version",
          "plan_code",
          "plan_version",
          "price_version_ref",
          "period_start",
          "period_end",
          "recorded_by"
        ],
        "properties": {
          "recorded_by": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Current seller operator reference resolved by the service; caller cannot supply this field"
          },
          "scope": {
            "$ref": "#/components/schemas/SubscriptionUsageScope"
          },
          "input": {
            "$ref": "#/components/schemas/SubscriptionUsageInput"
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "subscription_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "plan_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "plan_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "price_version_ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "period_start": {
            "type": "string",
            "format": "date-time"
          },
          "period_end": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SubscriptionUsageInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "event_id",
          "customer_organization_id",
          "subscription_id",
          "occurred_at",
          "metric",
          "unit",
          "quantity",
          "status",
          "user_reference"
        ],
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "customer_organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "subscription_id": {
            "type": "string",
            "format": "uuid"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "metric": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "unit": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "quantity": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,29})$",
            "description": "Actual integer measurement in the declared unit, not a price or a converted token balance"
          },
          "status": {
            "type": "string",
            "enum": [
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "user_reference": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{0,120}$",
            "description": "Empty or application-local opaque user reference; no email, name, token or request body. A reported reference does not prove Access identity or assignment."
          },
          "duration_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 604800000,
            "description": "Omit if unmeasured"
          }
        }
      },
      "SubscriptionUsageSummary": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "events",
          "succeeded",
          "failed",
          "cancelled",
          "customers",
          "subscriptions",
          "reported_users"
        ],
        "properties": {
          "events": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "succeeded": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "failed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "cancelled": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "customers": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "subscriptions": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "reported_users": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        }
      },
      "SubscriptionUsageMetric": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "metric",
          "unit",
          "quantity",
          "events"
        ],
        "properties": {
          "metric": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "unit": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "quantity": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,99})$"
          },
          "events": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        }
      },
      "SubscriptionUsageTrend": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "day",
          "metric",
          "unit",
          "quantity",
          "events"
        ],
        "properties": {
          "day": {
            "type": "string",
            "format": "date"
          },
          "metric": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "unit": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "quantity": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,99})$"
          },
          "events": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        }
      },
      "TaskPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "items",
          "next_cursor"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$",
            "maxLength": 80
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "next_cursor": {
            "type": "string",
            "minLength": 0,
            "maxLength": 2048
          }
        }
      },
      "Task": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "id",
          "version",
          "created_at",
          "updated_at",
          "opportunity_id",
          "source_version",
          "name",
          "instructions",
          "owner_ref",
          "due_date",
          "status",
          "evidence_ref",
          "submitted_by",
          "reviewed_by"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$",
            "maxLength": 80
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "opportunity_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "instructions": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "owner_ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "working",
              "review_pending",
              "closed",
              "cancelled"
            ]
          },
          "evidence_ref": {
            "type": "string",
            "minLength": 0,
            "maxLength": 500
          },
          "submitted_by": {
            "type": "string",
            "minLength": 0,
            "maxLength": 200
          },
          "reviewed_by": {
            "type": "string",
            "minLength": 0,
            "maxLength": 200
          }
        }
      },
      "TaskCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "opportunity_id",
          "source_version",
          "name",
          "instructions",
          "owner_ref",
          "due_date",
          "resource_version",
          "reason"
        ],
        "properties": {
          "opportunity_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "instructions": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "owner_ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "resource_version": {
            "type": "integer",
            "enum": [
              0
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        }
      },
      "TaskUpdate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "instructions",
          "due_date",
          "resource_version",
          "reason"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "instructions": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "resource_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        }
      },
      "TaskHistory": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "items",
          "next_cursor"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$",
            "maxLength": 80
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/TaskEntry"
            }
          },
          "next_cursor": {
            "type": "string",
            "minLength": 0,
            "maxLength": 2048
          }
        }
      },
      "TaskEntry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "id",
          "version",
          "created_at",
          "updated_at",
          "task_id",
          "task_version",
          "action",
          "actor_ref",
          "reason",
          "evidence_ref",
          "status"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$",
            "maxLength": 80
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "task_id": {
            "type": "string",
            "format": "uuid"
          },
          "task_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "action": {
            "type": "string",
            "enum": [
              "create",
              "update",
              "assign",
              "start",
              "submit",
              "review",
              "return",
              "cancel",
              "reopen"
            ]
          },
          "actor_ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          },
          "evidence_ref": {
            "type": "string",
            "minLength": 0,
            "maxLength": 500
          },
          "status": {
            "type": "string",
            "enum": [
              "recorded"
            ]
          }
        }
      },
      "TaskAssignment": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "owner_ref",
          "resource_version",
          "reason"
        ],
        "properties": {
          "owner_ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "resource_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        }
      },
      "TaskDecision": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resource_version",
          "reason"
        ],
        "properties": {
          "resource_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        }
      },
      "TaskSubmission": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "evidence_ref",
          "resource_version",
          "reason"
        ],
        "properties": {
          "evidence_ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "resource_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        }
      },
      "DeveloperQuoteAvailability": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "environment",
          "product_code",
          "enabled",
          "reason_code",
          "allowed_actions"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1
          },
          "application_id": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "product_code": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "reason_code": {
            "type": "string",
            "enum": [
              "CAPABILITY_NOT_ACTIVE",
              "QUOTES_AVAILABLE"
            ]
          },
          "allowed_actions": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "quote.read",
                "quote.manage"
              ]
            }
          }
        }
      },
      "QuotePage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "items",
          "next_cursor"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Quote"
            }
          },
          "next_cursor": {
            "type": "string",
            "maxLength": 2048
          }
        }
      },
      "Quote": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "id",
          "name",
          "terms",
          "revision",
          "terms_sha256",
          "status",
          "submitted_by",
          "approved_by",
          "decided_by",
          "approval_evidence_ref",
          "sent_at",
          "decided_at",
          "version",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "terms": {
            "$ref": "#/components/schemas/QuoteTerms"
          },
          "revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "terms_sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "review_pending",
              "approved",
              "sent",
              "accepted",
              "declined",
              "withdrawn",
              "expired"
            ]
          },
          "submitted_by": {
            "type": "string",
            "maxLength": 200
          },
          "approved_by": {
            "type": "string",
            "maxLength": 200
          },
          "decided_by": {
            "type": "string",
            "maxLength": 200
          },
          "approval_evidence_ref": {
            "type": "string",
            "maxLength": 500
          },
          "sent_at": {
            "type": "string",
            "maxLength": 40
          },
          "decided_at": {
            "type": "string",
            "maxLength": 40
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "QuoteTerms": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "opportunity_id",
          "company_id",
          "customer_party_id",
          "provider_party_id",
          "sales_offer_id",
          "sales_offer_approval_id",
          "product_id",
          "price_version_id",
          "opportunity_version",
          "sales_offer_version",
          "product_version",
          "price_resource_version",
          "plan_version",
          "customer_organization_id",
          "customer_name",
          "provider_name",
          "sales_offer_name",
          "product_name",
          "plan_code",
          "billing_interval",
          "quantity",
          "unit_amount",
          "total_amount",
          "discount_scaled",
          "tax_treatment",
          "terms_ref",
          "terms_text",
          "terms_content_sha256",
          "valid_until"
        ],
        "properties": {
          "opportunity_id": {
            "type": "string",
            "format": "uuid"
          },
          "company_id": {
            "type": "string",
            "format": "uuid"
          },
          "customer_party_id": {
            "type": "string",
            "format": "uuid"
          },
          "provider_party_id": {
            "type": "string",
            "format": "uuid"
          },
          "sales_offer_id": {
            "type": "string",
            "format": "uuid"
          },
          "sales_offer_approval_id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "price_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "opportunity_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "sales_offer_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "product_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "price_resource_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "plan_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "customer_organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "customer_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "provider_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "sales_offer_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "plan_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "billing_interval": {
            "type": "string",
            "enum": [
              "month",
              "year"
            ]
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000
          },
          "unit_amount": {
            "$ref": "#/components/schemas/QuoteMoney"
          },
          "total_amount": {
            "$ref": "#/components/schemas/QuoteMoney"
          },
          "discount_scaled": {
            "type": "integer",
            "minimum": 0,
            "maximum": 0
          },
          "tax_treatment": {
            "type": "string",
            "enum": [
              "per_sales_offer_terms"
            ]
          },
          "terms_ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "terms_text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000
          },
          "terms_content_sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "valid_until": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "QuoteMoney": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "value",
          "scale",
          "currency"
        ],
        "properties": {
          "value": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "scale": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          }
        }
      },
      "QuoteDraftRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "opportunity_id",
          "company_id",
          "sales_offer_id",
          "opportunity_version",
          "sales_offer_version",
          "name",
          "plan_code",
          "quantity",
          "valid_until",
          "resource_version",
          "reason"
        ],
        "properties": {
          "opportunity_id": {
            "type": "string",
            "format": "uuid"
          },
          "company_id": {
            "type": "string",
            "format": "uuid"
          },
          "sales_offer_id": {
            "type": "string",
            "format": "uuid"
          },
          "opportunity_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "sales_offer_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "plan_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000
          },
          "valid_until": {
            "type": "string",
            "format": "date-time"
          },
          "resource_version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        }
      },
      "QuoteHistory": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "items",
          "next_cursor"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuoteEntry"
            }
          },
          "next_cursor": {
            "type": "string",
            "maxLength": 2048
          }
        }
      },
      "QuoteEntry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "id",
          "quote_id",
          "action",
          "actor_ref",
          "reason",
          "quote",
          "status",
          "version",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "quote_id": {
            "type": "string",
            "format": "uuid"
          },
          "action": {
            "type": "string",
            "enum": [
              "create",
              "update",
              "submit",
              "approve",
              "return",
              "send",
              "withdraw",
              "revise",
              "expire",
              "accept",
              "decline"
            ]
          },
          "actor_ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          },
          "quote": {
            "$ref": "#/components/schemas/Quote"
          },
          "status": {
            "type": "string",
            "enum": [
              "recorded"
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "QuoteCommand": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resource_version",
          "reason"
        ],
        "properties": {
          "resource_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        }
      },
      "QuoteApproval": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resource_version",
          "reason",
          "approval_evidence_ref"
        ],
        "properties": {
          "resource_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          },
          "approval_evidence_ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        }
      },
      "QuoteOptions": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "organization_id",
          "application_id",
          "product_code",
          "environment",
          "items"
        ],
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "product_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuoteTerms"
            }
          }
        }
      }
    },
    "responses": {
      "Problem": {
        "description": "RFC 7807 错误",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      }
    }
  }
}
