Problem: How to change sort order using view's API hook
Solution: You can use view's hook 'wpv_filter_query' to change sort order.
You can find proposed solution, in this case, with the following reply: => https://toolset.com/forums/topic/sorting-by-api-using-wp_query/#post-691182
Relevant Documentation: https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.