菜单

新增店铺

创建一个新的店铺记录,支持常用字段别名,未识别的字段会按原样透传给店铺新增接口。

基本信息

Path: /createEnv

Method: POST

请求参数

参数名 类型 必填 说明 示例
method string 固定为 createEnv createEnv
storeName string 环境/店铺名称。也兼容别名 name Outlook 账号环境
platform string 二级平台/站点名称。 Outlook邮箱
storeUrl string 平台登录地址,建议取 sites[].siteUrl。Outlook 使用 https://login.live.com/ https://login.live.com/
platformType number/string 创建/编辑表单类型:官方内置平台传 1,自定义平台传 2。注意:这里不是 queryEnvV2 的平台筛选 ID。 1
actualPlatform string 一级平台名称,取 platform-hierarchy.json 的 platformName。创建已知站点时可省略。 邮箱
storeAccount string 登录账号。也兼容别名 username user@example.com
storePassword string 登录密码。也兼容别名 password password
tagIdList array 标签 ID 列表。 []
lockAccount string/boolean 账号锁定标记,建议按前端表单传 N/Y N
initPlatform array 前端表单辅助字段,最小请求不需要。 ["邮箱", "Outlook邮箱"]

补充说明

接口内部会把 name 转成 storeName,把 username 转成 storeAccount,把 password 转成 storePassword

后端返回 code=200code=104001 时都会按成功处理。

请求示例

{
  "method": "createEnv",
  "storeName": "Outlook 账号环境",
  "platform": "Outlook邮箱",
  "storeAccount": "user@example.com",
  "storePassword": "password",
  "storeUrl": "https://login.live.com/",
  "tagIdList": [],
  "platformType": 1,
  "lockAccount": "N"
}

成功返回示例

{
  "method": "createEnv",
  "response": {
    "code": 200,
    "msg": "success",
    "storeId": 10001,
    "data": 10001
  }
}

返回字段

字段 类型 说明
response.code number 200104001 表示创建成功。
response.msg string 后端返回提示。
response.storeId number/string 新建店铺 ID。
response.data any 后端原始返回数据。

失败返回示例

{
  "method": "createEnv",
  "status": "error",
  "code": "400",
  "msg": "create env failed"
}
上一个
新版店铺查询
下一个
编辑店铺信息
最近修改: 2026-06-22Powered by