Multiple API Endpoints (wp_remote_get)

You could write a function to pull both the responses. Then merge the results based on a successful result.

This assumes the result for both calls is json data and should be converted to an array. I’m also using the same function calls you supplied so adjust the second where needed.

function get_json_data_from_2apis($api1_data = array(), $api2_data = array()) 
{
    // prepare request data
    $api1_json = json_encode($api1_data);
    $api2_json = json_encode($api2_data);

    // prep the results
    $result = array();

    // FIRST CALL

    $response = wp_remote_get('https://api1.endpoint.com', array(
        'headers' => array(
            'Content-Type' => 'application/json',
            'X-Api-Token'  => 'tokenid',
            'X-Api-Email'  => 'tokenemail',
        ),
        'body'    => $api1_json,
    ));

    if( ! is_wp_error($response)) {
        if(200 == wp_remote_retrieve_response_code($response)) {
            $body = wp_remote_retrieve_body($response);

            // store the first answer --- convert body to array
            $result [ 'api1' ] = array('success' => true, 'data' => json_decode($body, true));
        }
        else {
            $result [ 'api1' ] = array('success' => false);
        }
    }
    else {
        $error_message = $response->get_error_message();
        $result [ 'api1' ] = array('success' => false, 'data' => $error_message);
    }

    // SECOND CALL

    $response = wp_remote_get('https://api2.endpoint.com', array(
        'headers' => array(
            'Content-Type' => 'application/json',
            'X-Api-Token'  => 'tokenid',
            'X-Api-Email'  => 'tokenemail',
        ),
        'body'    => $api2_json,
    ));

    if( ! is_wp_error($response)) {
        if(200 == wp_remote_retrieve_response_code($response)) {
            $body = wp_remote_retrieve_body($response);

            // store the second answer --- convert body to array
            $result [ 'api2' ] = array('success' => true, 'data' => json_decode($body, true));
        }
        else {
            $result [ 'api2' ] = array('success' => false);
        }
    }
    else {
        $error_message = $response->get_error_message();
        $result [ 'api2' ] = array('success' => false, 'data' => $error_message);
    }

    return $result;
}

Call the function to return both results:

$results = get_json_data_from_2apis(array(), NULL);

If they are both successful, merge the responses.

if($results[ 'api1' ][ 'success' ] === true && $results[ 'api2' ][ 'success' ] === true) {

    // merge the results
    $final = array_merge($results[ 'api1' ][ 'data' ], $results[ 'api1' ][ 'data' ]);

    // print them out
    print_r($final);
}