Before following any of the examples in this article, ensure your site has been correctly configured for use with the API. Further information about the setup of the Native API for Sage 200 Professional can be found here>
NOTE: This article has been created as a gesture of goodwill to ease the testing of the Sage 200 API. The setup and configuration of Postman is not supported by Sage 200 technical support or Sage Developer Services. For information on our support boundaries see here >
Postman is an open-source API development environment (ADE) which enables developers to build and test API queries to many different APIs and endpoints. You can find out more information and obtain a copy of Postman here.
The following sections discuss how to obtain the prerequisite information required to construct your Authorization header in Postman.
The following sections discuss how to authenticate your API requests for both a Confidential client (Web) and a Public client (Desktop).
CAUTION: For this, you will require a Client ID and Client Secret to be able to authenticate. If you do not have these or have not yet requested them then please fill out this form. Developer Services will have these credentials created for you (this may take up to 48 hours). You will then be able to continue working with Postman or your choice of ADE.
CAUTION: If you do not add a space you will receive the following error in your response body when you attempt to make an API request: "Message": "Authorization has been denied for this request."
NOTE: Removing offline_access from the Scope still allows you to authenticate, however, a refresh token will not be returned in the body of your access token request. To aid development and testing of 3rd party API credentials, the Sage Developer Services team has produced a basic Windows Form application which allows users to enter their Client ID and request an access token using the method detailed in the Sample Application and Client Library. This token can then be copied into the Postman Headers section as detailed below.
NOTE: This download is only available to members of the Developer Programme. If you are unable to download the application, please contact Developer Services who will send you an alternate link.
NOTE: If you encounter an Unexpected Exception when attempting to generate an access token, please ensure you have entered a valid Public Client ID. Should the issue persist, please contact Developer Services. In order to make database specific requests via the Sage 200 API, such as a GET request against the Customers endpoint, you must specify the Site ID (X-Site) and the Company ID (X-Company) your request relates to in the request header.
In order to acquire these values a GET request can be run against the sites endpoint to return the ID values of all the sites/companies your Sage ID is the API User.
TIP: Further information on creating collections in Postman can be found here.
TIP: Once you have acquired the X-Site and X-Company values you may wish to add these to the your collection variables so that they can be easily generated and create new requests for a specific company.
After acquiring your X-Site and X-Company values you will now have all the information required to construct a database specific request. The following section discusses how to run a GET request to the Customers endpoint for a specific customer record.
If you know the ID of the record you wish to run the GET request for you can append this to the end of your request URL.
Example: https://api.columbus.sage.com/uk/sage200/accounts/v1/customers/17
As the customer_id is not surfaced in the Sage 200 application, it is likely that you will not know this prior to making your GET request. In these cases, a query parameter can be used to filter based on a known field.
An example of this would be using the (Sales Ledger) reference, as this is visible in the application and unique to each Customer record.
Example: https://api.columbus.sage.com/uk/sage200/accounts/v1/customers?$filter=reference eq 'A1D001'
Further information on supported query parameters for the Sage 200 Standard and Sage 200 Professional APIs can be found here.
Now you can construct API requests using Postman, if you wish to start querying additional endpoints, creating new records, or updating existing records via the Sage 200 API.
A list of all available endpoints and supported methods for Sage 200 Professional and Sage 200 Standard can be found in our API documentation.
We also have a collection of API example requests which can be found below and run in Postman.
You may also wish to start developing a desktop or web application that makes use of the Sage 200 API. A sample application and client library to get you started can be found here.
Prior to going live with your application, please ensure that you have requested live API credentials by completing our request form.
If you encounter issues authenticating your requests, or querying the Sage 200 API, using Postman, please see our Common Queries and Frequently Asked Questions article which can be found here.
NOTE: Please be aware that Sage Developer Services only support the API endpoints and not the implementation, troubleshooting or debugging of applications that make use of the Sage 200 API. This is further explained in our support boundaries which can be found here.