Add a sortable mappings list to match other endpoints and so that you don't have to use database column names. Example: 'created' => 'created_at' Also cleaned up some of the logic since a lot of it got moved into the SORTABLE_MAPPING hash.