woocommerce product custom field

You should ad the custom field to product API response, try this
(untested)

add_filter( 'woocommerce_rest_prepare_product', 'custom_products_api_data', 90, 2 );
function custom_products_api_data( $response, $post ) {

// retrieve a custom field and add it to API response
$response->data['purchasing_cost'] = get_post_meta( $post->ID, 'purchasing_cost', true );

return $response;
}