Import of product stock

Function catalog/importResidues (http://<DOMAIN>/api/catalog/importResidues/)

Outdated feature

Use the catalog/import function to update product balances


Parameters:

  • token - authorization key obtained through the auth function
  • products[] - list of products
    • products[i].article - product article
    • products[i].warehouse - warehouse
      • office - main warehouse
    • products[i].quantity - quantity of goods in the warehouse

Response:

  • status - status of the function execution
    • OK - all records were updated successfully
    • WARNING - errors occurred while updating some records
  • response.log - log of function execution for each record
    • response.log[i].article - product article
    • response.log[i].status - record update status
      • OK - everything was updated successfully
      • ERROR - update error
    • response.log[i].message - status explanation


Query example http://<DOMAIN>/api/catalog/importResidues/:

{
 "token": "7abd7fbadb3920e48b3961181b4cd3e5",
 "products": [
   {"article": "00090001", "warehouse": "office", "quantity": 10},
   {"article": "00090002", "warehouse": "office", "quantity": 0},
   {"article": "00090003", "warehouse": "affice", "quantity": 2}
 ]
}

Response example

{
 "status": "WARNING",
 "response": {
   "log": [
   {"article": "00090001", "status": "OK", "message": "UPDATED"},
   {"article": "00090002", "status": "OK", "message": "UPDATED"},
   {"article": "00090003", "status": "ERROR", "message": "Warehouse affice is not defined"}
   ]
 }
}