{
  "openapi" : "3.1.0",
  "info" : {
    "title" : "神运开放平台",
    "version" : "1.0.0",
    "description" : "让店铺自己的系统读写神运数据：会员与资产、发券 / 背包 / 赠送储值、储值充值与退款、下单派单与退款、陪玩入驻与证书、事件通知。服务器对服务器调用，HMAC-SHA256 签名（见 https://docs.byteforge.cn/shenyun/open/guide/signature）。"
  },
  "servers" : [ {
    "url" : "https://api.sybb.pw/open/v1"
  } ],
  "security" : [ {
    "SyHmac" : [ ]
  } ],
  "tags" : [ {
    "name" : "资产发放"
  }, {
    "name" : "商品"
  }, {
    "name" : "陪玩入驻"
  }, {
    "name" : "陪玩"
  }, {
    "name" : "会员资产"
  }, {
    "name" : "事件"
  }, {
    "name" : "工具"
  }, {
    "name" : "订单"
  }, {
    "name" : "基础"
  }, {
    "name" : "会员"
  }, {
    "name" : "储值"
  } ],
  "paths" : {
    "/backpack-items/{itemId}/cancel" : {
      "post" : {
        "operationId" : "AssetGrants_cancelBackpackItem",
        "summary" : "取消背包物品",
        "description" : "取消未核销的物品。已取消的再调一次直接返回；已核销、已过期的不能取消（422）。\n\n**权限范围**：`assets:write`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "资产发放" ],
        "x-scope" : "assets:write",
        "parameters" : [ {
          "name" : "itemId",
          "in" : "path",
          "required" : true,
          "description" : "背包物品 ID（bk_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^bk_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BackpackItemView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/categories" : {
      "get" : {
        "operationId" : "Catalog_categories",
        "summary" : "商品分类",
        "description" : "**权限范围**：`catalog:read`",
        "tags" : [ "商品" ],
        "x-scope" : "catalog:read",
        "x-errors" : [ ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "object",
                  "required" : [ "items" ],
                  "properties" : {
                    "items" : {
                      "type" : "array",
                      "items" : {
                        "$ref" : "#/components/schemas/CategoryView"
                      }
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/companion-application-form" : {
      "get" : {
        "operationId" : "CompanionApplications_form",
        "summary" : "陪玩申请表单",
        "description" : "本店陪玩注册字段配置（是否启用、是否必填）、首考可选证书、默认保证金。按它渲染你自己的表单，店铺改了字段你不用改代码。\n\n**权限范围**：`companions:read`",
        "tags" : [ "陪玩入驻" ],
        "x-scope" : "companions:read",
        "x-errors" : [ ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApplicationFormView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/companion-applications" : {
      "get" : {
        "operationId" : "CompanionApplications_list",
        "summary" : "陪玩申请列表",
        "description" : "`status` 可选：RECRUIT_PENDING / EXAMINER_PENDING / INVIGILATOR_PENDING / REVIEW_PASSED / ENTRY_APPROVED / REJECTED。\n\n**权限范围**：`companions:read`",
        "tags" : [ "陪玩入驻" ],
        "x-scope" : "companions:read",
        "parameters" : [ {
          "name" : "status",
          "in" : "query",
          "required" : false,
          "description" : "RECRUIT_PENDING / EXAMINER_PENDING / INVIGILATOR_PENDING / REVIEW_PASSED / ENTRY_APPROVED / REJECTED；不传 = 全部",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "cursor",
          "in" : "query",
          "required" : false,
          "description" : "分页游标：第一页不传，之后原样传上一页返回的 nextCursor",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "limit",
          "in" : "query",
          "required" : false,
          "description" : "每页条数，1~100，默认 20",
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        } ],
        "x-errors" : [ ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "object",
                  "required" : [ "items" ],
                  "properties" : {
                    "items" : {
                      "type" : "array",
                      "items" : {
                        "$ref" : "#/components/schemas/ApplicationView"
                      }
                    },
                    "nextCursor" : {
                      "type" : [ "string", "null" ],
                      "description" : "下一页游标，原样作为 cursor 传回；null = 没有下一页"
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post" : {
        "operationId" : "CompanionApplications_submit",
        "summary" : "提交陪玩申请",
        "description" : "提交后进入「招募审核中」。必填字段按店铺配置校验；`fields` 里出现表单之外的 key 直接拒绝。\n驳回后重新提交也用这个接口（新的 `externalRef`），会回到被驳回的那个阶段继续审。已是陪玩的会员不能再申请（409）。\n\n**权限范围**：`companions:write`\n\n**幂等单号**：`externalRef`。同号同参数重复请求返回首次结果（响应头 `X-Sy-Replayed: true`），同号不同参数返回 409 `OUT_BIZ_NO_CONFLICT`。",
        "tags" : [ "陪玩入驻" ],
        "x-scope" : "companions:write",
        "x-idempotent-by" : "externalRef",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/SubmitApplication"
              }
            }
          }
        },
        "x-errors" : [ "NOT_FOUND", "OUT_BIZ_NO_CONFLICT", "APPLICATION_STATE_INVALID", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApplicationView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "OUT_BIZ_NO_CONFLICT / APPLICATION_STATE_INVALID",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/companion-applications/{applicationId}" : {
      "get" : {
        "operationId" : "CompanionApplications_get",
        "summary" : "陪玩申请详情",
        "description" : "当前阶段、各阶段审核意见、驳回原因。\n\n**权限范围**：`companions:read`",
        "tags" : [ "陪玩入驻" ],
        "x-scope" : "companions:read",
        "parameters" : [ {
          "name" : "applicationId",
          "in" : "path",
          "required" : true,
          "description" : "陪玩申请 ID（ca_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^ca_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApplicationView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/companion-applications/{applicationId}/approve-entry" : {
      "post" : {
        "operationId" : "CompanionApplications_approveEntry",
        "summary" : "入驻通过",
        "description" : "三级审核都通过（REVIEW_PASSED）后调用：授陪玩角色、授申请里的证书、刷新登录态、进审核群、按店铺设置同步到关联商户。\n已入驻的再调直接返回；其他状态 409。`pledgeType=full` 时押金钱包余额须已够应缴保证金。\n\n**权限范围**：`companions:write`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "陪玩入驻" ],
        "x-scope" : "companions:write",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ApproveEntry"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "applicationId",
          "in" : "path",
          "required" : true,
          "description" : "陪玩申请 ID（ca_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^ca_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND", "APPLICATION_STATE_INVALID", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApplicationView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "APPLICATION_STATE_INVALID",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/companion-applications/{applicationId}/reviews" : {
      "post" : {
        "operationId" : "CompanionApplications_review",
        "summary" : "审核当前阶段",
        "description" : "按顺序调三次：`recruit` 招募 → `examiner` 考官 → `invigilator` 监考。`stage` 必须等于申请当前所处的阶段，\n否则 409 `APPLICATION_STATE_INVALID`（同一阶段只会被审一次，和店铺后台同时审也不会重复推进）。\n通过推进到下一阶段（监考通过后为 REVIEW_PASSED），驳回进入该阶段的驳回状态。审核记录的操作人显示「开放平台 · 应用名 · 操作人」。\n\n**权限范围**：`companions:write`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "陪玩入驻" ],
        "x-scope" : "companions:write",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ReviewApplication"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "applicationId",
          "in" : "path",
          "required" : true,
          "description" : "陪玩申请 ID（ca_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^ca_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND", "APPLICATION_STATE_INVALID" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApplicationView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "APPLICATION_STATE_INVALID",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/companions" : {
      "get" : {
        "operationId" : "Companions_list",
        "summary" : "陪玩列表",
        "description" : "`status`：enabled / disabled；`certId`：持有某证书的陪玩。按入驻先后倒序，游标分页。\n\n**权限范围**：`companions:read`",
        "tags" : [ "陪玩" ],
        "x-scope" : "companions:read",
        "parameters" : [ {
          "name" : "status",
          "in" : "query",
          "required" : false,
          "description" : "enabled 启用 / disabled 停用；不传 = 全部",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "certId",
          "in" : "query",
          "required" : false,
          "description" : "只看持有这个证书的",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "cursor",
          "in" : "query",
          "required" : false,
          "description" : "分页游标：第一页不传，之后原样传上一页返回的 nextCursor",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "limit",
          "in" : "query",
          "required" : false,
          "description" : "每页条数，1~100，默认 20",
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        } ],
        "x-errors" : [ ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "object",
                  "required" : [ "items" ],
                  "properties" : {
                    "items" : {
                      "type" : "array",
                      "items" : {
                        "$ref" : "#/components/schemas/CompanionView"
                      }
                    },
                    "nextCursor" : {
                      "type" : [ "string", "null" ],
                      "description" : "下一页游标，原样作为 cursor 传回；null = 没有下一页"
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/companions/{companionId}" : {
      "get" : {
        "operationId" : "Companions_get",
        "summary" : "陪玩详情",
        "description" : "**权限范围**：`companions:read`",
        "tags" : [ "陪玩" ],
        "x-scope" : "companions:read",
        "parameters" : [ {
          "name" : "companionId",
          "in" : "path",
          "required" : true,
          "description" : "陪玩 ID（cpn_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^cpn_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CompanionView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch" : {
        "operationId" : "Companions_update",
        "summary" : "启用 / 停用、标签",
        "description" : "停用后陪玩不能登录接单；`tagIds` 覆盖式设置陪玩标签。\n\n**权限范围**：`companions:write`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "陪玩" ],
        "x-scope" : "companions:write",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateCompanion"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "companionId",
          "in" : "path",
          "required" : true,
          "description" : "陪玩 ID（cpn_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^cpn_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CompanionView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/companions/{companionId}/certs" : {
      "post" : {
        "operationId" : "Companions_certs",
        "summary" : "授证 / 撤证",
        "description" : "`add` 授予、`remove` 撤销，可同时传。已有的再授、没有的再撤都不会出错。\n\n**权限范围**：`companions:write`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "陪玩" ],
        "x-scope" : "companions:write",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ChangeCerts"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "companionId",
          "in" : "path",
          "required" : true,
          "description" : "陪玩 ID（cpn_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^cpn_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CompanionView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/coupon-templates" : {
      "get" : {
        "operationId" : "Assets_couponTemplates",
        "summary" : "券模板",
        "description" : "本店券模板，发券前用来挑模板。`status=enabled` 只看启用的（默认），`all` 看全部。\n\n**权限范围**：`assets:read`",
        "tags" : [ "会员资产" ],
        "x-scope" : "assets:read",
        "parameters" : [ {
          "name" : "status",
          "in" : "query",
          "required" : false,
          "description" : "enabled 只看启用的（默认）/ all 全部",
          "schema" : {
            "type" : "string",
            "default" : "enabled"
          }
        } ],
        "x-errors" : [ ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "object",
                  "required" : [ "items" ],
                  "properties" : {
                    "items" : {
                      "type" : "array",
                      "items" : {
                        "$ref" : "#/components/schemas/CouponTemplateView"
                      }
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/coupons/{couponId}/void" : {
      "post" : {
        "operationId" : "AssetGrants_voidCoupon",
        "summary" : "作废优惠券",
        "description" : "作废未使用的券。已作废的再调一次直接返回；已使用、已过期、下单占用中的券不能作废（422）。\n\n**权限范围**：`assets:write`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "资产发放" ],
        "x-scope" : "assets:write",
        "requestBody" : {
          "required" : false,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/VoidCoupon"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "couponId",
          "in" : "path",
          "required" : true,
          "description" : "优惠券 ID（cp_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^cp_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CouponView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/events" : {
      "get" : {
        "operationId" : "Events_list",
        "summary" : "拉取事件",
        "description" : "按事件 ID 升序返回本店最近 7 天的事件（与 Webhook 推送的载荷完全相同）。\n第一次不传 `after`；之后把上一页最后一个事件的 `id` 作为 `after` 继续拉。`types` 逗号分隔，可选。\n\n**权限范围**：`events:read`",
        "tags" : [ "事件" ],
        "x-scope" : "events:read",
        "parameters" : [ {
          "name" : "after",
          "in" : "query",
          "required" : false,
          "description" : "从这个事件 ID 之后开始拉；第一次不传",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "types",
          "in" : "query",
          "required" : false,
          "description" : "只拉这些事件类型，逗号分隔",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "limit",
          "in" : "query",
          "required" : false,
          "description" : "每页条数，1~100，默认 20",
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        } ],
        "x-errors" : [ ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "object",
                  "required" : [ "items" ],
                  "properties" : {
                    "items" : {
                      "type" : "array",
                      "items" : { }
                    },
                    "nextCursor" : {
                      "type" : [ "string", "null" ],
                      "description" : "下一页游标，原样作为 cursor 传回；null = 没有下一页"
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/files" : {
      "post" : {
        "operationId" : "Files_upload",
        "summary" : "上传文件",
        "description" : "请求体就是文件的**原始字节**（不是 multipart，不是 base64），`Content-Type` 写文件类型：\n`image/jpeg`、`image/png`、`image/webp`、`application/pdf`，单个文件不超过 10 MB。签名照常计算（请求体哈希就是文件内容的 SHA-256）。\n服务端按文件头识别真实类型，与 `Content-Type` 不一致直接拒绝。\n\n返回的 `fileId` 用在陪玩申请的图片字段里（如 `\"idcardImgOssIds\": [\"file_…\", \"file_…\"]`）。文件存进店铺的私有证照存储，\n只有店铺后台能看到。**上传后 24 小时内没被引用的文件会被自动清理**，所以上传失败直接重传即可，没有副作用。\n\n**权限范围**：`files:write`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "工具" ],
        "x-scope" : "files:write",
        "requestBody" : {
          "required" : true,
          "description" : "文件的原始字节（不是 multipart、不是 base64）",
          "content" : {
            "image/jpeg" : {
              "schema" : {
                "type" : "string",
                "format" : "binary"
              }
            },
            "image/png" : {
              "schema" : {
                "type" : "string",
                "format" : "binary"
              }
            },
            "image/webp" : {
              "schema" : {
                "type" : "string",
                "format" : "binary"
              }
            },
            "application/pdf" : {
              "schema" : {
                "type" : "string",
                "format" : "binary"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "filename",
          "in" : "query",
          "required" : false,
          "description" : "原始文件名（可选，只用于店铺后台显示；后缀以识别出的真实类型为准）",
          "schema" : {
            "type" : "string"
          }
        } ],
        "x-errors" : [ "UNSUPPORTED_MEDIA_TYPE", "PAYLOAD_TOO_LARGE", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/FileView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gifts/{giftId}/reverse" : {
      "post" : {
        "operationId" : "AssetGrants_reverseGift",
        "summary" : "冲销赠送",
        "description" : "把赠送的储值扣回来（原路冲销，店铺营销支出同时冲回）。已冲销的再调一次直接返回。\n会员可用储值不够扣时默认 409 `INSUFFICIENT_BALANCE`；确认要扣成负数时传 `allowNegative: true`。\n\n**权限范围**：`assets:write`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "资产发放" ],
        "x-scope" : "assets:write",
        "requestBody" : {
          "required" : false,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ReverseGift"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "giftId",
          "in" : "path",
          "required" : true,
          "description" : "赠送 ID（gift_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^gift_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND", "INSUFFICIENT_BALANCE", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GiftView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "INSUFFICIENT_BALANCE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/match-tasks/{matchTaskId}" : {
      "get" : {
        "operationId" : "Orders_matchTask",
        "summary" : "抢单任务详情",
        "description" : "状态、生成的订单（抢满后）。\n\n**权限范围**：`orders:read`",
        "tags" : [ "订单" ],
        "x-scope" : "orders:read",
        "parameters" : [ {
          "name" : "matchTaskId",
          "in" : "path",
          "required" : true,
          "description" : "抢单任务 ID（mt_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^mt_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/MatchTaskView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/match-tasks/{matchTaskId}/cancel" : {
      "post" : {
        "operationId" : "Orders_cancelMatchTask",
        "summary" : "撤回抢单任务",
        "description" : "撤回还没抢满的任务，预冻结的储值解冻。已撤回的再调直接返回；已抢满的请取消 / 退款订单（409）。\n\n**权限范围**：`orders:write`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "订单" ],
        "x-scope" : "orders:write",
        "requestBody" : {
          "required" : false,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CancelOrder"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "matchTaskId",
          "in" : "path",
          "required" : true,
          "description" : "抢单任务 ID（mt_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^mt_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND", "ORDER_STATE_INVALID", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/MatchTaskView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "ORDER_STATE_INVALID",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/me" : {
      "get" : {
        "operationId" : "Me_me",
        "summary" : "当前应用",
        "description" : "店铺（名称、H5 地址）、应用名、权限范围、资金上限与今日已用、今日调用量与配额、限流档位。任意有效凭证都能调。\n\n**权限范围**：任意有效凭证",
        "tags" : [ "基础" ],
        "x-scope" : null,
        "x-errors" : [ ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Me"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/members" : {
      "get" : {
        "operationId" : "Members_find",
        "summary" : "查找会员",
        "description" : "按手机号（`phone`）或商户自己的用户 ID（`externalUserRef`）查本店会员，二选一。没有返回 404。\n\n**权限范围**：`members:read`",
        "tags" : [ "会员" ],
        "x-scope" : "members:read",
        "parameters" : [ {
          "name" : "phone",
          "in" : "query",
          "required" : false,
          "description" : "按手机号查（11 位）",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "externalUserRef",
          "in" : "query",
          "required" : false,
          "description" : "按商户自己的用户 ID 查（注册时绑定的）",
          "schema" : {
            "type" : "string"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/MemberView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post" : {
        "operationId" : "Members_create",
        "summary" : "注册会员",
        "description" : "注册老板身份的会员。`phone`、`externalUserRef` 至少给一个。\n手机号或 `externalUserRef` 已对应本店会员时直接返回该会员，`created: false`（同一个请求可以放心重试）。\n只会建老板，不会授予员工或陪玩角色；陪玩身份请走「陪玩申请」。\n\n**权限范围**：`members:write`\n\n**幂等单号**：`phone / externalUserRef`。同号同参数重复请求返回首次结果（响应头 `X-Sy-Replayed: true`），同号不同参数返回 409 `OUT_BIZ_NO_CONFLICT`。",
        "tags" : [ "会员" ],
        "x-scope" : "members:write",
        "x-idempotent-by" : "phone / externalUserRef",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateMember"
              }
            }
          }
        },
        "x-errors" : [ "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RegisteredView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/members/{memberId}" : {
      "get" : {
        "operationId" : "Members_get",
        "summary" : "会员资料",
        "description" : "昵称、头像、身份（老板 / 陪玩）、手机号（默认脱敏）、注册时间。\n\n**权限范围**：`members:read`",
        "tags" : [ "会员" ],
        "x-scope" : "members:read",
        "parameters" : [ {
          "name" : "memberId",
          "in" : "path",
          "required" : true,
          "description" : "会员 ID（mb_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^mb_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/MemberView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/members/{memberId}/backpack-items" : {
      "get" : {
        "operationId" : "Assets_backpackItems",
        "summary" : "会员背包物品",
        "description" : "`status`：`pending` 待核销 / `verified` 已核销 / `expired` 已过期 / `cancelled` 已取消；不传 = 全部。\n\n**权限范围**：`assets:read`",
        "tags" : [ "会员资产" ],
        "x-scope" : "assets:read",
        "parameters" : [ {
          "name" : "memberId",
          "in" : "path",
          "required" : true,
          "description" : "会员 ID（mb_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^mb_[1-9][0-9A-Za-z]{22}$"
          }
        }, {
          "name" : "status",
          "in" : "query",
          "required" : false,
          "description" : "pending 待核销 / verified 已核销 / expired 已过期 / cancelled 已取消；不传 = 全部",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "cursor",
          "in" : "query",
          "required" : false,
          "description" : "分页游标：第一页不传，之后原样传上一页返回的 nextCursor",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "limit",
          "in" : "query",
          "required" : false,
          "description" : "每页条数，1~100，默认 20",
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "object",
                  "required" : [ "items" ],
                  "properties" : {
                    "items" : {
                      "type" : "array",
                      "items" : {
                        "$ref" : "#/components/schemas/BackpackItemView"
                      }
                    },
                    "nextCursor" : {
                      "type" : [ "string", "null" ],
                      "description" : "下一页游标，原样作为 cursor 传回；null = 没有下一页"
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post" : {
        "operationId" : "AssetGrants_issueBackpackItems",
        "summary" : "发背包物品",
        "description" : "背包没有物品目录：每件物品由你给名称、描述、图片、有效期（线下核销）。一次 1~20 件。\n来源记为「开放平台」，到账通知照常发给会员。\n\n**权限范围**：`assets:write`\n\n**幂等单号**：`outBizNo`。同号同参数重复请求返回首次结果（响应头 `X-Sy-Replayed: true`），同号不同参数返回 409 `OUT_BIZ_NO_CONFLICT`。",
        "tags" : [ "资产发放" ],
        "x-scope" : "assets:write",
        "x-idempotent-by" : "outBizNo",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/IssueBackpackItems"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "memberId",
          "in" : "path",
          "required" : true,
          "description" : "会员 ID（mb_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^mb_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND", "OUT_BIZ_NO_CONFLICT", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/IssuedBackpackItems"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "OUT_BIZ_NO_CONFLICT",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/members/{memberId}/coupons" : {
      "get" : {
        "operationId" : "Assets_coupons",
        "summary" : "会员优惠券",
        "description" : "`status`：`available` 可用 / `used` 已用 / `expired` 已过期 / `voided` 已作废 / `frozen` 下单占用中；不传 = 全部。\n\n**权限范围**：`assets:read`",
        "tags" : [ "会员资产" ],
        "x-scope" : "assets:read",
        "parameters" : [ {
          "name" : "memberId",
          "in" : "path",
          "required" : true,
          "description" : "会员 ID（mb_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^mb_[1-9][0-9A-Za-z]{22}$"
          }
        }, {
          "name" : "status",
          "in" : "query",
          "required" : false,
          "description" : "available 可用 / frozen 占用中 / used 已用 / expired 已过期 / voided 已作废；不传 = 全部",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "cursor",
          "in" : "query",
          "required" : false,
          "description" : "分页游标：第一页不传，之后原样传上一页返回的 nextCursor",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "limit",
          "in" : "query",
          "required" : false,
          "description" : "每页条数，1~100，默认 20",
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "object",
                  "required" : [ "items" ],
                  "properties" : {
                    "items" : {
                      "type" : "array",
                      "items" : {
                        "$ref" : "#/components/schemas/CouponView"
                      }
                    },
                    "nextCursor" : {
                      "type" : [ "string", "null" ],
                      "description" : "下一页游标，原样作为 cursor 传回；null = 没有下一页"
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post" : {
        "operationId" : "AssetGrants_issueCoupons",
        "summary" : "发券",
        "description" : "按券模板给会员发 1~20 张券。走模板的有效期规则，**不受模板「每人限领」约束**（领取规则由你自己的系统决定），\n仍受模板总库存约束。超时或 5xx 时用同一个 `outBizNo` 重试，不会重复发。\n\n**权限范围**：`assets:write`\n\n**幂等单号**：`outBizNo`。同号同参数重复请求返回首次结果（响应头 `X-Sy-Replayed: true`），同号不同参数返回 409 `OUT_BIZ_NO_CONFLICT`。",
        "tags" : [ "资产发放" ],
        "x-scope" : "assets:write",
        "x-idempotent-by" : "outBizNo",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/IssueCoupons"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "memberId",
          "in" : "path",
          "required" : true,
          "description" : "会员 ID（mb_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^mb_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND", "OUT_BIZ_NO_CONFLICT", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/IssuedCoupons"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "OUT_BIZ_NO_CONFLICT",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/members/{memberId}/gifts" : {
      "post" : {
        "operationId" : "AssetGrants_gift",
        "summary" : "赠送储值",
        "description" : "给会员赠送储值（固定进储值钱包，记店铺营销支出）。受店铺为应用设置的「每日赠送上限」和「单笔上限」约束，\n超出返回 409 `DAILY_LIMIT_EXCEEDED`。\n\n**权限范围**：`assets:write`\n\n**幂等单号**：`outBizNo`。同号同参数重复请求返回首次结果（响应头 `X-Sy-Replayed: true`），同号不同参数返回 409 `OUT_BIZ_NO_CONFLICT`。",
        "tags" : [ "资产发放" ],
        "x-scope" : "assets:write",
        "x-idempotent-by" : "outBizNo",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateGift"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "memberId",
          "in" : "path",
          "required" : true,
          "description" : "会员 ID（mb_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^mb_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND", "OUT_BIZ_NO_CONFLICT", "DAILY_LIMIT_EXCEEDED", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GiftView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "OUT_BIZ_NO_CONFLICT / DAILY_LIMIT_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/members/{memberId}/growth" : {
      "post" : {
        "operationId" : "AssetGrants_growth",
        "summary" : "加减成长值",
        "description" : "`delta` 正数加、负数减（不能为 0）。会触发等级重算。\n\n**权限范围**：`assets:write`\n\n**幂等单号**：`outBizNo`。同号同参数重复请求返回首次结果（响应头 `X-Sy-Replayed: true`），同号不同参数返回 409 `OUT_BIZ_NO_CONFLICT`。",
        "tags" : [ "资产发放" ],
        "x-scope" : "assets:write",
        "x-idempotent-by" : "outBizNo",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ChangeGrowth"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "memberId",
          "in" : "path",
          "required" : true,
          "description" : "会员 ID（mb_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^mb_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND", "OUT_BIZ_NO_CONFLICT", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GrowthChangeView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "OUT_BIZ_NO_CONFLICT",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/members/{memberId}/login-tickets" : {
      "post" : {
        "operationId" : "Members_loginTicket",
        "summary" : "生成一次性登录链接",
        "description" : "生成一个 60 秒内有效、只能用一次的登录链接，浏览器打开后直接以该会员身份登录店铺 H5，进入指定落地页。\n落地页 `landing`：`grab_hall` 抢单大厅、`home` 首页、`companion_progress` 入驻进度、`my_assets` 我的资产。\n**链接必须在用户点击时实时获取，不能提前生成放在页面上。** 有员工 / 管理角色的会员不能签发（422）。\n\n**权限范围**：`members:write`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "会员" ],
        "x-scope" : "members:write",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateLoginTicket"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "memberId",
          "in" : "path",
          "required" : true,
          "description" : "会员 ID（mb_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^mb_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND", "MEMBER_ROLE_NOT_ALLOWED", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/LoginTicketView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "MEMBER_ROLE_NOT_ALLOWED / BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/members/{memberId}/membership" : {
      "get" : {
        "operationId" : "Assets_membership",
        "summary" : "会员等级",
        "description" : "成长等级（含当前成长值与升级所需）和付费会员。\n\n**权限范围**：`assets:read`",
        "tags" : [ "会员资产" ],
        "x-scope" : "assets:read",
        "parameters" : [ {
          "name" : "memberId",
          "in" : "path",
          "required" : true,
          "description" : "会员 ID（mb_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^mb_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/MembershipView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/members/{memberId}/recharges" : {
      "post" : {
        "operationId" : "Recharges_recharge",
        "summary" : "储值充值",
        "description" : "外部平台（淘宝、闲鱼、抖音、线下……）收到钱后，把钱充进会员的神运储值。\n`channel + externalPaymentId` 在本店唯一，重复请求返回首次的充值。入账资金账户取店铺在应用设置里选的「开放平台充值入账账户」。\n受店铺设置的「每日充值上限」「单笔上限」约束。\n\n**权限范围**：`finance:write`\n\n**幂等单号**：`channel + externalPaymentId`。同号同参数重复请求返回首次结果（响应头 `X-Sy-Replayed: true`），同号不同参数返回 409 `OUT_BIZ_NO_CONFLICT`。",
        "tags" : [ "储值" ],
        "x-scope" : "finance:write",
        "x-idempotent-by" : "channel + externalPaymentId",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateRecharge"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "memberId",
          "in" : "path",
          "required" : true,
          "description" : "会员 ID（mb_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^mb_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND", "OUT_BIZ_NO_CONFLICT", "DAILY_LIMIT_EXCEEDED", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RechargeView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "OUT_BIZ_NO_CONFLICT / DAILY_LIMIT_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/members/{memberId}/summary" : {
      "get" : {
        "operationId" : "Assets_summary",
        "summary" : "资产摘要（给 AI 用）",
        "description" : "一次返回吉祥物需要的全部摘要：可用储值、冻结储值、可用券数量和即将过期的 3 张、待核销背包物品数量和最近 5 件、\n会员等级与距下一级的成长值。字段精简、带中文 `label`，适合直接交给 AI 组织语言。服务端缓存 10 秒。\n\n**安全建议**：`memberId` 必须由你的后端从自己的登录会话里取出后注入工具调用，绝不能作为 AI 工具参数让模型填写。\n\n**权限范围**：`assets:read`",
        "tags" : [ "会员资产" ],
        "x-scope" : "assets:read",
        "parameters" : [ {
          "name" : "memberId",
          "in" : "path",
          "required" : true,
          "description" : "会员 ID（mb_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^mb_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SummaryView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/members/{memberId}/wallet" : {
      "get" : {
        "operationId" : "Assets_wallet",
        "summary" : "储值钱包",
        "description" : "只开放储值钱包。`availableCents` = 余额 − 冻结（不含授信）；下单可用额度另加 `creditLimitCents`。\n\n**权限范围**：`assets:read`",
        "tags" : [ "会员资产" ],
        "x-scope" : "assets:read",
        "parameters" : [ {
          "name" : "memberId",
          "in" : "path",
          "required" : true,
          "description" : "会员 ID（mb_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^mb_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WalletView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/members/{memberId}/wallet/transactions" : {
      "get" : {
        "operationId" : "Assets_walletTransactions",
        "summary" : "储值流水",
        "description" : "按时间倒序，游标分页。`type` 为流水业务类型（如 BALANCE_RECHARGE、ORDER_CONSUME、RECHARGE_REFUND），遇到不认识的值请容忍。\n\n**权限范围**：`assets:read`",
        "tags" : [ "会员资产" ],
        "x-scope" : "assets:read",
        "parameters" : [ {
          "name" : "memberId",
          "in" : "path",
          "required" : true,
          "description" : "会员 ID（mb_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^mb_[1-9][0-9A-Za-z]{22}$"
          }
        }, {
          "name" : "cursor",
          "in" : "query",
          "required" : false,
          "description" : "分页游标：第一页不传，之后原样传上一页返回的 nextCursor",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "limit",
          "in" : "query",
          "required" : false,
          "description" : "每页条数，1~100，默认 20",
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "object",
                  "required" : [ "items" ],
                  "properties" : {
                    "items" : {
                      "type" : "array",
                      "items" : {
                        "$ref" : "#/components/schemas/WalletTxnView"
                      }
                    },
                    "nextCursor" : {
                      "type" : [ "string", "null" ],
                      "description" : "下一页游标，原样作为 cursor 传回；null = 没有下一页"
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/orders" : {
      "get" : {
        "operationId" : "Orders_list",
        "summary" : "查询订单",
        "description" : "三种用法：\n- `outOrderNo=`：按本应用的下单单号查（发抢单大厅且已抢满时返回生成的订单；还没抢满返回 404，请查抢单任务）；\n- `memberId=`：某会员的订单；\n- `updatedAfter=`（RFC 3339）：全店在这之后有变化的订单，用于对账。可与 `memberId` 同时用。\n按订单 ID 倒序，游标分页。\n\n**权限范围**：`orders:read`",
        "tags" : [ "订单" ],
        "x-scope" : "orders:read",
        "parameters" : [ {
          "name" : "outOrderNo",
          "in" : "query",
          "required" : false,
          "description" : "按商户订单号查",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "memberId",
          "in" : "query",
          "required" : false,
          "description" : "只看这个会员的",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "updatedAfter",
          "in" : "query",
          "required" : false,
          "description" : "只看这个时间之后有变化的（RFC 3339），配合游标做增量同步",
          "schema" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "RFC 3339，如 2026-11-30T20:15:00+08:00"
          }
        }, {
          "name" : "cursor",
          "in" : "query",
          "required" : false,
          "description" : "分页游标：第一页不传，之后原样传上一页返回的 nextCursor",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "limit",
          "in" : "query",
          "required" : false,
          "description" : "每页条数，1~100，默认 20",
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        } ],
        "x-errors" : [ ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "object",
                  "required" : [ "items" ],
                  "properties" : {
                    "items" : {
                      "type" : "array",
                      "items" : {
                        "$ref" : "#/components/schemas/OrderView"
                      }
                    },
                    "nextCursor" : {
                      "type" : [ "string", "null" ],
                      "description" : "下一页游标，原样作为 cursor 传回；null = 没有下一页"
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post" : {
        "operationId" : "Orders_create",
        "summary" : "下单派单",
        "description" : "用会员储值下单。储值（含授信）不够返回 409 `INSUFFICIENT_BALANCE`，订单不会创建——淘宝 / 闲鱼等外部收款请先调「储值充值」。\n- `dispatch.mode = designated`：指定陪玩（与后台客服派单同一条路径），立即返回订单（状态 `paid`，等陪玩接单）；\n- `dispatch.mode = hall`：发抢单大厅，返回 `matchTask`；陪玩抢满后生成订单，推送 `match_task.fulfilled`。\n价格由神运按商品和价格方案计算，与 App 下单一致；`couponId` 可用会员的一张券。\n\n**权限范围**：`orders:write`\n\n**幂等单号**：`outOrderNo`。同号同参数重复请求返回首次结果（响应头 `X-Sy-Replayed: true`），同号不同参数返回 409 `OUT_BIZ_NO_CONFLICT`。",
        "tags" : [ "订单" ],
        "x-scope" : "orders:write",
        "x-idempotent-by" : "outOrderNo",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateOrder"
              }
            }
          }
        },
        "x-errors" : [ "NOT_FOUND", "OUT_BIZ_NO_CONFLICT", "INSUFFICIENT_BALANCE", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CreatedOrder"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "OUT_BIZ_NO_CONFLICT / INSUFFICIENT_BALANCE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/orders/{orderId}" : {
      "get" : {
        "operationId" : "Orders_get",
        "summary" : "订单详情",
        "description" : "**权限范围**：`orders:read`",
        "tags" : [ "订单" ],
        "x-scope" : "orders:read",
        "parameters" : [ {
          "name" : "orderId",
          "in" : "path",
          "required" : true,
          "description" : "订单 ID（ord_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^ord_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/orders/{orderId}/cancel" : {
      "post" : {
        "operationId" : "Orders_cancel",
        "summary" : "取消订单",
        "description" : "取消还没开始服务的订单（待支付 / 已冻结等陪玩接单），冻结的储值解冻。已取消的再调直接返回；已开始服务的请走退款（409）。\n\n**权限范围**：`orders:write`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "订单" ],
        "x-scope" : "orders:write",
        "requestBody" : {
          "required" : false,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CancelOrder"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "orderId",
          "in" : "path",
          "required" : true,
          "description" : "订单 ID（ord_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^ord_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND", "ORDER_STATE_INVALID", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "ORDER_STATE_INVALID",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/orders/{orderId}/refunds" : {
      "post" : {
        "operationId" : "Orders_refund",
        "summary" : "订单退款",
        "description" : "按订单当前状态自动走后台现有路径，你不需要关心中间状态：\n- 还没完成的订单：整单取消，冻结 / 已付的储值退回（只能全额，`amountCents` 不传或等于订单金额）；\n- 已完成的订单：同意退款；`amountCents` 不传 = 全额（订单变为已退款），传了 = 部分退款（订单保留），陪玩分成从工资扣回。\n钱一律回到会员储值。要把钱退回外部平台，再调「充值退款」。\n\n**权限范围**：`orders:write`\n\n**幂等单号**：`outRefundNo`。同号同参数重复请求返回首次结果（响应头 `X-Sy-Replayed: true`），同号不同参数返回 409 `OUT_BIZ_NO_CONFLICT`。",
        "tags" : [ "订单" ],
        "x-scope" : "orders:write",
        "x-idempotent-by" : "outRefundNo",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RefundOrder"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "orderId",
          "in" : "path",
          "required" : true,
          "description" : "订单 ID（ord_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^ord_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND", "OUT_BIZ_NO_CONFLICT", "ORDER_STATE_INVALID", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "OUT_BIZ_NO_CONFLICT / ORDER_STATE_INVALID",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products" : {
      "get" : {
        "operationId" : "Catalog_products",
        "summary" : "商品列表",
        "description" : "`categoryId` 可选；默认只返回上架商品，`status=all` 返回全部。\n\n**权限范围**：`catalog:read`",
        "tags" : [ "商品" ],
        "x-scope" : "catalog:read",
        "parameters" : [ {
          "name" : "categoryId",
          "in" : "query",
          "required" : false,
          "description" : "只看这个分类下的",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "status",
          "in" : "query",
          "required" : false,
          "description" : "enabled 只看上架的（默认）/ all 全部",
          "schema" : {
            "type" : "string",
            "default" : "enabled"
          }
        } ],
        "x-errors" : [ ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "object",
                  "required" : [ "items" ],
                  "properties" : {
                    "items" : {
                      "type" : "array",
                      "items" : {
                        "$ref" : "#/components/schemas/ProductView"
                      }
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{productId}" : {
      "get" : {
        "operationId" : "Catalog_productDetail",
        "summary" : "商品详情",
        "description" : "**权限范围**：`catalog:read`",
        "tags" : [ "商品" ],
        "x-scope" : "catalog:read",
        "parameters" : [ {
          "name" : "productId",
          "in" : "path",
          "required" : true,
          "description" : "商品 ID（prd_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^prd_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ProductView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/recharges" : {
      "get" : {
        "operationId" : "Recharges_findRecharge",
        "summary" : "按外部收款单号查充值",
        "description" : "按 `channel` + `externalPaymentId` 查本应用发起的充值，没有返回 404。\n\n**权限范围**：`assets:read`",
        "tags" : [ "储值" ],
        "x-scope" : "assets:read",
        "parameters" : [ {
          "name" : "channel",
          "in" : "query",
          "required" : true,
          "description" : "外部渠道",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "externalPaymentId",
          "in" : "query",
          "required" : true,
          "description" : "外部平台收款单号",
          "schema" : {
            "type" : "string"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RechargeView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/recharges/{rechargeId}" : {
      "get" : {
        "operationId" : "Recharges_getRecharge",
        "summary" : "充值详情",
        "description" : "金额、已退金额、可退金额、状态。\n\n**权限范围**：`assets:read`",
        "tags" : [ "储值" ],
        "x-scope" : "assets:read",
        "parameters" : [ {
          "name" : "rechargeId",
          "in" : "path",
          "required" : true,
          "description" : "充值 ID（rc_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^rc_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RechargeView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/recharges/{rechargeId}/refunds" : {
      "post" : {
        "operationId" : "Recharges_refund",
        "summary" : "充值退款",
        "description" : "把充值退掉：可部分退、可多次退，每次用一个新的 `externalRefundId`。生成冲正流水、回写原充值的已退金额；\n全额退款会自动冲销这笔充值带来的返利。会员储值不够退（钱已经花掉）时默认 409 `INSUFFICIENT_BALANCE`，\n`details.availableCents` 给出当前可用储值；通常先退订单（钱回储值）再退充值，确认要扣成负数时传 `allowNegative: true`。\n\n**权限范围**：`finance:write`\n\n**幂等单号**：`externalRefundId`。同号同参数重复请求返回首次结果（响应头 `X-Sy-Replayed: true`），同号不同参数返回 409 `OUT_BIZ_NO_CONFLICT`。",
        "tags" : [ "储值" ],
        "x-scope" : "finance:write",
        "x-idempotent-by" : "externalRefundId",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateRefund"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "rechargeId",
          "in" : "path",
          "required" : true,
          "description" : "充值 ID（rc_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^rc_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND", "OUT_BIZ_NO_CONFLICT", "INSUFFICIENT_BALANCE", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RefundView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "OUT_BIZ_NO_CONFLICT / INSUFFICIENT_BALANCE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/refunds/{refundId}" : {
      "get" : {
        "operationId" : "Recharges_getRefund",
        "summary" : "退款详情",
        "description" : "**权限范围**：`assets:read`",
        "tags" : [ "储值" ],
        "x-scope" : "assets:read",
        "parameters" : [ {
          "name" : "refundId",
          "in" : "path",
          "required" : true,
          "description" : "充值退款 ID（rf_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^rf_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RefundView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/skill-certs" : {
      "get" : {
        "operationId" : "Companions_skillCerts",
        "summary" : "证书定义",
        "description" : "本店证书：名称、等级、分数、保证金、是否首考可选。\n\n**权限范围**：`companions:read`",
        "tags" : [ "陪玩" ],
        "x-scope" : "companions:read",
        "x-errors" : [ ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "object",
                  "required" : [ "items" ],
                  "properties" : {
                    "items" : {
                      "type" : "array",
                      "items" : {
                        "$ref" : "#/components/schemas/CertView"
                      }
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sms-verifications" : {
      "post" : {
        "operationId" : "Sms_send",
        "summary" : "发送短信验证码",
        "description" : "限频：同手机号 1 次/分钟、10 次/天；同应用 30 次/分钟、2000 次/天。验证码 5 分钟过期，错 5 次作废。测试凭证不真发，验证码固定为 246810。\n\n**权限范围**：`sms:send`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "工具" ],
        "x-scope" : "sms:send",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/SendCode"
              }
            }
          }
        },
        "x-errors" : [ "SMS_RATE_LIMITED", "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Sent"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED / SMS_RATE_LIMITED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sms-verifications/{verificationId}/verify" : {
      "post" : {
        "operationId" : "Sms_verify",
        "summary" : "校验短信验证码",
        "description" : "校验成功后验证码立即作废。只有发起这次验证的应用能校验。\n\n**权限范围**：`sms:send`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "工具" ],
        "x-scope" : "sms:send",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/VerifyCode"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "verificationId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "x-errors" : [ "SMS_CODE_INVALID", "SMS_CODE_EXPIRED" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Verified"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "SMS_CODE_INVALID / SMS_CODE_EXPIRED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks" : {
      "get" : {
        "operationId" : "Webhooks_list",
        "summary" : "通知地址列表",
        "description" : "**权限范围**：`webhooks:manage`",
        "tags" : [ "事件" ],
        "x-scope" : "webhooks:manage",
        "x-errors" : [ ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "object",
                  "required" : [ "items" ],
                  "properties" : {
                    "items" : {
                      "type" : "array",
                      "items" : {
                        "$ref" : "#/components/schemas/WebhookView"
                      }
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post" : {
        "operationId" : "Webhooks_create",
        "summary" : "登记通知地址",
        "description" : "必须是 https（测试凭证可用 http）；不能指向内网；端口只能 443 / 80 / 8443。一个应用最多 5 个。\n\n**权限范围**：`webhooks:manage`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "事件" ],
        "x-scope" : "webhooks:manage",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateWebhook"
              }
            }
          }
        },
        "x-errors" : [ "BUSINESS_RULE" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WebhookView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "422" : {
            "description" : "BUSINESS_RULE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{webhookId}" : {
      "delete" : {
        "operationId" : "Webhooks_delete",
        "summary" : "删除通知地址",
        "description" : "**权限范围**：`webhooks:manage`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "事件" ],
        "x-scope" : "webhooks:manage",
        "parameters" : [ {
          "name" : "webhookId",
          "in" : "path",
          "required" : true,
          "description" : "通知地址 ID（wh_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^wh_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "object",
                  "additionalProperties" : {
                    "type" : "boolean"
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch" : {
        "operationId" : "Webhooks_update",
        "summary" : "修改通知地址",
        "description" : "只传要改的字段；`enabled: true` 会同时清零失败计数。\n\n**权限范围**：`webhooks:manage`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "事件" ],
        "x-scope" : "webhooks:manage",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateWebhook"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "webhookId",
          "in" : "path",
          "required" : true,
          "description" : "通知地址 ID（wh_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^wh_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WebhookView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "PAYLOAD_TOO_LARGE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "UNSUPPORTED_MEDIA_TYPE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{webhookId}/rotate-secret" : {
      "post" : {
        "operationId" : "Webhooks_rotate",
        "summary" : "轮换通知密钥",
        "description" : "返回新 secret；之后 24 小时内签名头同时带新旧两个签名，任意一个对上即可。\n\n**权限范围**：`webhooks:manage`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "事件" ],
        "x-scope" : "webhooks:manage",
        "parameters" : [ {
          "name" : "webhookId",
          "in" : "path",
          "required" : true,
          "description" : "通知地址 ID（wh_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^wh_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WebhookView"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{webhookId}/test" : {
      "post" : {
        "operationId" : "Webhooks_test",
        "summary" : "发送测试事件",
        "description" : "向这个地址发一条 `ping` 事件，用来确认地址和验签代码正确。\n\n**权限范围**：`webhooks:manage`\n\n**幂等**：本身幂等，重复调用结果相同。",
        "tags" : [ "事件" ],
        "x-scope" : "webhooks:manage",
        "parameters" : [ {
          "name" : "webhookId",
          "in" : "path",
          "required" : true,
          "description" : "通知地址 ID（wh_…）",
          "schema" : {
            "type" : "string",
            "pattern" : "^wh_[1-9][0-9A-Za-z]{22}$"
          }
        } ],
        "x-errors" : [ "NOT_FOUND" ],
        "responses" : {
          "200" : {
            "description" : "成功",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PingResult"
                }
              }
            }
          },
          "400" : {
            "description" : "INVALID_REQUEST / TENANT_PARAM_FORBIDDEN / PATH_NOT_CANONICAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "SIGNATURE_INVALID / TIMESTAMP_EXPIRED / NONCE_REUSED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "IP_NOT_ALLOWED / SCOPE_REQUIRED / APP_PAUSED / FEATURE_NOT_ENABLED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "NOT_FOUND",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "RATE_LIMITED / CONCURRENCY_LIMIT / DAILY_QUOTA_EXCEEDED",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "CAPABILITY_DISABLED / TEMPORARILY_UNAVAILABLE",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components" : {
    "securitySchemes" : {
      "SyHmac" : {
        "type" : "apiKey",
        "in" : "header",
        "name" : "Authorization",
        "description" : "SY-HMAC-SHA256 Credential=<AccessKey ID>, Timestamp=<Unix 秒>, Nonce=<16~64 位>, Signature=<hex(HMAC-SHA256)>"
      }
    },
    "schemas" : {
      "AdditionalServiceView" : {
        "type" : "object",
        "properties" : {
          "serviceId" : {
            "type" : "string",
            "description" : "附加服务 ID（as_…）"
          },
          "name" : {
            "type" : "string",
            "description" : "名称"
          },
          "unitPriceCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "chargeMode" : {
            "type" : "string",
            "description" : "fixed 按单价 / ratio 按主订单金额比例"
          },
          "ratioPercent" : {
            "type" : "number",
            "description" : "附加服务加价比例（%）"
          },
          "quantityRelation" : {
            "type" : "string",
            "description" : "follow_order 随订单数量 / one_per_order 一单一个 / custom 下单者自定义"
          },
          "description" : {
            "type" : "string",
            "description" : "说明"
          }
        }
      },
      "ApplicationFormView" : {
        "type" : "object",
        "required" : [ "defaultDepositCents" ],
        "properties" : {
          "fields" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/FormFieldView"
            },
            "description" : "申请表单字段（键见 GET /companion-application-form）"
          },
          "firstAuditCerts" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/CertView"
            }
          },
          "defaultDepositCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          }
        }
      },
      "ApplicationView" : {
        "type" : "object",
        "properties" : {
          "applicationId" : {
            "type" : "string",
            "description" : "陪玩申请 ID（ca_…）"
          },
          "memberId" : {
            "type" : "string",
            "description" : "会员 ID（mb_…）"
          },
          "status" : {
            "type" : "string",
            "description" : "RECRUIT_PENDING → EXAMINER_PENDING → INVIGILATOR_PENDING → REVIEW_PASSED → ENTRY_APPROVED；驳回为 REJECTED"
          },
          "currentStage" : {
            "type" : "string",
            "description" : "当前待审阶段（recruit / examiner / invigilator），不在审核中为 null"
          },
          "rejectedStage" : {
            "type" : "string",
            "description" : "驳回发生在哪个阶段"
          },
          "skillCertIds" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            },
            "description" : "证书 ID 列表（cert_…）"
          },
          "fields" : {
            "type" : "object",
            "additionalProperties" : { },
            "description" : "申请表单字段（键见 GET /companion-application-form）"
          },
          "reviews" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ReviewView"
            },
            "description" : "各阶段审核记录"
          },
          "externalRef" : {
            "type" : "string",
            "description" : "提交时的商户招聘单号"
          },
          "companionId" : {
            "type" : "string",
            "description" : "陪玩 ID（cpn_…）"
          },
          "submittedAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          },
          "updatedAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          }
        }
      },
      "ApproveEntry" : {
        "type" : "object",
        "required" : [ "pledgeType" ],
        "properties" : {
          "pledgeType" : {
            "type" : "string",
            "minLength" : 1,
            "enum" : [ "none", "full", "salary_deduction" ],
            "description" : "none 免押 / full 全额缴纳（押金钱包须已够）/ salary_deduction 工资抵扣"
          }
        }
      },
      "BackpackItemView" : {
        "type" : "object",
        "properties" : {
          "itemId" : {
            "type" : "string",
            "description" : "背包物品 ID（bk_…）"
          },
          "memberId" : {
            "type" : "string",
            "description" : "会员 ID（mb_…）"
          },
          "name" : {
            "type" : "string",
            "description" : "名称"
          },
          "description" : {
            "type" : "string",
            "description" : "说明"
          },
          "imageUrl" : {
            "type" : "string",
            "description" : "图片 URL（https）"
          },
          "source" : {
            "type" : "string",
            "description" : "来源（中文，如「开放平台」「活动奖励」「后台发放」）"
          },
          "status" : {
            "type" : "string",
            "description" : "pending 待核销 / verified 已核销 / expired 已过期 / cancelled 已取消"
          },
          "expiresAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          },
          "issuedAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          },
          "verifiedAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "核销时间"
          }
        }
      },
      "CancelOrder" : {
        "type" : "object",
        "properties" : {
          "reason" : {
            "type" : "string",
            "maxLength" : 100,
            "description" : "原因（写进操作记录，店铺后台可见）"
          }
        }
      },
      "CategoryView" : {
        "type" : "object",
        "required" : [ "enabled" ],
        "properties" : {
          "categoryId" : {
            "type" : "string",
            "description" : "商品分类 ID（cat_…）"
          },
          "parentId" : {
            "type" : "string",
            "description" : "商品分类 ID（cat_…）"
          },
          "name" : {
            "type" : "string",
            "description" : "名称"
          },
          "iconUrl" : {
            "type" : "string",
            "description" : "图标 URL"
          },
          "enabled" : {
            "type" : "boolean",
            "description" : "是否启用"
          },
          "sort" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "排序（小的在前）"
          },
          "standardServiceCount" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "标准服务数量（如时长、局数）"
          }
        }
      },
      "CertView" : {
        "type" : "object",
        "required" : [ "firstAuditSelectable", "enabled" ],
        "properties" : {
          "certId" : {
            "type" : "string",
            "description" : "证书 ID（cert_…）"
          },
          "name" : {
            "type" : "string",
            "description" : "名称"
          },
          "level" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "证书等级"
          },
          "score" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "证书分值"
          },
          "depositCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "需缴押金（分）"
          },
          "firstAuditSelectable" : {
            "type" : "boolean",
            "description" : "申请时可自选（提交申请的 skillCertIds 只能从这些里选）"
          },
          "enabled" : {
            "type" : "boolean",
            "description" : "是否启用"
          }
        }
      },
      "ChangeCerts" : {
        "type" : "object",
        "properties" : {
          "add" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "minLength" : 1
            },
            "maxItems" : 20,
            "description" : "要增加的证书"
          },
          "remove" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "minLength" : 1
            },
            "maxItems" : 20,
            "description" : "要撤销的证书"
          }
        }
      },
      "ChangeGrowth" : {
        "type" : "object",
        "required" : [ "delta", "outBizNo", "reason" ],
        "properties" : {
          "delta" : {
            "type" : "integer",
            "format" : "int64",
            "minimum" : -1000000,
            "maximum" : 1000000,
            "description" : "变动值（正数增加、负数减少）"
          },
          "outBizNo" : {
            "type" : "string",
            "minLength" : 1,
            "pattern" : "^(?:[\\x21-\\x7E]{1,64})$",
            "description" : "商户业务单号（幂等键，1~64 位可见 ASCII；失败用同一个单号重试）"
          },
          "reason" : {
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 100,
            "description" : "原因（写进操作记录，店铺后台可见）"
          }
        }
      },
      "CompanionView" : {
        "type" : "object",
        "required" : [ "online" ],
        "properties" : {
          "companionId" : {
            "type" : "string",
            "description" : "陪玩 ID（cpn_…）"
          },
          "memberId" : {
            "type" : "string",
            "description" : "会员 ID（mb_…）"
          },
          "workNo" : {
            "type" : "string",
            "description" : "工号"
          },
          "nickname" : {
            "type" : "string",
            "description" : "昵称"
          },
          "avatarUrl" : {
            "type" : "string",
            "description" : "头像 URL"
          },
          "status" : {
            "type" : "string",
            "description" : "enabled 启用 / disabled 停用"
          },
          "certIds" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            },
            "description" : "持有的证书（cert_…）"
          },
          "tagIds" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            },
            "description" : "陪玩标签（tag_…）"
          },
          "enteredAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "入驻时间"
          },
          "online" : {
            "type" : "boolean",
            "description" : "当前是否在线接单"
          }
        }
      },
      "CouponTemplateView" : {
        "type" : "object",
        "required" : [ "enabled" ],
        "properties" : {
          "templateId" : {
            "type" : "string",
            "description" : "券模板 ID（ctpl_…）"
          },
          "name" : {
            "type" : "string",
            "description" : "名称"
          },
          "type" : {
            "type" : "string",
            "description" : "full_reduction 满减 / discount 折扣 / direct_reduction 直减 / free 免单"
          },
          "discountValueCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "discountRate" : {
            "type" : "number",
            "description" : "折扣（如 8.5 = 八五折）；非折扣券为 null"
          },
          "minAmountCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "maxDiscountCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "validityRule" : {
            "type" : "string",
            "description" : "fixed_period 固定时间段 / days_after_issue 领取后 N 天 / permanent 永久"
          },
          "validDays" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "领取后有效天数（validityRule = days_after_issue 时）"
          },
          "validFrom" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "RFC 3339，如 2026-11-30T20:15:00+08:00"
          },
          "validTo" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "RFC 3339，如 2026-11-30T20:15:00+08:00"
          },
          "enabled" : {
            "type" : "boolean",
            "description" : "是否启用"
          },
          "totalQuantity" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "发行总量（null = 不限）"
          },
          "issuedCount" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "已发数量"
          },
          "description" : {
            "type" : "string",
            "description" : "说明"
          }
        }
      },
      "CouponView" : {
        "type" : "object",
        "properties" : {
          "couponId" : {
            "type" : "string",
            "description" : "优惠券 ID（cp_…）"
          },
          "templateId" : {
            "type" : "string",
            "description" : "券模板 ID（ctpl_…）"
          },
          "memberId" : {
            "type" : "string",
            "description" : "会员 ID（mb_…）"
          },
          "name" : {
            "type" : "string",
            "description" : "名称"
          },
          "type" : {
            "type" : "string",
            "description" : "full_reduction 满减 / discount 折扣 / direct_reduction 直减 / free 免单"
          },
          "discountValueCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "满减 / 直减券的面额（分）；折扣券为 null"
          },
          "discountRate" : {
            "type" : "number",
            "description" : "折扣券的折扣（如 8.5 = 八五折）；其他券为 null"
          },
          "minAmountCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "maxDiscountCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "status" : {
            "type" : "string",
            "description" : "available 可用 / frozen 下单占用中 / used 已用 / expired 已过期 / voided 已作废"
          },
          "validFrom" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "RFC 3339，如 2026-11-30T20:15:00+08:00"
          },
          "expiresAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          },
          "issuedAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          },
          "usedAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          },
          "usedOrderId" : {
            "type" : "string",
            "description" : "订单 ID（ord_…）"
          }
        }
      },
      "CreateGift" : {
        "type" : "object",
        "required" : [ "amountCents", "outBizNo", "reason" ],
        "properties" : {
          "amountCents" : {
            "type" : "integer",
            "format" : "int64",
            "minimum" : 1,
            "maximum" : 5000000,
            "description" : "金额（分）"
          },
          "outBizNo" : {
            "type" : "string",
            "minLength" : 1,
            "pattern" : "^(?:[\\x21-\\x7E]{1,64})$",
            "description" : "商户业务单号（幂等键，1~64 位可见 ASCII；失败用同一个单号重试）"
          },
          "reason" : {
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 100,
            "description" : "原因（写进操作记录，店铺后台可见）"
          }
        }
      },
      "CreateLoginTicket" : {
        "type" : "object",
        "required" : [ "landing" ],
        "properties" : {
          "landing" : {
            "type" : "string",
            "minLength" : 1,
            "description" : "登录后落地页：home 首页 / my_assets 我的资产 / grab_hall 抢单大厅 / companion_progress 入驻进度"
          }
        }
      },
      "CreateMember" : {
        "type" : "object",
        "description" : "注册会员",
        "properties" : {
          "phone" : {
            "type" : "string",
            "pattern" : "^(?:^1\\d{10}$)$",
            "description" : "手机号（11 位中国大陆手机号）"
          },
          "externalUserRef" : {
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 64,
            "pattern" : "^(?:[\\x21-\\x7E]+)$",
            "description" : "商户自己的用户 ID（可选；绑定后可用它查会员）"
          },
          "nickname" : {
            "type" : "string",
            "maxLength" : 24,
            "description" : "昵称"
          }
        }
      },
      "CreateOrder" : {
        "type" : "object",
        "required" : [ "outOrderNo", "memberId", "productId", "quantity", "dispatch" ],
        "properties" : {
          "outOrderNo" : {
            "type" : "string",
            "minLength" : 1,
            "pattern" : "^(?:[\\x21-\\x7E]{1,64})$",
            "description" : "商户订单号（幂等键）"
          },
          "memberId" : {
            "type" : "string",
            "minLength" : 1,
            "description" : "会员 ID（mb_…）"
          },
          "productId" : {
            "type" : "string",
            "minLength" : 1,
            "description" : "商品 ID（prd_…）"
          },
          "quantity" : {
            "type" : "number",
            "minimum" : 0.01,
            "maximum" : 9999,
            "description" : "数量"
          },
          "additionalServiceIds" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "minLength" : 1
            },
            "maxItems" : 10,
            "description" : "附加服务 ID 列表（as_…）"
          },
          "serviceStartAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          },
          "dispatch" : {
            "$ref" : "#/components/schemas/Dispatch",
            "description" : "派单方式"
          },
          "couponId" : {
            "type" : "string",
            "description" : "优惠券 ID（cp_…）"
          },
          "remark" : {
            "type" : "string",
            "maxLength" : 200,
            "description" : "备注"
          }
        }
      },
      "CreateRecharge" : {
        "type" : "object",
        "required" : [ "amountCents", "channel", "externalPaymentId" ],
        "properties" : {
          "amountCents" : {
            "type" : "integer",
            "format" : "int64",
            "minimum" : 1,
            "maximum" : 1000000000,
            "description" : "金额（分）"
          },
          "channel" : {
            "type" : "string",
            "minLength" : 1,
            "pattern" : "^(?:[a-z0-9_]{1,32})$",
            "description" : "外部渠道：taobao / xianyu / douyin / pdd / meituan / wechat / alipay / offline / other，或自定义（小写字母数字下划线）"
          },
          "externalPaymentId" : {
            "type" : "string",
            "minLength" : 1,
            "pattern" : "^(?:[\\x21-\\x7E]{1,64})$",
            "description" : "外部平台收款单号；channel + externalPaymentId 在本店唯一"
          },
          "triggerActivities" : {
            "type" : "boolean",
            "description" : "是否参与充值返利活动（默认 true）；成长值、成就照常计算"
          },
          "fundAccountId" : {
            "type" : "string",
            "description" : "入账资金账户（覆盖应用设置里的默认账户，可空）（fa_…）"
          },
          "remark" : {
            "type" : "string",
            "maxLength" : 200,
            "description" : "备注"
          }
        }
      },
      "CreateRefund" : {
        "type" : "object",
        "required" : [ "externalRefundId", "reason" ],
        "properties" : {
          "amountCents" : {
            "type" : "integer",
            "format" : "int64",
            "minimum" : 1,
            "description" : "退款金额（分）；不传 = 退剩余全部"
          },
          "externalRefundId" : {
            "type" : "string",
            "minLength" : 1,
            "pattern" : "^(?:[\\x21-\\x7E]{1,64})$",
            "description" : "外部平台退款单号（幂等键）"
          },
          "reason" : {
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 100,
            "description" : "原因（写进操作记录，店铺后台可见）"
          },
          "allowNegative" : {
            "type" : "boolean",
            "description" : "会员储值不够退时是否允许扣成负数（默认 false → 409 INSUFFICIENT_BALANCE）"
          }
        }
      },
      "CreateWebhook" : {
        "type" : "object",
        "required" : [ "url" ],
        "properties" : {
          "url" : {
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 512,
            "description" : "地址"
          },
          "eventTypes" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "minLength" : 1
            },
            "maxItems" : 50,
            "description" : "订阅的事件类型；不传或 [\"*\"] = 全部"
          },
          "description" : {
            "type" : "string",
            "maxLength" : 100,
            "description" : "说明"
          }
        }
      },
      "CreatedOrder" : {
        "type" : "object",
        "description" : "下单结果：指定陪玩返回 order；发抢单大厅返回 matchTask（抢满后推送 match_task.fulfilled，带订单 ID）",
        "properties" : {
          "outOrderNo" : {
            "type" : "string",
            "description" : "商户订单号（幂等键）"
          },
          "mode" : {
            "type" : "string",
            "description" : "designated 指定陪玩 / hall 抢单大厅"
          },
          "order" : {
            "$ref" : "#/components/schemas/OrderView",
            "description" : "订单（发抢单大厅时为 null）"
          },
          "matchTask" : {
            "$ref" : "#/components/schemas/MatchTaskView",
            "description" : "抢单任务（指定陪玩时为 null）"
          }
        }
      },
      "Dispatch" : {
        "type" : "object",
        "required" : [ "mode" ],
        "properties" : {
          "mode" : {
            "type" : "string",
            "minLength" : 1,
            "enum" : [ "designated", "hall" ],
            "description" : "designated 指定陪玩 / hall 发抢单大厅"
          },
          "companionIds" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "minLength" : 1
            },
            "maxItems" : 10,
            "description" : "陪玩 ID 列表（cpn_…）"
          },
          "anonymous" : {
            "type" : "boolean",
            "description" : "是否匿名下单（陪玩看不到会员信息）"
          }
        }
      },
      "Error" : {
        "type" : "object",
        "required" : [ "error" ],
        "properties" : {
          "error" : {
            "type" : "object",
            "required" : [ "code", "message", "requestId" ],
            "properties" : {
              "code" : {
                "type" : "string",
                "description" : "稳定的错误码，可编程判断（见错误码表）",
                "enum" : [ "INVALID_REQUEST", "TENANT_PARAM_FORBIDDEN", "PATH_NOT_CANONICAL", "SIGNATURE_INVALID", "TIMESTAMP_EXPIRED", "NONCE_REUSED", "IP_NOT_ALLOWED", "SCOPE_REQUIRED", "APP_PAUSED", "FEATURE_NOT_ENABLED", "NOT_FOUND", "METHOD_NOT_ALLOWED", "OUT_BIZ_NO_CONFLICT", "INSUFFICIENT_BALANCE", "DAILY_LIMIT_EXCEEDED", "APPLICATION_STATE_INVALID", "ORDER_STATE_INVALID", "PAYLOAD_TOO_LARGE", "UNSUPPORTED_MEDIA_TYPE", "MEMBER_ROLE_NOT_ALLOWED", "SMS_CODE_INVALID", "SMS_CODE_EXPIRED", "BUSINESS_RULE", "RATE_LIMITED", "CONCURRENCY_LIMIT", "DAILY_QUOTA_EXCEEDED", "SMS_RATE_LIMITED", "INTERNAL", "CAPABILITY_DISABLED", "TEMPORARILY_UNAVAILABLE" ]
              },
              "message" : {
                "type" : "string",
                "description" : "中文说明，可直接给客服看"
              },
              "requestId" : {
                "type" : "string",
                "description" : "请求号，联系我们时提供"
              },
              "details" : {
                "type" : "object",
                "description" : "附加信息（如字段错误列表、可用余额）"
              }
            }
          }
        }
      },
      "FileView" : {
        "type" : "object",
        "required" : [ "sizeBytes" ],
        "properties" : {
          "fileId" : {
            "type" : "string",
            "description" : "文件 ID，在业务接口的文件字段里引用（file_…）"
          },
          "contentType" : {
            "type" : "string",
            "description" : "识别出的文件类型"
          },
          "sizeBytes" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "文件大小（字节）"
          },
          "sha256" : {
            "type" : "string",
            "description" : "文件内容的 SHA-256（十六进制），可用来核对"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          }
        }
      },
      "FormFieldView" : {
        "type" : "object",
        "required" : [ "enabled", "required" ],
        "properties" : {
          "key" : {
            "type" : "string",
            "description" : "字段名（提交申请时 fields 的键）"
          },
          "label" : {
            "type" : "string",
            "description" : "显示名"
          },
          "type" : {
            "type" : "string",
            "description" : "string 文本 / integer 整数 / enum01 是否（0 或 1）/ file_ids 图片或 PDF（先调「上传文件」拿 fileId， 这里传 fileId 数组，最多 9 个）/ cert_ids 证书（用 skillCertIds 提交）"
          },
          "enabled" : {
            "type" : "boolean",
            "description" : "店铺是否启用这个字段"
          },
          "required" : {
            "type" : "boolean",
            "description" : "是否必填"
          }
        }
      },
      "GiftView" : {
        "type" : "object",
        "required" : [ "amountCents" ],
        "properties" : {
          "giftId" : {
            "type" : "string",
            "description" : "赠送 ID（gift_…）"
          },
          "memberId" : {
            "type" : "string",
            "description" : "会员 ID（mb_…）"
          },
          "amountCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "status" : {
            "type" : "string",
            "description" : "issued 已发放 / reversed 已冲销"
          },
          "reason" : {
            "type" : "string",
            "description" : "原因（写进操作记录，店铺后台可见）"
          },
          "outBizNo" : {
            "type" : "string",
            "description" : "商户业务单号（幂等键，1~64 位可见 ASCII；失败用同一个单号重试）"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          }
        }
      },
      "GrowthChangeView" : {
        "type" : "object",
        "required" : [ "delta" ],
        "properties" : {
          "memberId" : {
            "type" : "string",
            "description" : "会员 ID（mb_…）"
          },
          "delta" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "变动值（正数增加、负数减少）"
          },
          "outBizNo" : {
            "type" : "string",
            "description" : "商户业务单号（幂等键，1~64 位可见 ASCII；失败用同一个单号重试）"
          }
        }
      },
      "IssueBackpackItems" : {
        "type" : "object",
        "required" : [ "name", "count", "outBizNo", "reason" ],
        "properties" : {
          "name" : {
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 50,
            "description" : "名称"
          },
          "description" : {
            "type" : "string",
            "maxLength" : 500,
            "description" : "说明"
          },
          "imageUrl" : {
            "type" : "string",
            "maxLength" : 500,
            "pattern" : "^(?:^https://\\S+$)$",
            "description" : "图片 URL（https）"
          },
          "expireAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          },
          "count" : {
            "type" : "integer",
            "format" : "int32",
            "minimum" : 1,
            "maximum" : 20,
            "description" : "数量"
          },
          "outBizNo" : {
            "type" : "string",
            "minLength" : 1,
            "pattern" : "^(?:[\\x21-\\x7E]{1,64})$",
            "description" : "商户业务单号（幂等键，1~64 位可见 ASCII；失败用同一个单号重试）"
          },
          "reason" : {
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 100,
            "description" : "原因（写进操作记录，店铺后台可见）"
          }
        }
      },
      "IssueCoupons" : {
        "type" : "object",
        "required" : [ "templateId", "count", "outBizNo", "reason" ],
        "properties" : {
          "templateId" : {
            "type" : "string",
            "minLength" : 1,
            "description" : "券模板 ID（ctpl_…）"
          },
          "count" : {
            "type" : "integer",
            "format" : "int32",
            "minimum" : 1,
            "maximum" : 20,
            "description" : "数量"
          },
          "outBizNo" : {
            "type" : "string",
            "minLength" : 1,
            "pattern" : "^(?:[\\x21-\\x7E]{1,64})$",
            "description" : "商户业务单号（幂等键，1~64 位可见 ASCII；失败用同一个单号重试）"
          },
          "reason" : {
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 100,
            "description" : "原因（写进操作记录，店铺后台可见）"
          }
        }
      },
      "IssuedBackpackItems" : {
        "type" : "object",
        "properties" : {
          "outBizNo" : {
            "type" : "string",
            "description" : "商户业务单号（幂等键，1~64 位可见 ASCII；失败用同一个单号重试）"
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/BackpackItemView"
            },
            "description" : "列表"
          }
        }
      },
      "IssuedCoupons" : {
        "type" : "object",
        "properties" : {
          "outBizNo" : {
            "type" : "string",
            "description" : "商户业务单号（幂等键，1~64 位可见 ASCII；失败用同一个单号重试）"
          },
          "coupons" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/CouponView"
            }
          }
        }
      },
      "Labeled" : {
        "type" : "object",
        "properties" : {
          "label" : {
            "type" : "string",
            "description" : "中文含义"
          },
          "value" : {
            "description" : "值"
          }
        }
      },
      "LevelView" : {
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "等级名"
          },
          "level" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "等级序号（越大越高）"
          },
          "icon" : {
            "type" : "string",
            "description" : "等级图标 URL"
          },
          "expiresAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "到期时间（永久为 null）"
          }
        }
      },
      "Limits" : {
        "type" : "object",
        "required" : [ "todayRechargeCents", "todayGiftCents" ],
        "properties" : {
          "dailyRechargeLimitCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "dailyGiftLimitCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "singleLimitCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "todayRechargeCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "todayGiftCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          }
        }
      },
      "LoginTicketView" : {
        "type" : "object",
        "properties" : {
          "url" : {
            "type" : "string",
            "description" : "一次性登录链接（店铺 H5 地址 + #sy_ticket=…），发给会员点开即登录；只能用一次"
          },
          "expiresAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "链接过期时间（签发后 60 秒）"
          },
          "landing" : {
            "type" : "string",
            "description" : "落地页"
          }
        }
      },
      "MatchTaskView" : {
        "type" : "object",
        "required" : [ "orderCount" ],
        "properties" : {
          "matchTaskId" : {
            "type" : "string",
            "description" : "抢单任务 ID（mt_…）"
          },
          "outOrderNo" : {
            "type" : "string",
            "description" : "商户订单号（幂等键）"
          },
          "memberId" : {
            "type" : "string",
            "description" : "会员 ID（mb_…）"
          },
          "status" : {
            "type" : "string",
            "description" : "in_progress 等待陪玩抢单 / fulfilled 已抢满并生成订单 / timed_out 超时无人接 / cancelled 已撤回"
          },
          "productId" : {
            "type" : "string",
            "description" : "商品 ID（prd_…）"
          },
          "quantity" : {
            "type" : "number",
            "description" : "数量"
          },
          "orderCount" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "需要的陪玩人数（抢满生成同样数量的订单）"
          },
          "orderIds" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            },
            "description" : "订单 ID 列表（ord_…）"
          },
          "expiresAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          },
          "cancelReason" : {
            "type" : "string",
            "description" : "撤回 / 超时原因"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          },
          "updatedAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          }
        }
      },
      "Me" : {
        "type" : "object",
        "properties" : {
          "appId" : {
            "type" : "string",
            "description" : "应用 ID"
          },
          "appName" : {
            "type" : "string",
            "description" : "应用名称"
          },
          "environment" : {
            "type" : "string",
            "description" : "live 正式 / test 测试店铺"
          },
          "store" : {
            "$ref" : "#/components/schemas/Store",
            "description" : "店铺"
          },
          "scopes" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            },
            "description" : "应用拥有的权限范围"
          },
          "fundLimits" : {
            "$ref" : "#/components/schemas/Limits",
            "description" : "资金类每日上限（店铺设置；null = 不限）"
          },
          "quota" : {
            "$ref" : "#/components/schemas/Quota",
            "description" : "调用量配额"
          },
          "rateLimit" : {
            "$ref" : "#/components/schemas/RateLimit",
            "description" : "限流"
          }
        }
      },
      "MemberView" : {
        "type" : "object",
        "required" : [ "enabled" ],
        "properties" : {
          "memberId" : {
            "type" : "string",
            "description" : "会员 ID（mb_…）"
          },
          "nickname" : {
            "type" : "string",
            "description" : "昵称"
          },
          "avatarUrl" : {
            "type" : "string",
            "description" : "头像 URL"
          },
          "identities" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            },
            "description" : "consumer（老板）/ companion（陪玩），可同时有"
          },
          "phone" : {
            "type" : "string",
            "description" : "默认脱敏；应用有 members:pii 时为完整号"
          },
          "enabled" : {
            "type" : "boolean",
            "description" : "是否启用"
          },
          "externalUserRef" : {
            "type" : "string",
            "description" : "商户自己的用户 ID（可选；绑定后可用它查会员）"
          },
          "companionId" : {
            "type" : "string",
            "description" : "陪玩 ID（cpn_…）"
          },
          "registeredAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          }
        }
      },
      "MembershipView" : {
        "type" : "object",
        "properties" : {
          "memberId" : {
            "type" : "string",
            "description" : "会员 ID（mb_…）"
          },
          "growthLevel" : {
            "$ref" : "#/components/schemas/LevelView",
            "description" : "成长等级"
          },
          "paidMembership" : {
            "$ref" : "#/components/schemas/LevelView",
            "description" : "付费会员（没有为 null）"
          },
          "growthValue" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "当前成长值"
          },
          "nextLevelGrowthValue" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "升到下一级需要的成长值（已是最高级为 null）"
          }
        }
      },
      "OrderView" : {
        "type" : "object",
        "required" : [ "unitPriceCents", "originalAmountCents", "discountCents", "amountCents", "refundedCents" ],
        "properties" : {
          "orderId" : {
            "type" : "string",
            "description" : "订单 ID（ord_…）"
          },
          "outOrderNo" : {
            "type" : "string",
            "description" : "创建这笔订单时用的商户单号（不是本应用创建的为 null）"
          },
          "memberId" : {
            "type" : "string",
            "description" : "会员 ID（mb_…）"
          },
          "status" : {
            "type" : "string",
            "description" : "draft / pending_payment / paid（已冻结储值，等陪玩接单）/ dispatched / in_service / pending_settlement / completed / cancelled / after_sale / refunded"
          },
          "source" : {
            "type" : "string",
            "description" : "open_api / customer_service / self_service / companion_report"
          },
          "productId" : {
            "type" : "string",
            "description" : "商品 ID（prd_…）"
          },
          "productName" : {
            "type" : "string",
            "description" : "商品名称"
          },
          "quantity" : {
            "type" : "number",
            "description" : "数量"
          },
          "unitPriceCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "originalAmountCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "discountCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "amountCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "refundedCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "companionIds" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            },
            "description" : "陪玩 ID 列表（cpn_…）"
          },
          "matchTaskId" : {
            "type" : "string",
            "description" : "抢单任务 ID（mt_…）"
          },
          "serviceStartAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          },
          "serviceEndAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          },
          "actualStartAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          },
          "actualEndAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          },
          "remark" : {
            "type" : "string",
            "description" : "备注"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          },
          "updatedAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          }
        }
      },
      "PingResult" : {
        "type" : "object",
        "properties" : {
          "eventId" : {
            "type" : "string",
            "description" : "事件 ID（evt_…）"
          }
        }
      },
      "ProductView" : {
        "type" : "object",
        "required" : [ "unitPriceCents", "enabled", "forceAnonymous" ],
        "properties" : {
          "productId" : {
            "type" : "string",
            "description" : "商品 ID（prd_…）"
          },
          "categoryId" : {
            "type" : "string",
            "description" : "商品分类 ID（cat_…）"
          },
          "name" : {
            "type" : "string",
            "description" : "名称"
          },
          "unitPriceCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "durationHours" : {
            "type" : "number",
            "description" : "单份服务时长（小时）"
          },
          "description" : {
            "type" : "string",
            "description" : "说明"
          },
          "iconUrl" : {
            "type" : "string",
            "description" : "图标 URL"
          },
          "enabled" : {
            "type" : "boolean",
            "description" : "是否启用"
          },
          "standardServiceCount" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "标准服务数量（如时长、局数）"
          },
          "forceAnonymous" : {
            "type" : "boolean",
            "description" : "商品要求必须匿名"
          },
          "additionalServices" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/AdditionalServiceView"
            }
          }
        }
      },
      "Quota" : {
        "type" : "object",
        "required" : [ "dailyCalls", "todayCalls" ],
        "properties" : {
          "dailyCalls" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "每日调用量配额"
          },
          "todayCalls" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "今日已用调用量"
          }
        }
      },
      "RateLimit" : {
        "type" : "object",
        "required" : [ "readPerSecond", "writePerSecond" ],
        "properties" : {
          "readPerSecond" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "读接口每秒请求数上限"
          },
          "writePerSecond" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "写接口每秒请求数上限"
          }
        }
      },
      "RechargeView" : {
        "type" : "object",
        "required" : [ "amountCents", "refundedCents", "refundableCents" ],
        "properties" : {
          "rechargeId" : {
            "type" : "string",
            "description" : "充值 ID（rc_…）"
          },
          "memberId" : {
            "type" : "string",
            "description" : "会员 ID（mb_…）"
          },
          "amountCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "refundedCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "refundableCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "status" : {
            "type" : "string",
            "description" : "succeeded 已到账 / partially_refunded 部分退款 / refunded 已全额退款"
          },
          "channel" : {
            "type" : "string",
            "description" : "外部渠道"
          },
          "externalPaymentId" : {
            "type" : "string",
            "description" : "外部平台收款单号"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          }
        }
      },
      "RefundOrder" : {
        "type" : "object",
        "required" : [ "outRefundNo", "reason" ],
        "properties" : {
          "outRefundNo" : {
            "type" : "string",
            "minLength" : 1,
            "pattern" : "^(?:[\\x21-\\x7E]{1,64})$",
            "description" : "商户退款单号（幂等键）"
          },
          "amountCents" : {
            "type" : "integer",
            "format" : "int64",
            "minimum" : 1,
            "description" : "金额（分）"
          },
          "reason" : {
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 100,
            "description" : "原因（写进操作记录，店铺后台可见）"
          }
        }
      },
      "RefundView" : {
        "type" : "object",
        "required" : [ "amountCents" ],
        "properties" : {
          "refundId" : {
            "type" : "string",
            "description" : "充值退款 ID（rf_…）"
          },
          "rechargeId" : {
            "type" : "string",
            "description" : "充值 ID（rc_…）"
          },
          "memberId" : {
            "type" : "string",
            "description" : "会员 ID（mb_…）"
          },
          "amountCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "externalRefundId" : {
            "type" : "string",
            "description" : "外部平台退款单号（幂等键）"
          },
          "reason" : {
            "type" : "string",
            "description" : "原因（写进操作记录，店铺后台可见）"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          }
        }
      },
      "RegisteredView" : {
        "type" : "object",
        "required" : [ "created" ],
        "properties" : {
          "member" : {
            "$ref" : "#/components/schemas/MemberView",
            "description" : "会员"
          },
          "created" : {
            "type" : "boolean",
            "description" : "true = 本次新注册；false = 手机号已是会员，返回已有会员"
          }
        }
      },
      "ReverseGift" : {
        "type" : "object",
        "properties" : {
          "reason" : {
            "type" : "string",
            "maxLength" : 100,
            "description" : "原因（写进操作记录，店铺后台可见）"
          },
          "allowNegative" : {
            "type" : "boolean",
            "description" : "储值不够扣时是否允许扣成负数（默认 false → 409 INSUFFICIENT_BALANCE）"
          }
        }
      },
      "ReviewApplication" : {
        "type" : "object",
        "required" : [ "stage", "approved" ],
        "properties" : {
          "stage" : {
            "type" : "string",
            "minLength" : 1,
            "enum" : [ "recruit", "examiner", "invigilator" ],
            "description" : "recruit 招募 / examiner 考官 / invigilator 监考，必须等于申请当前所处阶段"
          },
          "approved" : {
            "type" : "boolean",
            "description" : "是否通过"
          },
          "opinion" : {
            "type" : "string",
            "maxLength" : 200,
            "description" : "审核意见"
          },
          "assessment" : {
            "type" : "string",
            "maxLength" : 1000,
            "description" : "战绩或考核（图片 OSS ID，逗号分隔，可空）"
          }
        }
      },
      "ReviewView" : {
        "type" : "object",
        "required" : [ "approved" ],
        "properties" : {
          "summary" : {
            "type" : "string",
            "description" : "摘要"
          },
          "approved" : {
            "type" : "boolean",
            "description" : "是否通过"
          },
          "opinion" : {
            "type" : "string",
            "description" : "审核意见"
          },
          "operator" : {
            "type" : "string",
            "description" : "操作人"
          },
          "reviewedAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          }
        }
      },
      "SendCode" : {
        "type" : "object",
        "required" : [ "phone", "scene" ],
        "properties" : {
          "phone" : {
            "type" : "string",
            "minLength" : 1,
            "description" : "手机号（11 位中国大陆手机号）"
          },
          "scene" : {
            "type" : "string",
            "minLength" : 1,
            "description" : "你自己的场景标识（如 bind_account），小写字母数字下划线"
          }
        }
      },
      "Sent" : {
        "type" : "object",
        "properties" : {
          "verificationId" : {
            "type" : "string",
            "description" : "验证码发送记录 ID，校验时传回"
          },
          "expiresAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          }
        }
      },
      "Store" : {
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "名称"
          },
          "h5Url" : {
            "type" : "string",
            "description" : "店铺 H5 地址"
          }
        }
      },
      "SubmitApplication" : {
        "type" : "object",
        "required" : [ "memberId", "externalRef" ],
        "properties" : {
          "memberId" : {
            "type" : "string",
            "minLength" : 1,
            "description" : "会员 ID（mb_…）"
          },
          "fields" : {
            "type" : "object",
            "additionalProperties" : { },
            "description" : "申请资料：只接受「申请表单」里登记过的 key（如 realNameInfo、wechat、jobType…）； type 为 file_ids 的字段传 fileId 数组，如 {"
          },
          "skillCertIds" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "minLength" : 1
            },
            "maxItems" : 20,
            "description" : "证书 ID 列表（cert_…）"
          },
          "externalRef" : {
            "type" : "string",
            "minLength" : 1,
            "pattern" : "^(?:[\\x21-\\x7E]{1,64})$",
            "description" : "商户的招聘单号（幂等键）；驳回后重提用新的 externalRef"
          }
        }
      },
      "SummaryCoupon" : {
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "名称"
          },
          "expiresAt" : {
            "type" : "string",
            "description" : "时间（RFC 3339）"
          }
        }
      },
      "SummaryItem" : {
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "名称"
          },
          "expiresAt" : {
            "type" : "string",
            "description" : "时间（RFC 3339）"
          }
        }
      },
      "SummaryView" : {
        "type" : "object",
        "description" : "给 AI 的摘要：字段精简、带中文 label",
        "properties" : {
          "memberId" : {
            "type" : "string",
            "description" : "会员 ID（mb_…）"
          },
          "availableBalanceCents" : {
            "$ref" : "#/components/schemas/Labeled",
            "description" : "金额（分）"
          },
          "frozenBalanceCents" : {
            "$ref" : "#/components/schemas/Labeled",
            "description" : "金额（分）"
          },
          "availableCouponCount" : {
            "$ref" : "#/components/schemas/Labeled"
          },
          "couponsExpiringSoon" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/SummaryCoupon"
            }
          },
          "pendingBackpackItemCount" : {
            "$ref" : "#/components/schemas/Labeled"
          },
          "latestBackpackItems" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/SummaryItem"
            }
          },
          "memberLevel" : {
            "$ref" : "#/components/schemas/Labeled"
          },
          "growthToNextLevel" : {
            "$ref" : "#/components/schemas/Labeled"
          },
          "generatedAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          }
        }
      },
      "UpdateCompanion" : {
        "type" : "object",
        "description" : "只传要改的字段",
        "properties" : {
          "status" : {
            "type" : "string",
            "enum" : [ "enabled", "disabled" ],
            "description" : "状态"
          },
          "tagIds" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "minLength" : 1
            },
            "maxItems" : 30,
            "description" : "标签 ID 列表（tag_…）"
          }
        }
      },
      "UpdateWebhook" : {
        "type" : "object",
        "properties" : {
          "url" : {
            "type" : "string",
            "maxLength" : 512,
            "description" : "地址"
          },
          "eventTypes" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "minLength" : 1
            },
            "maxItems" : 50,
            "description" : "订阅的事件类型；[\"*\"] = 全部"
          },
          "description" : {
            "type" : "string",
            "maxLength" : 100,
            "description" : "说明"
          },
          "enabled" : {
            "type" : "boolean",
            "description" : "是否启用"
          }
        }
      },
      "Verified" : {
        "type" : "object",
        "required" : [ "verified" ],
        "properties" : {
          "verified" : {
            "type" : "boolean",
            "description" : "是否校验通过"
          },
          "phone" : {
            "type" : "string",
            "description" : "手机号（11 位中国大陆手机号）"
          },
          "memberId" : {
            "type" : "string",
            "description" : "本店已有该手机号的会员时一并返回（mb_…）"
          }
        }
      },
      "VerifyCode" : {
        "type" : "object",
        "required" : [ "code" ],
        "properties" : {
          "code" : {
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 10,
            "description" : "验证码"
          }
        }
      },
      "VoidCoupon" : {
        "type" : "object",
        "properties" : {
          "reason" : {
            "type" : "string",
            "maxLength" : 100,
            "description" : "原因（写进操作记录，店铺后台可见）"
          }
        }
      },
      "WalletTxnView" : {
        "type" : "object",
        "required" : [ "amountCents", "balanceBeforeCents", "balanceAfterCents" ],
        "properties" : {
          "transactionId" : {
            "type" : "string",
            "description" : "储值流水 ID（txn_…）"
          },
          "type" : {
            "type" : "string",
            "description" : "业务类型码（稳定，可编程判断）：BALANCE_RECHARGE 充值 / ORDER_CONSUME 订单消费 / ORDER_REFUND 订单退款 / RECHARGE_REFUND 充值退款 / SYSTEM_REWARD 赠送 / AFTERSALE_GIFT 售后赠金 / ACTIVITY_REBATE 活动返利 / INCOME_REVERSAL 冲销 / MEMBERSHIP_PURCHASE 会员购买 等"
          },
          "typeLabel" : {
            "type" : "string",
            "description" : "业务类型中文名"
          },
          "amountCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "变动金额（分），增加为正、减少为负"
          },
          "balanceBeforeCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "balanceAfterCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "subject" : {
            "type" : "string",
            "description" : "流水标题"
          },
          "description" : {
            "type" : "string",
            "description" : "说明"
          },
          "orderId" : {
            "type" : "string",
            "description" : "关联订单（没有为 null）（ord_…）"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          }
        }
      },
      "WalletView" : {
        "type" : "object",
        "required" : [ "balanceCents", "frozenCents", "availableCents", "creditLimitCents" ],
        "properties" : {
          "memberId" : {
            "type" : "string",
            "description" : "会员 ID（mb_…）"
          },
          "balanceCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "frozenCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "availableCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          },
          "creditLimitCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "金额（分）"
          }
        }
      },
      "WebhookView" : {
        "type" : "object",
        "properties" : {
          "webhookId" : {
            "type" : "string",
            "description" : "通知地址 ID（wh_…）"
          },
          "url" : {
            "type" : "string",
            "description" : "地址"
          },
          "eventTypes" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            },
            "description" : "订阅的事件类型；[\"*\"] = 全部"
          },
          "description" : {
            "type" : "string",
            "description" : "说明"
          },
          "status" : {
            "type" : "string",
            "description" : "enabled / disabled / auto_disabled（连续 3 天全部失败被系统停用）"
          },
          "consecutiveFailures" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "连续投递失败次数（成功一次清零；连续失败 3 天自动停用）"
          },
          "secret" : {
            "type" : "string",
            "description" : "只在创建和轮换时返回"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "时间（RFC 3339）"
          }
        }
      }
    }
  }
}
