refactor complete_from_api for order