Sorting Results

Methods that allow for more than one object to be returned will generally supply a _sort parameter that allows you to specify the order in which the results are returned. For example orders can be sorted by the following fields:

As with most data set sorting routines there is an ascending and descending option. So to sort the result set by billing last name (ascending) followed by billing first name (ascending) you would use the following _sort parameter.


If you wanted to find the most recent orders then you would sort by the creation_dts in a descending fashion with:


WARNING: ALWAYS URL encode parameters! If you fail to URL encode the plus character then you are going to receive a bad request error for an improper sort attribute.