younifyd
Menu

Get Redirects

Get Redirects

GET/storefront/redirects

Use it in a workflow

  1. Add a step and choose the BigCommerce Content connector.
  2. Pick the Get Redirects action (under Redirects).
  3. Fill in the fields below, then reference the result from later steps as {{getRedirects.response.data}}.

Request

Query parameters

site_idinteger

Filters items by `site_id`.

id:inarray<string>

Filters items by redirect `id`. Also accepts comma-separated values to filter for multiple redirects.

limitinteger

Controls the number of items to return per page.

pageinteger

Specifies the page number in a limited (paginated) list of items. Used to paginate large collections.

sortstring

Field name to sort by. Note: Since redirect `id` increments when new redirects are added, you can use that field to sort by redirect create date.

One offrom_pathtypesite_idid

directionstring

Sort direction. Acceptable values are `asc`, `desc`.

One ofascdesc

includestring

Indicates whether to include redirect sub-resources. Only `to_url` is supported.

One ofto_url

keywordstring

Filters redirects by the specified keyword. Will only search from the beginning of a URL path. For example, `blue` will match `/blue` and `/blue-shirt` , **not** `/royal-blue-shirt`.

Headers

Acceptstringrequired

The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

Default "application/json"

Response

Returns 200 with an object. Read it in later steps with {{getRedirects.response.data.<field>}}.

dataarray<object>
idinteger
site_idinteger
from_pathstring
toobject3 fields
to_urlstring (uri)

Full destination URL for the redirect. Must be explicitly included via URL parameter.

metaobject
paginationobject6 fields
json
{
  "data": [
    {
      "id": 0,
      "site_id": 0,
      "from_path": "/old-url",
      "to": {
        "type": "product",
        "entity_id": 0,
        "url": "/new-url/"
      },
      "to_url": "https://store-domain.com/new-url"
    }
  ],
  "meta": {
    "pagination": {
      "total": 246,
      "count": 5,
      "per_page": 5,
      "current_page": 1,
      "total_pages": 50,
      "links": {
        "next": "?limit=5&page=2",
        "current": "?limit=5&page=1"
      }
    }
  }
}

Need more? See the BigCommerce Content guide for connection setup and behaviour shared by every action.