How to update price and quantity in bulk using rest api, provide us the process to update in bulk using rest api.
Single price and quantity is updated using rest api, but i need to update in bulk using rest api.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityhttps://devdocs.magento.com/guides/v2.3/rest/bulk-endpoints.html
simply use async/bulk
before your endpoint URL
then provide your payloads as an array
Synchronous route: PUT /V1/products/:sku/media/:entryId
Asynchronous route/Bulk: PUT async/bulk/V1/products/bySku/media/byEntryId
In my case I used this endpoint to update base prices: //www.your-website.com/{optional_store_view_to_update}/rest/async/bulk/V1/products/base-prices
Your json object should look like this:
[
{
"prices":
[
{
"price": 12,
"store_id": 1,
"sku": "yyyy"
},
{
"price": 11,
"store_id": 1,
"sku": "xxxx"
}
]
}
]
The same should apply to inventory: //www.your-website.com/{optional_store_view_to_update}/rest/async/bulk/V1/inventory/source-items