Skip to content

Magento 2 : Assign products to a source Api doesn’t works properly

when we use assign products to a source using api then it creating only Qty instead of qty & salable qty.

Endpoint :- {{base_url}}/rest/default/V1/inventory/source-items

Method :- POST

Payload :-

{
    "sourceItems": [
        {
            "sku": "01451",
            "source_code": "default",
            "quantity": 447,
            "status": 1
        },
        {
            "sku": "01451",
            "source_code": "temp_ts",
            "quantity": 755,
            "status": 1
        }
    ]
}

why it doesn’t creating salable qty. & how to we can create qty & salable qty of multiple products using single request rest api?

Note:- My magento version is 2.4.4 Open source

Please help me. Thanks