Call external API once the stock level updated

Folder structure in Core PHP

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

Helper.class.php // I have added some method 

index.php // Execurtable file where all include

 

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);