XM

Retrieve Page by URL

Retrieves a specific live page on your e-commerce website, by URL.

Path:

GET https://{baseurl}/api-xpm/page/live?url=/home

Headers

Content-Type : application/json

x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox" }

Parameters

Type : query

Name : The page URL.

Required: true

Sample Request

https://{baseurl}/page/live?url=/home

Sample Response

Response Code: 200

Message: OK

Description: You will see this message when the page is successfully retrieved.

{
"status_code": 200,
"message": "Live version: 2919 for page: /garden.",
"data": {
"page": {
"_id": "6025a9cc685fbffa3d18fee6",
"name": "Lawn and Garden",
"pageUrl": "/garden",
"__v": 0,
"createdAt": "2021-02-11T22:03:56.716Z",
"isActive": true,
"isArchived": false,
"pageId": 1475,
"seoFields": {
"title": "Lawn & Garden",
"description": "Everything you need for lawn and garden. With mowers, tractors, tools, hoses, and plants you'll find everything you need in our Garden Centres.",
"_id": "6025a9ccbe90f3000819e26b",
"metadata": [
{
"_id": "6025a9ccbe90f3000819e26c",
"name": "tag",
"content": "034b7bea-6cb5-11eb-9439-0242ac130002",
"updatedAt": "2021-02-11T22:03:56.716Z",
"createdAt": "2021-02-11T22:03:56.716Z"
}
],
"updatedAt": "2021-02-11T22:03:56.716Z",
"createdAt": "2021-02-11T22:03:56.716Z"
},
"updatedAt": "2021-02-11T22:13:09.452Z",
"pageType": {
"isDefault": false,
"name": "Category List",
"urlPrefix": "/category"
}
},
"version": [
{
"_id": "6025a9ccbe90f3000819e26d",
"isArchived": false,
"channel": [
12
],
"status": "SCHEDULED",
"endDate": "2099-12-31T00:00:00.000Z",
"pageId": "6025a9cc685fbffa3d18fee6",
"name": "Spring",
"components": [
{
"_id": "6025abf507969d00080b8017",
"id": "ImageCarousel",
"key": "QddKbgyihudbWIfYtGyGK",
"params": {
"components": [],
"title": "Spring is Here!",
"description": "It's time to start planting!",
"ctaText": "Shop Plants",
"cta": [
{
"components": [],
"text": "",
"link": ""
}
],
"items": [
{
"components": [],
"image": {
"url": "https://images.unsplash.com/photo-1557429287-b2e26467fc2b?ixlib=rb-1.2.1&ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&auto=format&fit=crop&w=1567&q=80",
"altText": ""
},
"description": "",
"link": ""
},
{
"components": [],
"image": {
"url": "https://images.unsplash.com/photo-1470755008296-2939845775eb?ixlib=rb-1.2.1&ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&auto=format&fit=crop&w=975&q=80",
"altText": ""
},
"description": "",
"link": ""
}
],
"small": false
},
"order": 1
},
{
"_id": "6025abf507969d00080b8018",
"id": "RichText",
"key": "mZglbldlRFDKXfBC9dxtm",
"params": {
"components": [],
"rich": "<p>Spring brings with it all the excitement and enthuisiasm of a new season as the cold and wet weather fades away. Planting is best done shortly after the thaw and getting an early start is essential to starting your garden off well and preparing for a successful season of blooms.</p>\n"
},
"order": 2
}
],
"versionId": 2919,
"createdAt": "2021-02-11T22:03:56.786Z",
"updatedAt": "2021-02-11T22:13:12.657Z",
"__v": 0,
"startDate": "2021-02-11T22:13:12.631Z"
}
]
}
}

Change Log

  • Last updated - Oct 2020