Search code examples
jsonsearch-engineaemtransportsearch-and-promote

How to force Search and Promote returns JSON format instead of xml?


In our application we send requests to S&P like this:

http://SearchAndPromoteUrl/?parameter1=1&parameter2=2

My current understanding that S&P is external cloud service. sometimes we collect statistic and send to the server. Server analyzes our feed and we can get niformation from this S&P server.

1.Where can I found valid parameters after http://SearchAndPromoteUrl/?

2.Which manipulations should I execute for getting JSON instead of XML(S&P server should returns JSON Now our S&P returns xml).

This article says that it is possible

related information

http://microsite.omniture.com/t2/help/en_US/snp/8.15.0/SPguide.pdf


Solution

  • First I'd suggest using the updated documentation - https://marketing.adobe.com/resources/help/en_US/snp/8.16.0/c_getting_started.html

    1. The recommended way to integrate with S&P is to use the search form they provide. This form takes care of the request and parameters for you.

    UPDATE: Here are more details: https://marketing.adobe.com/resources/help/en_US/snp/t_copying_the_html_code_of_the_search_form_into_the_pages_of_your_website.html

    1. Yes, you can use JSON instead of the standard XML response, and it's quite simple: just write your own presentation template using JSON instead of XML (see https://marketing.adobe.com/resources/help/en_US/snp/8.16.0/c_about_templates.html)

    Have a nice day.