Link Resource

Use the Link resource to represent a link.

This resource can be modified by the seller with the link-chooser control.

Schema type

Use link to reference this resource in the template schema.

All Links fit these properties. You can find property descriptions that are specific to a certain type in the tables below.

Field Type Description
type* 'item' Link resource type
id String Link resource ID. Sometimes required depending on type, see references below.
newTab Boolean Whether or not the link should be opened in a new tab. Can be set by the related control.
  • = required

Example:

{
  "type": "product",
  "id": "13",
  "newTab": true
}

Overrided property descriptions specific to each type below.

Field Type Description
type 'item' Item resource type
id String Item resource ID
Field Type Description
type 'category' Category resource type
id String Category resource ID
Field Type Description
type 'page' Page resource type
id String Page resource ID
Field Type Description
type 'custom' Custom page resource type
id String Custom page resource ID

Back to top

The below link types do not require an id property.

Example:

{
  "type": "orderOnline",
  "newTab": true
}
Field Type Description
type 'shopAll' Shop All system link type
Field Type Description
type 'storiesOverview' Stories Overview system link type
Field Type Description
type 'orderOnline' Order Online system link type
Field Type Description
type 'giftCards' Gift Cards system link type
Field Type Description
type 'appointments' Appointments system link type
Field Type Description
type 'storeLocator' Store locator system link type
Field Type Description
type 'transactionPolicy' Transaction system link type
Field Type Description
type 'splash' Splash system link type
Field Type Description
type 'cart' Cart system link type
Field Type Description
type 'customerAccounts' Customer Account system link type

Back to top

Example:

{
  "type": "external",
  "href": "https://www.example.com"
}
Field Type Description
type 'external' External link type
href String External url, e.g. https://squareup.com
Field Type Description
type 'email' Email link type
href String Email address, e.g. janedoe@squareup.com
Field Type Description
type 'phone' Phone link type
href String Phone number, e.g. 123-456-7890
Field Type Description
type 'file' File link type
href String File path, e.g /your/file/link.txt
Field Type Description
type 'anchor' Anchor link type
href String Anchor fragment identifier, e.g. section

Back to top

See also