The Amazon API supports sorting, ordering, and searching operations.
Note
Note: Always use uppercase for the query parameters.
In your API request, you can append sort=[field name]
, where field name is a valid parameter returned in the JSON response of your GET request (defined currently as sortable). On sort request based on a field name non sortable - response will be returned in the default order.
https://adapi.sizmek.com/sas/advertisers?sort=accountId
By default, the API response is ascending. To control the response order, append order=[order type]
(ASC or DESC) when the sort field is specified in the API request.
https://adapi.sizmek.com/sas/advertisers?sort=accountId&order=ASC
In your API request, append q=[search string]
to get a response that only includes objects in which the search string is included in at least one of the fields returned in the JSON response.
Search structure enables using AND/OR operators functionality in your queries.
The following example is equivalent to the query search for (((name1 || name2) || (id1 || id2)) && (accountId3)).
https://adapi.sizmek.com/sas/advertisers?q={"1":{"NAME":["account_one", "account_two"],"ID":["1151","1234"]},"2":{"ACCOUNTID":[5155]}}
Each entity has a specific list of fields that are searchable in API requests. For more information, see the related resource article.
Note
Note: API search will return a 9199 error in the following scenarios:
-
from is not passed
-
from is negative
-
from equals or is bigger than 10,000
-
max is not passed
-
max is negative
-
max equals or is bigger than 500
Comments