Using API to Get All Landing Pages
Overview
Hawksearch offers the following API’s to retrieve landing page information:
1. GET All Landing pages >> api/v9/LandingPage
This API allows you to retrieve all Landing Pages created in the Hawksearch dashboard.
Example use case: Get all landing pages of a site.
Request: GET request to the API below:
Â
GET /api/v9/LandingPage HTTP/1.1
Host: dashboard-na.hawksearch.com
X-HawkSearch-ApiKey: USE_YOUR_API_KEY
Content-Type: application/json
Accept: application/json
Cache-Control: no-cache
Â
Response: The response is a JSON array of landing pages list, where each landing page is an array of string objects, every object being a series of key-value pairs. The description of the data is as follows:
[
{
"PageId": 11626742,
"SyncGuid": "a0eaf05d-38ff-4b88-864c-17a0c12a759e",
"Name": "Footwear",
"CustomUrl": "/footwear/",
"NarrowXml": "<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<Rule xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" RuleType=\"Group\" HasFacetCoverage=\"false\" Operator=\"Any\">\r\n <Rules>\r\n <Rule RuleType=\"Eval\" HasFacetCoverage=\"false\" Operator=\"None\">\r\n <Rules />\r\n <Field>keyword:Keyword</Field>\r\n <Condition>contains</Condition>\r\n <Value>sandals</Value>\r\n </Rule>\r\n <Rule RuleType=\"Eval\" HasFacetCoverage=\"false\" Operator=\"None\">\r\n <Rules />\r\n <Field>keyword:Keyword</Field>\r\n <Condition>contains</Condition>\r\n <Value>shoe</Value>\r\n </Rule>\r\n </Rules>\r\n <Field />\r\n <Condition />\r\n <Value />\r\n</Rule>",
"IsFacetOverride": true,
"IsIncludeProducts": false,
"SortFieldId": 0,
"SortDirection": "Asc",
"SelectedFacets": [
{
"FacetId": 17077,
"Field": "color-property",
"Label": "Color",
"SortOrder": 1,
"SortBy": null
},
{
"FacetId": 17078,
"Field": "size-property",
"Label": "Size",
"SortOrder": 2,
"SortBy": null
},
{
"FacetId": 17076,
"Field": "saleprice",
"Label": "Price",
"SortOrder": 3,
"SortBy": null
}
],
"PageLayoutId": null,
"EnableFacetAutoOrdering": false,
"Custom": null,
"Tags": "promo,footwear",
"CanonicalUrl": null,
"PageType": "ProductListing",
"ContentConfigList": [],
"PageHeading": null,
"CustomHtml": null,
"Keywords": null,
"ListName": null,
"Notes": null,
"CreateDate": "07-11-2013",
"ModifyDate": "04-28-2016",
"IsNoIndex": false,
"IsNoFollow": false
},
{
"PageId": 11620772,
"SyncGuid": "39b30b49-d734-4f72-9af2-3d04e0a3c218",
"Name": "July Fourth clone",
"CustomUrl": "/4July232131/",
"NarrowXml": "<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<Rule xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" RuleType=\"Group\" HasFacetCoverage=\"false\" Operator=\"Any\">\r\n <Rules>\r\n <Rule RuleType=\"Eval\" HasFacetCoverage=\"false\" Operator=\"None\">\r\n <Rules />\r\n <Field>facet:color-property</Field>\r\n <Condition>is not</Condition>\r\n <Value>Brown</Value>\r\n </Rule>\r\n </Rules>\r\n <Field />\r\n <Condition />\r\n <Value />\r\n</Rule>",
"IsFacetOverride": true,
"IsIncludeProducts": false,
"SortFieldId": 0,
"SortDirection": "Asc",
"SelectedFacets": [
{
"FacetId": 17080,
"Field": "brand",
"Label": "Brand",
"SortOrder": 1,
"SortBy": null
},
{
"FacetId": 17089,
"Field": "department_nest",
"Label": "Department",
"SortOrder": 2,
"SortBy": null
},
{
"FacetId": 17077,
"Field": "color-property",
"Label": "Color",
"SortOrder": 3,
"SortBy": null
},
{
"FacetId": 17081,
"Field": "type",
"Label": "Type",
"SortOrder": 4,
"SortBy": null
},
{
"FacetId": 17076,
"Field": "saleprice",
"Label": "Price",
"SortOrder": 5,
"SortBy": null
}
]
}
]
Â
No | Key | Description | Value Type |
---|---|---|---|
1 | PageId | The unique identifier of the landing page(unique across the whole system) | Number |
2 | SyncGuid | Internal field | GUID |
3 | Name | This field allows you to provide a unique SEO Title for your landing page. | lowercase alphanumeric string with underscores allowed |
4 | CustomUrl | The url of the landing page | Alphanumeric string |
5 | NarrowXml | The conditional rule used to pull up the landing page. | XML |
6 | IsFacetOverride | Flag to control if facets are getting overrideen on this landing pahe | Boolean |
7 | SortFieldId | The FieldId of the sorting option used to sort items on the page. This comes from the Sorting/Pagination section under Workebench >>Data Configuration | Number |
8 | SortDirection | If the sortfield above is to be sorted in ascending or descending order | Asc Desc |
9 | SelectedFacets | This is an array of facet objects where each object is a key-value pair. Below example what each object should { | FacetId = Id of the facet Field = Name of the facet Label = Display value of the facet Sort Order = The order in which the facet will be displayed on the page SortBy = Sorting option for the items on the page |
10 | PageLayoutId | For Content pages, this is the id of the pagelayout | Number |
11 | EnableFacetAutoOrdering | If you want the facets to be ordered automatically | Boolean |
12 | Custom | You can utilize the Custom Field for unique codes or notes that you don't want to be overwritten by anyone else on the team. | Alphanumeric string |
13 | Tags | Tags can be utilized by business users to quickly locate merchandising elements relating to themes or strategies. | Alphanumeric string |
14 | CanonicalUrl | The canonical URL is single URL that a search engine will use to identify the page. It consolidates the information for individual on a single preferred URL. | Alphanumeric string |
15 | PageType | The type of the page. There are only 2 types available:
| String |
16 | ContentConfigList | Configuration for Content items | Alphanumeric string |
17 | PageHeading | This field allows you to provide a unique name. Choose a name that you can easily associate with this page. | Alphanumeric string |
18 | CustomHtml | HTML used for content data | Alphanumeric string |
19 | Keywords | Â | Alphanumeric string |
20 | ListName | Â | Alphanumeric string |
21 | Notes | This can be used to add notes or information unique to this page | Alphanumeric string |
22 | CreateDate | Field creation date | Date string in MM-DD-YYYY format |
23 | ModifyDate | Field modification date | Date string in MM-DD-YYYY format |
24 | IsNoIndex | noindex means that a web page shouldn't be indexed by search engines and therefore shouldn't be shown on the search engine's result pages. | Boolean |
25 | IsNoFollow | nofollow means that search engines spiders shouldn't follow the links on that page. | Boolean |
26 | MetaDescription | Meta Description is used to describe your landing page. | Alphanumeric string |
27 | MetaKeywords | Meta Keywords are short concise phrases or terms that best describe your landing page. This is unique for each landing page.It is important to put the most important words or phrases at the beginning of the list. Separate the words or phrases by commas, however spaces are not needed between commas and new words. | Alphanumeric string |
Â