refactor the api to use a general importer

Needed for spree_hub. No change in interface, all existing specs are passing.