The REST Admin API is a legacy API as of October 1, 2024. All apps and integrations should be built with the GraphQL Admin API. For details and migration steps, visit our migration guide.
Requires
content
access scope.
A redirect causes a visitor on a specific path on the shop's site to be automatically sent to a different location, called the target. The target can be a new path on the shop's site or a full URL. The new URL can even be on a completely different domain. Redirect paths are unique, so a shop can't have more than one redirect with the same path.
Was this section helpful?
Properties
The ID for the redirect.
path
->path
The old path to be redirected. When the user visits this path, they will be redirected to the target. (maximum: 1024 characters)
target
->target
The target location where the user will be redirected. When the user visits the old path specified by the
path
property, they will be redirected to this location. This property can be set to any path on the shop's site, or to an external URL. (maximum: 255 characters)Was this section helpful?
Creates a redirect. When you provide a full URL as the value of the
path
property, it will be saved as an absolute path without the domain.
For example, "path": "http://www.example.com/springwear"
will be saved as "path": "springwear"
.api_version
string
required
Was this section helpful?
Request body
Redirect resource
Was this section helpful?
Retrieves a list of URL redirects. Note: This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to Make paginated requests to the REST Admin API.
api_version
string
required
fields
Show only certain fields, specified by a comma-separated list of field names.
limit
≤ 250
default 50
The maximum number of results to show.
path
Show redirects with a given path.
since_id
Restrict results to after the specified ID.
target
Show redirects with a given target.
Was this section helpful?
Query parameters
Restrict results to after the specified ID.
Was this section helpful?
Retrieves a single redirect
api_version
string
required
redirect_id
string
required
fields
Show only certain fields, specified by a comma-separated list of field names.
Was this section helpful?
Path parameters
string
required
Was this section helpful?
Retrieves a count of URL redirects
api_version
string
required
path
Count redirects with given path.
target
Count redirects with given target.
Was this section helpful?
Was this section helpful?
Updates an existing [redirect](https://shopify.dev/api/admin-rest/latest/resources/redirect)
api_version
string
required
redirect_id
string
required
Was this section helpful?
Path parameters
string
required
Request body
Redirect resource
Was this section helpful?
Deletes a redirect
api_version
string
required
redirect_id
string
required
Was this section helpful?
Path parameters
string
required
Was this section helpful?