Skip to main content

Search API - sort_by not working



  • Official comment
    Danny Valentine

    Hi Suryarao.

    Thanks for getting in touch.

    It looks like when you're sending the body to the Search API, it's being sent as plain text. I just created the folder "tanagra/sfcc_image_automation" on my account and uploaded two images. Running your search query exactly as you have specified above, but with the content-type header set to application/json via curl, I get just two results returned. If I send the body without specifying the content-type, the full contents of my cloud are returned.

    Can you please ensure you're sending the payload of the POST request as json?

    Many thanks,

  • Suryarao Amalapuram

    Hi Danny,

    Thank you so much for your reply.

    After we change the GET request to POST request, it started working.



  • Danny Valentine

    That's great to hear, Surya!

    If you encounter any more issues or have any other questions then please feel free to raise a support ticket, and we'll be happy to help.

    Many thanks,


Post is closed for comments.