What do I need to get started with RouteTask? Do I need a special service or dataset?
You get a certain number of credits when you have an AGOL account.
ArcGIS Online | Service Credits
Esri Directions and Routing Services | ArcGIS for Developers
So I need a network analyst license etc to get started then.
Only if you are wanting to build and host your own Network routing service. Otherwise you just use esri's and consume the credits that the call will consume.
Firstly thanks for commenting on my questions, what is the URL that I must access? attempting to use the one provided in the examples gives me a login dialog on request.
Correct, Using the world routing service consumes credits so thus the login dialog.
Can you just please point me in the direction of where I can acquire credits from Esri?
Don't forget to mark this question as answered by clicking on the "Correct Answer" link on the reply that answered your question.
Retrieving data ...