You can perform operations on the /gsadmin/v1/cloud/redirects/redirect-group/redirect-entry-name endpoint to get, create, modify, and replace redirect-entry object configuration.
Redirect-entry object attributes
The following table lists the attributes of redirect-entry objects.
Attribute | Required? | Type | Description |
|---|---|---|---|
| yes | String |
Note: One or more |
| yes | String | Phrases to be compared with search terms entered by shoppers. When matches occur between |
| yes | String | The type of match between the specified
|
| yes | String | The URL to which users are redirected when a search term entered by a shopper matches a |
| no | Boolean | Determines whether the system considers the stems of search terms (for example, “box” the stem of “boxes”) when constructing keyword redirects. |
| no | object | A system-generated attribute. Do not delete or modify. |
Export redirect-entry object configuration in ZIP format
Use an endpoint of the following form to export configuration of a redirect-entry object in ZIP format:
GET /gsadmin/v1/cloud/redirects/redirect-group-name/redirect-entry-name.ZIP
The ZIP file in which the configuration is downloaded contains a file named _.json that contains the configuration of the redirect-entry object.
Export redirect-entry object configuration in JSON format
Use an endpoint of the following form to export configuration of a redirect-entry object in JSON format:
GET /gsadmin/v1/cloud/redirects/redirect-group-nameFor example, the following endpoint exports the configuration of a redirect-entry object named ID3:
GET /gsadmin/v1/cloud/redirects/Default/ID3
The following JSON content illustrates configuration of a redirect-entry object that can be exported by the endpoint above:
{
"ecr:type": "redirect-entry",
"searchTerms": "fujifilm",
"matchmode": "MATCHEXACT",
"url": "/browse/Fujifilm/_/N-1z141wh",
"searchTermExpansions": {"0": {"fujifilm": ["fujifilm"]}}
}Create a redirect-entry object
In JSON or ZIP format, use the following endpoint to configure a specified redirect-entry object in a specified redirect-group object:
POST /gsadmin/v1/cloud/redirect/redirect-group-name/redirect-entry-name
For example, the following endpoint configures a redirect-entry object named id3 in a redirect-group named Default:
POST /gsadmin/v1/cloud/redirect/Default/id3
The following code illustrates the configuration of a redirect-entry object that can be input to an endpoint in either ZIP or JSON format:
{
"ecr:type": "redirect-entry",
"searchTerms": "fujifilm",
"matchmode": "MATCHEXACT",
"url": "/browse/Fujifilm/_/N-1z141wh"
}Modify a redirect-entry
In JSON format, you can use the following endpoint to modify the configuration of a specified redirect-entry object in a specified redirect-group object:
PATCH /gsadmin/v1/cloud/redirects/redirect-group-name/redirect-entry-name
Note: The PATCH method cannot be used in ZIP format.
For example, the following endpoint modifies a redirect-entry object named id3 in a redirect-group object named Products:
PATCH /gsadmin/v1/cloud/redirects/Products/id3
The endpoint above can use JSON content such as the following to add or modify the redirect-entry object named id3:
{
"ecr:type": "redirect-entry",
"url": "/browse/Fujifilm/_/N-1z141wh"
}
