add create order function to api