0

I am using Magento 2.1.2 and when I update tier price information using the REST api, the product in website value is modified.

For instance, I issue a POST request on /{website}/V1/products/{sku}/group-prices/{customerGroupId}/tiers/{qty}/price/{price} my Tier prices are OK but the product is being added to other website it was not part of before the tier price update.

Am I doing anything wrong ?

1 Answer 1

1

You need to tell the API which website you want to update - if you say you're adding {website} then it's not going to work.

The way to do this with REST API is to include the store code (child of the website you'd like to update) within the URL.

POST http://www.domain.com/rest/{store_code}/V1/products/{etc}

Give it a try, if it doesn't work then hopefully someone else will be able to assist. The REST API is a bit lacking/buggy when it comes to scope.

Refer to documentation here: http://devdocs.magento.com/guides/v2.0/rest/rest_endpoints.html

2
  • Unfortunately, this is already what I am doing. Commented May 17, 2017 at 16:01
  • Are you having issues creating/updating products also? If not, then perhaps try adding a tier price within the product object to see what happens. If you're using the correct store code then it should be in that particular scope and not add any more sites - although as mentioned, it seems like the web API was a bit of an afterthought.
    – BAF
    Commented May 17, 2017 at 16:15

Your Answer

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

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