Communication with the API interface takes place exclusively via HTTPS, i.e., encrypted. The GET method is used for all requests.
Input parameters can be passed to some methods—these are inserted directly into the URL address of the request as GET parameters.
URL and response format
The API interface is available at:
https://api.wedos.as/partner/{nazev_metody}
All methods return a response in JSON format.
Each response includes a requestId that uniquely identifies the specific request.
All data in the response is encoded in UTF-8.
Based on the requestId, we are able to trace specific communication in internal logs in case of a problem.
Authentication
Every API request must be authenticated. This is done using an API key, which works similarly to a password but is intended exclusively for the API.
The API key is not the same as the password you use to log in to the partner administration.
You can generate your API key after logging into the partner administration section at
Account, settings – API settings.
HTTP headers
Authentication is performed using two HTTP headers that must be added to each request:
- X-Auth-Id – API key ID
- X-Auth-Key – the API key itself
Example of an HTTPS request
Below is an example of a simple API request, including the necessary HTTP headers.
This is a ping method that you can use to verify that communication is working properly.
GET /partner/ping HTTP/1.1 Host: api.wedos.as Accept: application/json X-Auth-Id: IDKEY X-Auth-Key: VASKLIC
Example answer
When the ping method is successfully called, the API returns the partner ID and the current date and time:
{ "stamp": 1495544024, "time": "2017-05-23 14:53:44", "partnerId": 300000, "requestId": "1495544024.0084.8420" }
Incorrect answers
In case of an error, the server returns an HTTP code other than 200, and the error code and its description are included in the response body.
For example, in case of a request with incorrect authentication:
{ "error": { "code": "C507", "error": "Authentication failed" }, "requestId": "1495544185.1615.8422" }
If you encounter a problem with the API or need to look up a specific request by requestId,
you can write to
affiliate@wedos.com.