Refactor orders API to reflect new API style