Bestseller Inventory Update API

Inventory API updates the inventory count at the option/EAN level. The changes are made in the oc_inventory and oc_option table. The aggregate inventory at the product level also changes basis the inventory changes at the option level.

Before calling the updateInventory API, client will need to call login API to generate the Auth token.

LOGIN API
Use the login API to generate Access token. Client will need to pass login key. This key is to be passed in form Body. Please ask the ANS team to provide you with this key.
API URL – https://dev-s1-bs-admin.kartify.in/index.php?route=api/login
You will get the success response and token in the following format

{    “success”: “Success: API session successfully started!”,    “token”: “oYzbV3noWtSEdnwSjs6DtE6uZabHO516”}

Please use this token in the update Inventory API. Also note that your IP needs to be whitelisted before for using this API.

UPDATE INVENTORY
Token generated from above api has to be pass in the Params.
API URL -> https://dev-s1-bs-admin.kartify.in/index.php?route=api/inventory/update&token=oYzbV3noWtSEdnwSjs6DtE6uZabHO516

The request body payload would be –
[{
“store_code”: “BD02”,
“quantity”: 1,
“sku”: “5711647879946”
}
]
Store code : Virtual Distribution Center code;
quantity : Inventory count for the EAN;
sku : EAN,

You will get response like this –
{
“success”: “Success: Inventory successfully updated!”,
“inventories”: [{
“store_code”: “BD02”,
“quantity”: 49,
“sku”: “5715097168339”,
“updated”: 0
}]
}

If you get success in response, that means inventories have been successfully updated.
updated: if a particular EAN is updated, then its value would be 1 and 0 otherwise.