创建一个新的店铺记录,支持常用字段别名,未识别的字段会按原样透传给店铺新增接口。
基本信息
Path: /createEnv
Method: POST
请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
storeName / name |
string | 是 | 店铺名称。 |
platform |
string | 否 | 平台或站点值。传 platformPath 时会自动取最后一级作为 platform。 |
actualPlatform |
string | 否 | 平台名称,例如 Amazon。 |
platformType |
number | 否 | 平台类型,不传时根据 actualPlatform 自动推断。 |
storeAccount / username |
string | 否 | 店铺账号。 |
storePassword / password |
string | 否 | 店铺密码。 |
storeUrl |
string | 否 | 店铺登录地址或后台地址。 |
tagIdList |
array | 否 | 店铺标签 ID 列表。 |
lockAccount |
boolean | 否 | 是否锁定账号。 |
补充说明
接口内部会把 name 转成 storeName,把 username 转成 storeAccount,把 password 转成 storePassword。
后端返回 code=200 或 code=104001 时都会按成功处理。
请求示例
{
"method": "createEnv",
"storeName": "test-store",
"platform": "US",
"actualPlatform": "Amazon",
"platformType": 1,
"storeAccount": "seller@example.com",
"storePassword": "password",
"storeUrl": "https://sellercentral.amazon.com",
"tagIdList": [],
"lockAccount": false
}
成功返回示例
{
"method": "createEnv",
"response": {
"code": 200,
"msg": "success",
"storeId": 10001,
"data": 10001
}
}
返回字段
| 字段 | 类型 | 说明 |
|---|---|---|
response.code |
number | 200 或 104001 表示创建成功。 |
response.msg |
string | 后端返回提示。 |
response.storeId |
number/string | 新建店铺 ID。 |
response.data |
any | 后端原始返回数据。 |
失败返回示例
{
"method": "createEnv",
"status": "error",
"code": "400",
"msg": "create env failed"
}