版本:202201
创建 URL 重定向
POST/openapi/2022-01/redirects
使用提供的详情创建新的 URL 重定向规则。
请求
- application/json
- 请求体
- 示例
请求体
from_urlstring必填
Original URL, for example: /collections/hot-selling
redirect_urlstring必填
Redirected URL, for example: /collections/test1567
statusstring必填
The status of the redirect:
- open: available
- close: unavailable
默认值:
open{
"from_url": "string",
"redirect_url": "string",
"status": "open"
}
响应
- 200
- 422
200
- application/json
- 数据结构
- 示例
- Result
数据结构
idinteger
默认值:
0示例:
373043233132924740store_idinteger
默认值:
0示例:
633130statusstring
示例:
openfrom_urlstring
示例:
/collections/hot-sellingredirect_urlstring
示例:
/collections/test1567{
"id": 373043233132924740,
"store_id": 633130,
"status": "open",
"from_url": "/collections/hot-selling",
"redirect_url": "/collections/test1567"
}
{
"id": 373043233132924740,
"store_id": 633130,
"status": "open",
"from_url": "/collections/hot-selling",
"redirect_url": "/collections/test1567"
}
422
- application/json
- 数据结构
- 示例
- Result
数据结构
errorsstring[]
{
"errors": [
"Path has already been take"
]
}
{
"errors": [
"Path has already been take"
]
}