Sorting lets you choose the order of rows returned by a list action.
The Universal API uses one query parameter for sorting: sort. You pass a comma-separated list of fields, and MindCloud translates that request into the sorting format supported by the selected app action.
| Control | What it does |
|---|---|
sort | Orders list results by one or more supported fields. |
sort is a query parameter on the Universal API request. It is not an action argument, and it does not go inside the JSON body.
Sorting only applies when the selected action explicitly supports it. If an action page does not show a Sorting section, that action does not accept sort.
For a GET action, add sort next to the other query parameters:
curl --request GET \
--url "https://embedded.mindcloud.co/v1/universal/amazon-seller/latest/actions/search-listings-items" \
--header "Authorization: Bearer $MINDCLOUD_API_KEY" \
--get \
--data-urlencode "connectionId=$CONNECTION_ID" \
--data-urlencode "sort=-lastUpdatedDate,sku"For a POST, PUT, or PATCH action, connectionId still goes in the body, but sort stays in the URL:
curl --request POST \
--url "https://embedded.mindcloud.co/v1/universal/amazon-seller/latest/actions/search-listings-items?sort=-lastUpdatedDate,sku" \
--header "Authorization: Bearer $MINDCLOUD_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"connectionId": "$CONNECTION_ID",
"query": "coffee"
}'Ascending order is the default:
name
Prefix a field with - for descending order:
-lastUpdatedDate
Do not prefix ascending fields with +. Use the field name by itself.
Use commas to sort by more than one field:
-lastUpdatedDate,sku
This means: sort by lastUpdatedDate descending first, then by sku ascending when two rows have the same lastUpdatedDate value.
The order of fields matters. MindCloud keeps the order you send and maps it into the provider request when the action supports those sort fields.
Sort fields must match the fields supported by the action. Use the action page as the source of truth.
For example, if an action supports sorting by sku and lastUpdatedDate, this works:
-lastUpdatedDate,sku
If the expression uses a field the action does not support, MindCloud does not send that sort expression to the provider. Keep sorting tied to the action's documented fields.
Your code sends one sort string. MindCloud parses it into sort directives, checks that sorting is enabled for the app API and action, and maps those directives into the provider request.
Some providers use a single sort string. Some use separate field and direction parameters. Some allow multiple fields, and some only allow specific fields. Your request shape stays the same.
Choose an app to see the actions that support sorting for that app version.
Open Amazon Seller search listings items