Woocommerce REST API – add filter to set maximum query per page for product brands [closed]

There are no brand fields in WooCommerce core by default. This answer comes from a post 2 years ago, given by an engineer from Automattic. I double-checked the validity of this answer again today.

Yes correct use vendor_id or another field which is valid. Let me share mine which was worked for me.

i place exactly same code in function.php file.

add_filter(‘rest_product_collection_params’, ‘maximum_api_filter’);
function maximum_api_filter($query_params) {
$query_params[‘per_page’][“maximum”]=300;
return $query_params;
}

but my filter was like-

wp-json/wc/v3/products?status=publish&vendor_id=13&lang=en&per_page=300&