Sorting

API Testing

// Definition

Ordering a result set by one or more fields, in ascending or descending direction. Testing concerns include: correct ordering for string (locale-aware), numeric, and date fields; stable sort behaviour when two records share the same sort key; sort direction toggle (ascending → descending); sort combined with filtering and pagination; and null/empty values (do they sort first or last, consistently?). Also verify that the default sort order is documented and stable across responses.

// Related terms