{
  "module": {
    "module": "OpenAPI 接口",
    "moduleKey": "openapi"
  },
  "api": {
    "title": "检查无状态会员有效性",
    "method": "POST",
    "path": "/openapi/stateless-members/check",
    "description": "检查无状态会员是否还有效，通过X-Member-Key header中的混合JWT解密得到密钥，校验会员状态、过期时间、系统支持等，返回剩余天数。",
    "requestParams": {
      "headers": [
        {
          "name": "X-Member-Key",
          "type": "string",
          "required": true,
          "description": "会员密钥令牌，通过混合JWT加密"
        },
        {
          "name": "X-System-Code",
          "type": "string",
          "required": true,
          "description": "系统编码，用于判断会员类型是否支持当前系统"
        },
        {
          "name": "X-Site",
          "type": "string",
          "required": true,
          "description": "站点标识"
        }
      ]
    },
    "responseExample": {
      "success": {
        "code": "0000",
        "message": "校验通过",
        "data": {
          "valid": true,
          "remainingDays": 30,
          "member": {
            "id": "xxx",
            "code": "SM0001",
            "name": "无状态会员",
            "memberTypeId": "yyy",
            "effectiveDate": "2025-01-01",
            "validityDays": 365
          }
        }
      },
      "failure": {
        "code": "1506",
        "message": "您绑定的会员无效",
        "data": null
      },
      "failureExpired": {
        "code": "1505",
        "message": "传入的会员需要重新绑定",
        "data": null
      },
      "failureMemberExpired": {
        "code": "1507",
        "message": "会员已过期",
        "data": null
      }
    },
    "notes": [
      "如果X-Member-Key的JWT解析已过期，返回错误：传入的会员需要重新绑定",
      "判断无状态密钥是否存在且有效",
      "关联会员类型记录是否存在且有效，不存在或无效返回：您绑定的会员无效",
      "判断是否过期，已过期返回：会员已过期",
      "通过X-System-Code判断会员类型是否支持当前系统，不支持返回：当前会员码不支持当前系统",
      "返回会员还有多少天到期（基于会员有效期、当天日期、会员生效日期计算剩余时间按天计）",
      "不满足条件返回：您绑定的会员码无效"
    ]
  }
}