Version: 202201
Create Redirect
POST/openapi/2022-01/redirects
Create a new url redirect with the provided details.
Request
- application/json
- Body
- Example
Body
from_urlstringrequired
Original URL, for example: /collections/hot-selling
redirect_urlstringrequired
Redirected URL, for example: /collections/test1567
statusstringrequired
The status of the redirect:
- open: available
- close: unavailable
Default value:
open{
"from_url": "string",
"redirect_url": "string",
"status": "open"
}
Responses
- 200
- 422
200
- application/json
- Schema
- Example
- Result
Schema
idinteger
Default value:
0Example:
373043233132924740store_idinteger
Default value:
0Example:
633130statusstring
Example:
openfrom_urlstring
Example:
/collections/hot-sellingredirect_urlstring
Example:
/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
- Schema
- Example
- Result
Schema
errorsstring[]
{
"errors": [
"Path has already been take"
]
}
{
"errors": [
"Path has already been take"
]
}