Introduction
This description demonstrates how the E-commerce services are able to use the Webshippy system. The API supports four main cases.

Usable API endpoints

For safety reasons WSAPI uses HTTPS channel, supports UTF-8 character encoding and is capable to communicate both in XML and JSON formats as well.
  • API XML url: https://app.webshippy.com/wspyapi/{ACTION}/xml
  • API JSON url: https://app.webshippy.com/wspyapi/{ACTION}/json
Where the placeholder {ACTION} is the requested function/action.

Authentication - Generating API key

In the Webshippy Admin's system each Webshippy API is a separate sales channel. In order to have a successful data communication you must have your own API key. So to create it navigate to Settings / Warehouse management page then click on the Webshippy.API button to create a new sales channel. After filling in the basic data the system will generate the API key which is ready for communication.

API requests briefly

API only uses POST methods, and the request field contains the given data either as a JSON or XML String.
An example for a PHP based API request:
1
$request = '<?xml version="1.0" encoding="UTF-8"?>
2
<request>
3
<apiKey>apiKey</apiKey>
4
<filters>
5
<lastMod>2018-01-01 00:00:00</lastMod>
6
</filters>
7
</request>';
8
9
$ch = curl_init();
10
curl_setopt($ch, CURLOPT_URL, 'https://app.webshippy.com/wspyapi/GetProduct/xml/');
11
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
12
curl_setopt($ch, CURLOPT_POST, 1);
13
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(['request' => $request]));
14
15
$result = curl_exec($ch);
Copied!