0

I am trying to update the quantity of products using the rest api call: {HostUrl}/rest/default/V1/inventory/source-items with the below data:

{
  "sourceItems": [
    {
      "sku": "EXAMPLE_SKU",
      "quantity": 4,
      "status": 1
    }
  ]
}

However, this is returning a 404 response saying that the route cannot be found. The route appears to be correct according to the Magento 2.4 static api documentation.

Other routes such as {HostUrl}/rest/V1/store/storeViews work without a problem and the permissions for modifying products/inventory have been given, so I'm at a dead end to understanding why this isn't working.

Any solution or advice will be massively appreciated :)

1
  • Do you have permission to the Magento_InventoryApi::source resource? – Jimmy Apr 14 at 2:00
0

Remove default from the url {HostUrl}/rest/default/V1/inventory/source-items.

3
  • Hi Rahul, thanks for the suggestion. Unfortunately, this did not work. – Zak Dowsett Apr 8 at 9:57
  • Have you checked with this url {HostUrl}/rest/V1/inventory/source-items ? – Rahul Barot Apr 8 at 11:16
  • Hi Rahul, yes I tried that. I got the same 404 response. – Zak Dowsett Apr 8 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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