OverviewPlatformsAPI ReferenceResources
Commerce

Update a URL redirect

PATCHhttps://zernio.com/api/v1/commerce/redirects/{redirectId}

Changes the redirect's path and/or target. Shopify only. Needs navigation.write.

PlatformsShopify

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Path parameters

redirectIdstringRequired

Platform-native id.

Body

application/json

What every request needs

accountIdstringRequired
Optional parameters2 fields
pathstring
targetstring

Responses

Success· the request worked

Errors· the request failed

PATCH/v1/commerce/redirects/{redirectId}
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.commerce.updateCommerceRedirect({  path: {    redirectId: 'redirect_abc123',  },  body: {    accountId: 'account_abc123',  },});console.log(data);
{  "redirect": {    "id": "string",    "path": "string",    "target": "string"  }}
OpenAPI specification
Was this page helpful?