- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015
09:24 AM
06-16-2015
09:24 AM
Hello everybody,
I'm currently trying to create a software which use the REST API. All is ok but, when I want to add a product and in the same time the stock infos, magento answer that the product is created but nothing is done in the inventory tab... (qty : 0 and out of stock)
Here is an example in Json :
{ "type_id":"simple", "attribute_set_id":4, "sku":"test_dress", "name":"Test_dress", "price":"2000.000", "weight":"0.5000", "status":1, "visibility":4, "tax_class_id":0, "description":"dress", "short_description":"Wedding dress", "country_of_manufacture":"AD", "special_price":"1500.0000", "stock_data":{ "qty":"53", "is_qty_decimal":0, "is_in_stock":1, "is_decimal_divided":0 } }
The resource access is set to "all" (REST - Roles and REST - Attributes).
If somebody can help me... Thank you !
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015
09:37 AM
06-16-2015
09:37 AM
Problem solved : manage_stock need to be setted to 1 in the request.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015
09:37 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015
09:55 AM
06-16-2015
09:55 AM
Re: REST API issue : creating a product with stock_data
Glad to hear you got it sorted @thom540, thanks for sharing your solution!
--
Developer Relations, Adobe Experience Cloud
Problem solved? Click Accept as Solution!
Still stuck? Check out our documentation: https://magento.com/resources/technical
Developer Relations, Adobe Experience Cloud
Problem solved? Click Accept as Solution!
Still stuck? Check out our documentation: https://magento.com/resources/technical