The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the GraphQL Admin API. For details and migration steps, visit our migration guide.
Redirect
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.
Endpoints
- post/admin/api/latest/redirects.
json Creates a redirect - get/admin/api/latest/redirects.
json?since_ id=668809255 Retrieves a list of URL redirects - get/admin/api/latest/redirects/{redirect_
id}. json Retrieves a single redirect - get/admin/api/latest/redirects/count.
json Retrieves a count of URL redirects - put/admin/api/latest/redirects/{redirect_
id}. json Updates an existing redirect - del/admin/api/latest/redirects/{redirect_
id}. json Deletes a redirect
The Redirect resource
Properties
The ID for the redirect.
The old path to be redirected. When the user visits this path, they will be redirected to the target. (maximum: 1024 characters)
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)
The Redirect resource
Anchor to POST request, Creates a redirectpostCreates a redirect
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"
.
Create a redirect
Create a redirect
Show redirect properties
The old path to be redirected. When the user visits this path, they will be redirected to the target. (maximum: 1024 characters)
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)
Create a redirect using a full URL for the path, which will be saved as an absolute path without a domain
Create a redirect using a full URL for the path, which will be saved as an absolute path without a domain
Show redirect properties
The old path to be redirected. When the user visits this path, they will be redirected to the target. (maximum: 1024 characters)
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)
Creating a redirect without a path or target fails and returns an error
Creating a redirect without a path or target fails and returns an error
/admin/api/2025-07/redirects. json
Response
Anchor to GET request, Retrieves a list of URL redirectsgetRetrieves a list of URL redirects
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.
Show only certain fields, specified by a comma-separated list of field names.
The maximum number of results to show.
Show redirects with a given path.
Restrict results to after the specified ID.
Show redirects with a given target.
Retrieve a list of URL redirects after a specified ID
Retrieve a list of URL redirects after a specified ID
Restrict results to after the specified ID.
Retrieve a list of all redirects
Retrieve a list of all redirects
/admin/api/2025-07/redirects. json?since_ id= 668809255
Response
Anchor to GET request, Retrieves a single redirectgetRetrieves a single redirect
Retrieves a single redirect
Show only certain fields, specified by a comma-separated list of field names.
Retrieve a single redirect by its ID
Retrieve a single redirect by its ID
/admin/api/2025-07/redirects/668809255. json
Response
Anchor to GET request, Retrieves a count of URL redirectsgetRetrieves a count of URL redirects
Retrieves a count of URL redirects
Count redirects with given path.
Count redirects with given target.
Count all redirects
Count all redirects
/admin/api/2025-07/redirects/count. json
Response
Anchor to PUT request, Updates an existing redirectputUpdates an existing redirect
Updates an existing redirect
Update both the source (path) and target URIs of a redirect
Update both the source (path) and target URIs of a redirect
Show redirect properties
The ID for the redirect.
The old path to be redirected. When the user visits this path, they will be redirected to the target. (maximum: 1024 characters)
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)
Update the source (path) URI of a redirect
Update the source (path) URI of a redirect
Show redirect properties
The ID for the redirect.
The old path to be redirected. When the user visits this path, they will be redirected to the target. (maximum: 1024 characters)
Update the target URI of a redirect
Update the target URI of a redirect
Show redirect properties
The ID for the redirect.
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)
/admin/api/2025-07/redirects/950115854. json
Response
Anchor to DELETE request, Deletes a redirectdelDeletes a redirect
Deletes a redirect
Delete an existing redirect
Delete an existing redirect