# Call external API once the stock level updated

**URL:** <https://forum.shopware.com/t/call-external-api-once-the-stock-level-updated/62092>\
**Category:** International (English Only)\
**Tags:** programming\
**Created:** [1. Oktober 2019 um 13:28 UTC](https://forum.shopware.com/t/call-external-api-once-the-stock-level-updated/62092 "2019-10-01T13:28:34Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![vasims\_zignuts](https://avatars.discourse-cdn.com/v4/letter/v/c57346/32.png) [@vasims\_zignuts](https://forum.shopware.com/u/vasims_zignuts)\
**Post date:** [2. Oktober 2019 um 07:53 UTC](https://forum.shopware.com/t/call-external-api-once-the-stock-level-updated/62092/18 "2019-10-02T07:53:58Z")

</div>

**Folder structure in Core PHP**

Api.class.php // Contain Base class and functions

Helper.class.php // I have added some method&nbsp;

index.php // Execurtable file where all include

&nbsp;

```
require_once("KoronaApi.class.php");
require_once("KoronaHelper.class.php");

// Prepare Data Set 

$token = "Token";

// Organization which Manage warehouse and other things

$orgNo = "1";

// A SKU or Number must same as both site ecommerce and korona

$productNumber = "BLVK.Choco";

$qty = 10; // QTY you want to update Minus (-) indicate 

// An Object manage stock
$KoronaObject = new KoronaHelper();
echo $KoronaObject->StockAdjustment($token,$orgNo,$productNumber,$qty);

```

&nbsp;

---

_[View the full topic](https://forum.shopware.com/t/call-external-api-once-the-stock-level-updated/62092)._
