Using API to Update Landing Pages

Overview

This API allows you to update a landing page in Hawksearch dashboard.

Product Listing Landing Page

Request: PUT request to the API below:

PUT /api/v10/LandingPage/1234 HTTP/1.1 Host: dashboard-na.hawksearch.com X-HawkSearch-ApiKey: USE_YOUR_API_KEY Cache-Control: no-cache Postman-Token: cd457184-4c00-a650-62f2-530f22a9a384 { "PageId": 1234, "Name": "Columbia Sportswear®", "Title": "Columbia Sportswear Title 2", "MetaDescription": "Columbia Landing Page Meta Description", "MetaKeywords": "columbia landing page meta keywords", "CustomUrl": "/brands/columbia/", "Breadcrumb": "<p><a href=\"http://www.erehwon.com/\" target=\"_blank\">Home</a>&nbsp;&gt;&nbsp;<a href=\"http://www.erehwon.com/store/brands/\" target=\"_blank\">View All Brands</a>&nbsp;&gt;&nbsp;Columbia <strong>Sportswear</strong></p>", "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\" Operator=\"All\" RuleType=\"Group\">\r\n <Rules>\r\n <Rule Operator=\"None\" RuleType=\"Eval\">\r\n <Rules />\r\n <Field>facet:brand</Field>\r\n <Condition>contains</Condition>\r\n <Value>Columbia Sportswear</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": 114, "Field": "", "Label": "Search within these results", "SortOrder": 1, "SortBy": null }, { "FacetId": 12114, "Field": "department_nest", "Label": "Department", "SortOrder": 2, "SortBy": "" }, { "FacetId": 99, "Field": "size-property", "Label": "Size", "SortOrder": 3, "SortBy": "Score" }, { "FacetId": 98, "Field": "color-property", "Label": "Color", "SortOrder": 4, "SortBy": "" } ], "PageLayoutId": null, "EnableFacetAutoOrdering": false, "Custom": "", "Tags": "brand,promo,columbia", "CanonicalUrl": "", "PageType": "ProductListing", "ContentConfigList": [], "PageHeading": "", "CustomHtml": "", "Keywords": null, "ListName": "Columbia Sportswear®", "Notes": "lorem ipsum dolor", "IsNoIndex": false, "IsNoFollow": false, "StartDate": "01-01-0001", "EndDate": "01-01-0001" }

Content Landing Page

Request: POST request to the API below:

POST /api/v10/LandingPage HTTP/1.1 Host: dashboard-na.hawksearch.com X-HawkSearch-ApiKey: USE_YOUR_API_KEY Cache-Control: no-cache Postman-Token: cd457184-4c00-a650-62f2-530f22a9a384 { "Name": "Content LP", "Title": "Content LP", "MetaDescription": "", "MetaKeywords": "", "CustomUrl": "contentlp", "Breadcrumb": "", "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\" Operator=\"All\" RuleType=\"Group\">\r\n <Rules />\r\n <Field />\r\n <Condition />\r\n <Value />\r\n</Rule>", "IsFacetOverride": false, "IsIncludeProducts": false, "SortFieldId": 0, "SortDirection": null, "SelectedFacets": [], "PageLayoutId": 326, "EnableFacetAutoOrdering": false, "Custom": "", "Tags": "", "CanonicalUrl": "", "PageType": "Content", "ContentConfigList": [ { "ZoneName": "Header", "ZoneConfig": [ { "BannerId": 103550, "CustomValue": null, "DateFrom": "01-01-0001", "DateTo": "01-01-0001", "SortOrder": 0, "TriggerXml": "<?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\" Operator=\"Any\" RuleType=\"Group\">\r\n <Rules />\r\n <Field />\r\n <Condition />\r\n <Value />\r\n</Rule>" } ] }, { "ZoneName": "Sub Content 1", "ZoneConfig": [ { "BannerId": 73532, "CustomValue": null, "DateFrom": "01-01-0001", "DateTo": "01-01-0001", "SortOrder": 0, "TriggerXml": "<?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\" Operator=\"Any\" RuleType=\"Group\">\r\n <Rules />\r\n <Field />\r\n <Condition />\r\n <Value />\r\n</Rule>" } ] }, { "ZoneName": "Other", "ZoneConfig": [] }, { "ZoneName": "Bottom content", "ZoneConfig": [ { "BannerId": 73532, "CustomValue": null, "DateFrom": "01-01-0001", "DateTo": "01-01-0001", "SortOrder": 0, "TriggerXml": "<?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\" Operator=\"Any\" RuleType=\"Group\">\r\n <Rules />\r\n <Field />\r\n <Condition />\r\n <Value />\r\n</Rule>" } ] } ], "PageHeading": "Content LP", "CustomHtml": "test example used in automation testing", "Keywords": null, "ListName": null, "Notes": "", "IsNoIndex": false, "IsNoFollow": false, "StartDate": "01-01-0001", "EndDate": "01-01-0001" }

Response

The response is an array of landing page objects, every object being a series of key-value pairs. For the description of the data, please refer to Using API to Create Landing Pages

 

PUT Methods

  • PUT api/v9/LandingPage/{id}

    Update Landing Page with a particular Id.

    Parameters

    • id: Unique Id of the Landing Page (FromUri)

    • value: Landing Page object (FromBody)

    • version: (FromUri)

  • PUT api/v4/LandingPage/{guid}

    Update Landing Page with a particular Guid.

    Parameters

    • guid: Guid of the Landing Page (FromUri)

    • value: Landing Page object (FromBody)

    • version: (FromUri)

  • PUT api/v9/LandingPage/url/{url}

    Update Landing Page with a particular Url.

    Parameters

    • url: Unique Url of the Landing Page (FromUri)

    • value: Landing Page object (FromBody)

    • version: (FromUri)

  • PUT api/v9/LandingPage/bulk

    Update multiple Landing Pages at once.

    Parameters

    • pages: Collection of Landing Page objects to be updated (FromBody)

    • version: (FromUri)

  • PUT api/v9/LandingPage/custom/{custom}

    Update Landing Page by Custom field value

    Parameters

    • custom: No Documentation Found. (FromUri)

    • value: No Documentation Found. (FromBody)

    • version: (FromUri)