I have extensive experience automating GUI testing with tools like TestComplete or Microsoft's CodedUI. However, I am trying to get out of the game of testing at the UI layer and instead would like to get started trying to test at the "service" or "API" or "logical" level as advocated widely throughout the internet. My understanding of this is that I need to somehow access the functions being called underneath the hood when I am clicking buttons or otherwise interacting with the UI. However, I am not really sure how to do go about doing this.
With my GUI automation scripts, basically I just wrote a separate application that was run side by side with the application under test to click buttons and whatnot. Since there isn't really a test API available to touch the service layer externally, how do I go about testing this layer? Do I just go into Eclipse and make some "Unit Tests" to call functions from the application directly? Do I need to bother the developers and ask them to write me a test API so I can access the service layer externally? Or is there a better way to go about doing this?
EDIT: Here's an example of what I wish to accomplish. Let's say I have some application wherein I am supposed to take some sales order with ID SO12345 through some business workflow with three separate screens (Initiate Order, Process Order, Complete Order). In each of these screens, I basically just enter the sales order ID into a text box and click save, which then updates the status of this order in the backend SQL database (insert new sales order record with status "New Order", update status to "Order Processed", update status to "Order Complete").
Basically all I want to do in this example is move a sales order through these three screens and test the database to see if the correct updates have been made along the way. With UI automation, I would make an entirely new application and write a method for each screen and write code in each of those methods to navigate to the appropriate screen, enter the sales order ID into a text box, then click save. Then with these three methods in hand, I could write code calling these three methods and check the database in between each automated step. But now if I want to instead test at the service level and just call the underlying methods underneath each button click, where should I be doing that? Can I make a unit test project and write my automation code in there (even though it's not actually a true unit test) or is it better to get the developers to write me a library that I can reference in a separate app to access these navigation methods directly?