1

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.

2 Answers 2

0

This is a CE feature!

https://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

Example:

Synchronous route: PUT /V1/products/:sku/media/:entryId

Asynchronous route/Bulk: PUT async/bulk/V1/products/bySku/media/byEntryId

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.