Redirect structure
When a search query matches any redirect rule previously configured using the redirect rules endpoint, then the response uses the redirect structure with the following attributes:
Redirect structure
{
"request": {
...
},
"response": {
"redirect": {
"data": {
"url": "<url>"
},
"matched_terms": [
"<a term>",
"<another term>",
],
"matched_user_segments": [
"<a segment>",
"<another segment>",
]
}
}
}
Attribute | Type | Description |
---|---|---|
redirect | object | Object containing information about the match. |
redirect.data | object | Object containing the target URL together with any metadata defined in the redirect rule. |
redirect.matched_terms | List[string] | A list of all the terms in the redirect match definition that matched the search query. |
redirect.user_segments | List[string] | A list of all the user segments in the redirect match definition that matched the search query. |