# 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

* [**Order API:**](https://www.apidoc-en.webshippy.com/webshippy-api-guide/order-related-functions) Order synchronisation (generate, modification, delete, query)
* [**Product API:**](https://www.apidoc-en.webshippy.com/webshippy-api-guide/product-related-functions) Product synchronisation (generate, modification, delete, query, stock info)
* [**Inventory Transfer API:**](https://www.apidoc-en.webshippy.com/webshippy-api-guide/transfer-related-functions) Transfer management (generate, modification, delete, query)
* [**External Inventory API:**](https://www.apidoc-en.webshippy.com/webshippy-api-guide/setting-external-warehouse-inventory) With this function you can set stock quantity for products available from external warehouse and name of the external warehouse.
* [**GetStock API**](https://www.apidoc-en.webshippy.com/webshippy-api-guide/getstock-api): Product inventory data bulk query.
* [**Get Brack History API**](https://www.apidoc-en.webshippy.com/webshippy-api-guide/get-brack-history-api): Brack history query.
* [**Create Bundle API**](https://www.apidoc-en.webshippy.com/webshippy-api-guide/create-bundle-api): Create product bundle.
* [**Marketplace Price Change API**](https://www.apidoc-en.webshippy.com/webshippy-api-guide/dropshippy-price-change-api): Modification of Marketplace wholesale prices.&#x20;
* [**Marketplace Transaction API**](https://www.apidoc-en.webshippy.com/webshippy-api-guide/marketplace-transaction-api)**:** This function enables the request of Marketplace transaction details.
* [**Track Info API**](https://www.apidoc-en.webshippy.com/webshippy-api-guide/track-info-api): The delivery status of orders can be queried.

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:**

```
$request = '<?xml version="1.0" encoding="UTF-8"?>
<request>
  <apiKey>apiKey</apiKey>
  <filters>
    <lastMod>2018-01-01 00:00:00</lastMod>
  </filters>
</request>';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://app.webshippy.com/wspyapi/GetProduct/xml/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(['request' => $request]));

$result = curl_exec($ch);
```
