Absolutely, it is possible to generate featured results with API. Kindly take a look at the following request for guidance on how to create featured results.
Creating a New Featured Result
Index URL
Method
POST
Media Type
application/json
Headers
content-type : application/json
accept: application/json
accept: application/json
SB-PKEY: MJxdHTfBplp06eEfUbhxoHseH8j7QoU7zUfpC6vVRtoz/QdPP0LrB7Xz7Vu+w+G2CHhmqg==
Document Syntax
{
"apikey": "C6D418861BAD66A46A7CC96B70CEADF9",
"title": "featured ad",
"url": "http://www.bbc.com",
"uid": "1",
"startDate": "12-03-2018",
"expiryDate": "18-04-2018",
"expiryCount": "-1",
"priority": "1",
"active": "true",
"keywordType": "keyword",
"keywords": "test is good",
"keywordsurl": "",
"keywordsFieldType": "STRING",
"type": "TEXT",
"description": "asd",
"imageUrl": "",
"useDates": "false",
"keywordsphrase": "false",
"collections": "1,2,3,4,5"
}
Document Description
| JSON Fields | Value |
|---|---|
| apikey | API key accessible in the SearchBlox Admin Console. It is also present in the config.xml file. |
| title | Title of the ad. |
| url | URL for the ad. |
| uid | Unique id for the ad. Note: Each ad should be given unique ID |
| startDate | Start date to display the ad. |
| expiryDate | Expiry date for the ad. |
| expiryCount | Expiry count, i.e., number of times the ad has to be displayed. |
| priority | Priority in which the ad has to be displayed. The value has to be given in numbers eg 1, 2, 3 as per the priority. |
| active | This is to activate the ad while creating. When value is true the ad will be activated while creating. When value is false the ad will be deactivated while creating. |
| keywordType | For Keyword Match the value is keyword For Phrase Match the value is phrase For Exact Match the value is exact |
| keywordsFieldType | Whether it is words or string or keywords URL. The value can be STRING for keywords and URL for keywords URL. |
| keywords | The list of keywords for the ads. |
| keywordsurl | The keywords URL for the ads. |
| type | The type of ad, whether TEXT or GRAPHIC. |
| description | Description of the ad. |
| imageUrl | If the ad is a graphic, then the image URL has to be given in this field. |
| useDates | Whether to use start and end dates for the ads. |
| keywordsphrase | If keywords are to be taken as phrase then the value has to be entered as true. |
| collections | The list of collections separated by comma for which the ads are to be displayed. |
To learn more on API for Featured Results read: Featured Results API for SearchBlox
Comments
0 comments
Please sign in to leave a comment.