Sterling Order Management System APIs or Services
The Sterling Order Management System APIs are provided out of the box for most of the business entities in Sterling Order Management System to perform READ operations. You can search for data, list data or get detailed information pertaining to the entity from the cloud database by calling these APIs. Sterling Order Management System applications are also using these APIs to publish data on its own UIs. The same APIs can be called from both XAPI and REST API testers that are available out of the box or from a customized UI or 3rd party REST client too. To call the APIs, you must provide the login credentials to authenticate the user. The API testers capture this information along with the API input. Whereas, the Sterling Order Management System UIs send the logged-in user’s credentials along with the request. The Sterling Order Management System backend authenticates the user first and then starts with the API request processing.
The API behavior and XML input/output specifications are given in the Sterling Order Management System Javadoc. View <runtime>/xapidocs/api_javadocs/index.html for details. Similarly, see the page <runtime>/xapidocs/restdoc/index.html for REST URL resources and input or output specifications.
The XML approach supports complex queries with AND
or OR
expressions and advanced query match like ‘Contains’
, ‘Starts
with
’, Only Null
and so on, and the relational operators. In the REST
approach, complex queries are not supported in the GET
request, but it is also
possible to do a POST
request with one or more complex criteria.
The API requests are processed synchronously in the application server JVM and responses are sent back to the browser. If you are calling an API with an empty criterion or passing some criteria which can fetch huge volume of data, you might choke the network traffic and sometimes even crash the application server. Therefore, IBM strongly recommends users to deter such situations and advises to input more specific criteria and retrieve only the relevant data.
A solution to this is to use Pagination. There are many Sterling
Order Management System APIs
that support pagination and you are advised to call those APIs with Pagination. Read Sterling
Order Management System API Javadoc to know whether an API supports pagination or not. Almost all the
APIs are template controlled and it is very critical to specify a tuned template with necessary
attributes, when retrieving huge volume of data. In all the cases, it is better to get a count of
records first to assess the quantum of data and then run APIs either in paginated mode or make the
input criteria more specific. All list APIs can be called for ‘count’ by specifying an output
template with the TotalNumberOfRecords
attribute only.
Both the API testers are not available on the production environment. Therefore, you are advised to make REST calls from their customized UI or from a 3rd party REST client with supportive authentication credentials. Few 3rd party REST clients support download of the responses as well. It is better to download and analyze when the results are quite high.
API Pattern | Sample REST URL |
---|---|
getOrderList – empty input |
GET
|
getOrderList - with input parameters |
GET
|
getOrderList – with input parameters and order by sellers |
GET
|
getOrderList – with input parameters, order by sellers, paginate (get first
100) |
GET
|
getOrderList – with input parameters, order by sellers, paginate and with an
output template |
GET
|
GetOrderLinesData - a custom service |
POST
|
User given API templates can be created in the database by calling the
manageApiTemplate
API . This can be called in the master config (lower) environment
from the API testers and get this configuration to the production database by using the CDT or users
can make another REST call for this API to insert the template into the database. For example,
api_tpl_1
in the provided sample URL, is the identifier of a template for
getOrderList
API, created in the database before making this call.