creating the api for listing orders