---
title: "Get a list of redirect"
description: "Query redirection list"
doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-rest-api/online-store/redirect/get-a-list-of-redirect'
  md: 'https://developer.shopline.com/docs/admin-rest-api/online-store/redirect/get-a-list-of-redirect.md'
---
# Get a list of redirect

Query redirection list

- **Base URL:** `https://{handle}.myshopline.com/admin/openapi`
- **Required Scopes:** `write_content`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** RESTful

## Endpoint

```http
GET /redirects/redirect.json
```

## Base URL

* `https://{handle}.myshopline.com/admin/openapi`

  * `{handle}`: `handle` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` .

## Required Permissions

* `write_content`

## Request

### Query Parameters

* `limit`

  integer (optional)

  Specify return number of results , default value is 50

* `path`

  string (optional)

  The source path to be redirected.

* `since_id`

  string (optional)

  The specify specifically redirect the id , return all the redirect results after the id , non-required

* `target`

  string (optional)

  The target path where the user will be redirected.

### Request Headers

* `Content-Type`

  string (required)

  The field must be set to the fixed value `application/json; charset=utf-8`.

* `Authorization`

  string (required)

   The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. 

## Response

### Status Codes

* `200`

  For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).

* `401`

  

* `429`

  

### Response Headers

* `traceId`

  A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.

### Response Body

#### 200

* `redirects`

  array<object>

  Redirect information

  * `id`

    string

    redirect id

  * `path`

    string

    The source path to be redirected.

  * `target`

    string

    The target path where the user will be redirected.

  * `updated_at`

    string

    update time

  * `create_at`

    string

    create time


#### 401

* `errors`

  string

  Error message. 


#### 429

* `errors`

  string

  Error message. 


## OpenAPI Definition

```json
{
  "description": "Query redirection list",
  "externalDocs": {
    "description": "Permission point used by the interface is `write_content` , For more information about the use of permission points, see",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=en",
    "errorTableDescription": ""
  },
  "operationId": "MjGMUW0A",
  "parameters": [
    {
      "name": "limit",
      "in": "query",
      "description": "Specify return number of results , default value is 50",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "limit",
        "description": "Specify return number of results , default value is 50",
        "type": "integer",
        "example": 50
      },
      "example": 50
    },
    {
      "name": "path",
      "in": "query",
      "description": "The source path to be redirected.",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "path",
        "description": "The source path to be redirected.",
        "type": "string",
        "example": "/products/A"
      },
      "example": "/products/A",
      "examples": {
        "Query redirect listing-specify path": {
          "value": "/products/A"
        }
      }
    },
    {
      "name": "since_id",
      "in": "query",
      "description": "The specify specifically redirect the id , return all the redirect results after the id , non-required",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "since_id",
        "description": "The specify specifically redirect the id , return all the redirect results after the id , non-required",
        "type": "string",
        "example": "62f372efcb98825e786f4196"
      },
      "example": "62f372efcb98825e786f4196",
      "examples": {
        "Query redirect listing-achieve page turning capabilities with since_id": {
          "value": "63a94fc5609552261f008296"
        }
      }
    },
    {
      "name": "target",
      "in": "query",
      "description": "The target path where the user will be redirected.",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "target",
        "description": "The target path where the user will be redirected.",
        "type": "string",
        "example": "/products/B"
      },
      "example": "/products/B"
    },
    {
      "name": "Content-Type",
      "in": "header",
      "description": "The field must be set to the fixed value `application/json; charset=utf-8`.",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": " The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. ",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": " The access token for the API. Please refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then put the obtained access token into the API request header in Bearer Token.",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "responses": {
    "200": {
      "description": "For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).",
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "redirects": {
                "name": "redirects",
                "description": "Redirect information",
                "type": "array",
                "items": {
                  "name": "redirects",
                  "description": "Redirect information",
                  "type": "object",
                  "properties": {
                    "id": {
                      "name": "id",
                      "description": "redirect id",
                      "type": "string",
                      "example": "62f372efcb98825e786f4196"
                    },
                    "path": {
                      "name": "path",
                      "description": "The source path to be redirected.",
                      "type": "string",
                      "example": "/products/A"
                    },
                    "target": {
                      "name": "target",
                      "description": "The target path where the user will be redirected.",
                      "type": "string",
                      "example": "/products/B"
                    },
                    "updated_at": {
                      "name": "updated_at",
                      "description": "update time",
                      "type": "string",
                      "example": "2021-08-31T02:20:26+08:00"
                    },
                    "create_at": {
                      "name": "create_at",
                      "description": "create time",
                      "type": "string",
                      "example": "2021-08-31T02:20:26+08:00"
                    }
                  },
                  "example": {
                    "id": "62f372efcb98825e786f4196",
                    "path": "/products/A",
                    "target": "/products/B",
                    "updated_at": "2021-08-31T02:20:26+08:00",
                    "create_at": "2021-08-31T02:20:26+08:00"
                  }
                },
                "example": [
                  {
                    "create_at": "2021-08-31T02:20:26+08:00",
                    "id": "62f372efcb98825e786f4196",
                    "path": "/products/A",
                    "target": "/products/B",
                    "updated_at": "2021-08-31T02:20:26+08:00"
                  }
                ]
              }
            },
            "example": {
              "redirects": [
                {
                  "updated_at": "2021-08-31T02:20:26+08:00",
                  "create_at": "2021-08-31T02:20:26+08:00",
                  "id": "62f372efcb98825e786f4196",
                  "path": "/products/A",
                  "target": "/products/B"
                }
              ]
            }
          },
          "examples": {
            "Query redirect listing-specify path": {
              "value": {
                "redirects": [
                  {
                    "create_at": "2022-12-26T15:59:47+08:00",
                    "id": "63a95473609552261f00942c",
                    "path": "/products/A",
                    "target": "/products/B",
                    "updated_at": "2022-12-26T16:22:33+08:00"
                  }
                ]
              }
            },
            "Get a list of redirect": {
              "value": {
                "redirects": [
                  {
                    "updated_at": "2023-09-22T15:27:06+08:00",
                    "create_at": "2023-09-22T15:27:06+08:00",
                    "id": "650d41ca6efcc96ac04fc1b6",
                    "path": "/products/A",
                    "target": "/products/B"
                  },
                  {
                    "path": "/products/C",
                    "target": "/products/D",
                    "updated_at": "2023-09-22T16:27:38+08:00",
                    "create_at": "2023-09-22T16:27:38+08:00",
                    "id": "650d4ffa1aa1492e59271622"
                  }
                ]
              }
            },
            "Query redirect listing-achieve page turning capabilities with since_id": {
              "value": {
                "redirects": [
                  {
                    "path": "/products/A",
                    "target": "/products/B",
                    "updated_at": "2022-12-26T16:22:33+08:00",
                    "create_at": "2022-12-26T15:59:47+08:00",
                    "id": "63a95473609552261f00942c"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "get",
  "path": "/redirects/redirect.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`handle` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` ."
        }
      }
    }
  ],
  "info": {
    "title": "Get a list of redirect",
    "version": "v20270301"
  },
  "authIndexes": [
    "write_content"
  ]
}
```