APIs & Integrations

ShubhangiPawar
メンバー

Can we Sort with more than 1 field in Search API

 

In Search Operation for sort can't we give more than 1 field? ..like one field want in ascending and one field require in descending in single query at the same time...in documentation sort is given as array..it means it can take more than one field,but when through postman tried,throwing error as

{
    "status": "error",
    "message": "too many sorts (count: 2, max allowed: 1)",
    "correlationId": "eb421a70-2306-4731-9eb9-b79433ac80b1",
    "category": "VALIDATION_ERROR"
}

0 いいね!
2件の返信
webdew
ガイド役 | Diamond Partner
ガイド役 | Diamond Partner

Can we Sort with more than 1 field in Search API

Hi @ShubhangiPawar ,

No , we can give only one filled: and max filter we can go for three only: here is screenshot: https://prnt.sc/26k0brh

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.
Thanks and Regards. 

0 いいね!
dennisedson
HubSpot製品開発チーム
HubSpot製品開発チーム

Can we Sort with more than 1 field in Search API

According to the documentation:

Only one sorting rule can be applied to any search.

0 いいね!