cancel
Showing results for 
Search instead for 
Did you mean: 

UPDATE - Stock quantity (API)

SOLVED

UPDATE - Stock quantity (API)

Hi, Everyone

 

Is it possible to update the stock quantity of a list of SKUs/Qty via API?

 

I would like to pass to API a list for example:
"sku" => "some_sku", "qty" => 10; "sku" => "some_sku", "qty" => 8; "sku" => "some_sku", "qty" => 5

 

Thank you very much!

Luciano

1 ACCEPTED SOLUTION

Accepted Solutions

Re: UPDATE - Stock quantity (API)

Hi,

Ok, I understood.

 

Thank you for your help!!

 

Luciano

 

View solution in original post

3 REPLIES 3

Re: UPDATE - Stock quantity (API)

I think it is not possible OOTB. You have 2 options:

 

1) Use some of available endpoints https://devdocs.magento.com/guides/v2.3/rest/list.html?source=pepperjam&publisherId=96525&clickId=28... .

 

2) Build an extension which would accept your data and process it. Here is an example https://www.mageplaza.com/devdocs/magento-2-create-api/

 

 

 

Re: UPDATE - Stock quantity (API)

Hello @dbeljic 

 

In Magento have default API, PUT: /V1/products/{sku} using this you can update specific sku inventory only. In default you can not update multiple SKU's.

Param:

{
  "product": {
    "sku": "test-SKU",
    "name": "Test",
    "attribute_set_id": 4,
    "price": 100,
    "status": 1
  }
}

Manish Mittal
https://www.manishmittal.com/

Re: UPDATE - Stock quantity (API)

Hi,

Ok, I understood.

 

Thank you for your help!!

 

Luciano