CustomPageItem

An object representing a custom page item – the individual building block of a CustomPage.

Properties

The properties of the object.

Property Description
uid The unique identifier of a custom page item.
type The type of the custom page item. See Types and settings.
settings The settings for the custom-page item. The value of this property is always an object that depends on the type. See Types and settings.

Types and settings

Available types and their settings.

"articlegroupSelection"

A custom page item that presents a selection of Articlegroups.

Type/setting Description
heading Heading by language.
articlegroup The unique identifier of the Articlegroup from where the selection is made. If omitted, the selection is made from the root level.
sort The ordering of the selection. Available options are: "name" and "predefined".

"articleSelection"

A custom page item that presents a selection of Articles.

Type/setting Description
heading Heading of the custom page item by language.
articleSelectionType The type of the article selection. Available options are: "specialOffer", "news", "articlegroup".
articlegroup The unique identifier of the Articlegroup from which the selection is made. If articleSelectionType is articlegroup and this property is omitted, then the selection is made from the root level. Exists only if articleSelectionType is articlegroup.
includeSubgroups If articles in subgroups should be included in the selection. Exists only if articleSelectionType is articlegroup.
sort The ordering of the selection. Available options are: "created", "changed", "name", "numSold", "articleNumberAscending" and "articleNumberDescending".
limit The limit for the selection.

"articleList"

A custom page that presents a predefined list of Articles.

Type/setting Description
heading Heading of the custom page item by language.
articles An array of unique identifiers to the Articles in the list. Please note that the order of the articles in this array is the order in which they are listed.

"html"

A custom page item that presents custom HTML.

Type/setting Description
content The HTML by language.

Methods

get

Fetches information about a custom page item.

Parameters

Parameter Description
uid The unique identifier of a custom page item.
query Which info to return (optional). See Query language.

Examples

API Console
CustomPageItem.get(719035, ["type", "settings"])
Response
{
  "type": "articlegroupSelection",
  "settings": {
    "heading": {
      "en": "Regulars",
      "sv": "Stamkunder"
    },
    "articlegroup": 4216,
    "sort": "name"
  }
}
API Console
CustomPageItem.get(8251723, ["type", "settings"])
Response
{
  "type": "articleSelection",
  "settings": {
    "heading": {
      "en": "Fruits",
      "sv": "Frukter"
    },
    "articleSelectionType": "articlegroup",
    "articlegroup": 6271,
    "includeSubgroups": true,
    "sort": "created",
    "limit": 25
  }
}
API Console
CustomPageItem.get(371953, ["type", "settings"])
Response
{
  "type": "articleList",
  "settings": {
    "heading": {
      "en": "Recommended products",
      "sv": "Rekommenderade produkter"
    },
    "articles": [519235, 341563, 861255, 186182, 713561]
  }
}
API Console
CustomPageItem.get(561896, ["type", "settings"])
Response
{
  "type": "html",
  "settings": {
    "content": {
      "en": "<h1>Welcome to my shop!</h1>",
      "sv": "<h1>Välkommen till min butik!</h1>",
    }
  }
}

getSchema

Fetches the JSON Schema which can be used for client-side validation.

Parameters

The unique identifier of a custom-page item or null for a new instance.