Sage 200 - APIWindowsClient Instructions
Description

Before following this article, you must read through this article on how to set up API access via Windows Authentication.

Once you have confirmed you can return sites through your browser, please follow on the steps below.

Cause
Resolution
How to use the APIWindowsClient solution

Once you have confirmed the API is up and you can return sites from your browser, you can use the APIWindowsClient solution to test and make calls to the API.

 

On your development machine
  • Unzip the APIWindowsClient solution and open this in Visual Studio.
  • Open the APIClientFactory.cs class
  • In the CreateNew method, change the BaseUrl to match your machine name and port of your web service.



  • Once completed, go to Build and then Build Solution. This will output the .exe file into the output folder
    TIP: To find the output folder, right click on the APIWindowsClient in Solution Explorer then choose Open Folder in Explorer Window. The exe will be inside bin/Debug.

 

On your target machine

You can now run the new client on this machine. The form will look like this:

Clicking on Get Sites will return all companies the currently logged on Sage 200 User will have access to.

Clicking on Get Departments will return all departments for the companies the currently logged on Sage 200 User will have access to.

Using the Windows form, you can also POST requests to your Sage 200 data using the Post Dept button. The number in the bottom right hand box will be the Department code that is created. You can use this form as a base for any in house API development work using Windows Forms.

 

Next Steps

If you wish to make use of the APIWebSiteWindows solution, please follow the steps in this article.

If you wish to make use of the APIWebSiteAnon solution, please follow the steps in this article.

Steps to duplicate
Related Solutions