API Integration
Updated on: 12/30/2008 6:14:25 PM
Using the SLST API you can make calls into the SLST system to perform useful functions.
For example you can record a sale from your custom vending script. Or you could query the system to load sales data for one of your customers.
There are a number of API versions. Each new version adds new features.
API VersionsThe Sales Tracker API works with XML. Here is some helpful LsL2 XML commands which can be used to work with the responses provided by the Sales Tracker API.
Helpful LsL2 Code: XMLThe API can be used by passing in a set of XML commands. The web site then processes these XML commands to form an XML response. This response is sent back to your in-world script. Each command has some common elements which are outlined below.
<SLSTCommands CommandSetId='CommandSetId'>
<SLSTCommand Type='CommandType' Name='CommandName'>
<!--Command Parameters-->
</SLSTCommand>
</SLSTCommands>
The above XML command outlines the most basic set of information necessary to form a command. The XML above is common to all commands sent to the web site. Below is an explanation of each part.
You can find a simple example of a complete command here:
API RecordSLSTTransaction ExampleThe SLSTCommands tag defines the start of your command. The only attribute in this element is the CommandSetId attribute. This attribute can have any value you set and passes through the service back to your script unchanged.
SLSTCommandThe SLSTCommand tag defines the actual unit of work you wish the web site to do. This element defines two attributes which are the Type and Name attributs. The type attribute defines the name of the command to run while the name attribute is another passthrough value which is unchanged by the service and is passed back to your script after processing.
Command ParametersThe command parameters section changes from command to command. Read about each command to see what specific parameters that command expects and what their format must look like.
Below are the available commands.
API RecordSLSTTransactionAPI ExecuteCustomerSalesQueryAPI ExecuteCustomerKeyQueryAPI ExecuteSalesQueryGroups
API ManageGroupMemberAPI ExecuteGroupMemberQueryAPI Temporary Configuration System