Accessing the API

To access our API, a HTTP request needs to be made for every function call. Each function has a dedicated name, which needs to be used to access it. Typically, functions also expect a number of input parameters and return a result value.

Using a library

Language libraries are the easiest way to acceess the API. Currently you can use the following libraries:

A simple example of using the PHP library can be found in the API quick start document.

Accessing the API directly

If there is no library for your programming language, you can make direct HTTP calls to a function URL which starts at the following base address:

https://json.aftermarket.pl/

A name of the function needs to be appended to this base address. For example, to call the function /account/balance, it is necessary to access the URL:

https://json.aftermarket.pl/account/balance

You need to send an authentication header with your API key data. See the document User authentication for more information.

The function parameters can be sent using either GET or POST method. Every function also returns its result as JSON data which can be parsed easily in various programming languages. Details on how to send the function parameters and retrieve results can be found in the document "Parameters and return values".