<script>
  Spree.routes = <%== {
    :variants_search       => spree.admin_search_variants_path(:format => 'json'),
    :taxons_search         => spree.api_taxons_path(:format => 'json'),
    :user_search           => spree.admin_search_users_path(:format => 'json'),
    :product_search        => spree.api_products_path(:format => 'json'),
    :option_type_search    => spree.api_option_types_path(:format => 'json'),
    :states_search         => spree.api_states_path(:format => 'json'),
    :orders_api            => spree.api_orders_path(:format => 'json'),
    :stock_locations_api   => spree.api_stock_locations_path(:format => 'json'),
    :variants_api          => spree.api_variants_path(:format => 'json')
  }.to_json %>;
</script>

<script>
  Spree.routes = <%== {
    :variants_search       => spree.admin_search_variants_path(:format => 'json'),
    :taxons_search         => spree.api_taxons_path(:format => 'json'),
    :user_search           => spree.admin_search_users_path(:format => 'json'),
    :orders_api            => spree.api_orders_path(:format => 'json')
  }.to_json %>;
</script>

Remove unused api routes from views/spree/admin/shared/routes view
Remove unused api routes from views/spree/admin/shared/routes view
