The code below is assuming there is:
This allows filtering via any custom field that belongs to the CPT in the filter name.
Things to note:
add_filter( 'rest_{type}_query', function( $args ) {
$filters = [
'relation' => 'AND',
];
foreach($_GET as $key => $value){
$filter = [
'key' => $key,
'value' => $value,
'compare' => '='
];
array_push($filters, $filter);
}
$args['meta_query'] = $filters;
return $args;
} );