Refactor add order API