You can use this filter to change order :
$type = "cptCode";
add_filter("rest_" . $type . "_query", function ($args, $query) {
$args["orderby"] = "meta_value";
$args["meta_key"] = "my_meta_field";
return $args;
}, 10, 2);
You can also test $_GET
to change the order conditionally.