You can check this:
$api_endpoint="https://url_to_API";
$api_args = array(
'method' => 'GET',
'headers' => array( 'Accept' => 'application/json', 'any' => 'other' )
);
$queries = array(
'your_query' => 1,
'another_query' => 5,
);
$api_endpoint = add_query_arg( $queries, $api_endpoint );
$response = wp_remote_request( $api_endpoint, $api_args );
$response_code = wp_remote_retrieve_response_code( $response )
$data = json_decode( wp_remote_retrieve_body( $response ), true );
Also you can access to the response code in this way: $response['response']['code'];
I didn’t try it but I have found this resources I think it can be usefull for you:
wp_remote_retrieve_response_code()
Hope it works for you 🙂
I am waiting to know if it has worked correctly for you, because I think is a very interesting issue.