Skip to main content

URL request

This request is used to redirect from Theca internal tracking URLs to the actual target URL. All URLs on the items in a search result list that the user can click on are replaced with these URLs. As such, there is normally no need to manually call this request from code. Instead, the URLs should just be added with links in the UI, i.e., <a> tags. Note that the request is accessible for end-users without setting Theca-Client-Token.

When the product results are reordered from the original listing we ask you to modify the URL with a query parameter that reflects the update. The query parameter rp should be set to the index of the new position of the product. For example, if an item returned from Theca was originally at position 1, but after reordering in the front-end to 3rd position the rp-parameter should be 2.

HTTP format

GET https://api.theca.com/v1/url

Query parameters

ParameterTypeDescription
rpInteger?Position of the Product in the ResultList. When reordering the results then this should reflect the new order of the item. Otherwise, this parameter is not needed.
caution

The tracking URLs returned by Theca do not normally have query parameters. However, if the UTM settings in use by the receiving target of the tracking URL include the search query as e.g. utm_term, then the query will be included as a query parameter in the tracking URLs. As such, it might not be sufficient to simply append ?rp=$index to the tracking URLs (it should be &rp=$index in this case).

Example requests

GET https://api.theca.com/v1/url/xxxxxxxxxxxx

HTTP/1.1 301 Redirect
Connection: close
Location: https://external-url.com/product/123abc