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>",
]
}
}
}
AttributeTypeDescription
redirectobjectObject containing information about the match.
redirect.dataobjectObject containing the target URL together with any metadata defined in the redirect rule.
redirect.matched_termsList[string]A list of all the terms in the redirect match definition that matched the search query.
redirect.user_segmentsList[string]A list of all the user segmentes in the redirect match definition that matched the search query.