Magento2: Price not saved when creating product via REST API

Created on 17 Jan 2017  路  17Comments  路  Source: magento/magento2


Preconditions


  1. Magento 2.1.2

Steps to reproduce

  1. Do a POST request to /products with a minimum payload to create a product.

{
"product": {
"sku": "test",
"name": "test",
"price": 12.5,
"attribute_set_id": 4
}
}

Expected result

  1. Product is returned with all given fields filled in.

Actual result

  1. Product is returned without the price. Saving (updating) the product via the same request does save the price.

Confirmed PR Created Dev.Experience

Most helpful comment

Hi @cherreman thank you for report
We've created internal ticket MAGETWO-63336 to address this issue.
As a workaround add to payload request "type_id": "simple"

All 17 comments

Same here on 2.1.3

Hi @cherreman thank you for report
We've created internal ticket MAGETWO-63336 to address this issue.
As a workaround add to payload request "type_id": "simple"

I can confirm that the workaround works.

This still appears to be broken in 2.1.6 (even with a type_id specified) under the following conditions:

  • POST
  • Store-scope request

@cherreman, thank you for your report.
We've created internal ticket(s) MAGETWO-63336 to track progress on the issue.

mm19pl

@Jarzebowsky thank you for joining. Please accept team invitation here and self-assign the issue.

Hi @Jarzebowsky. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

  • [ ] 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
  • [ ] 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


pawel989 #mm19pl

@pawel989 thank you for joining. Please accept team invitation here and self-assign the issue.

Hi @pawel989. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

  • [ ] 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
  • [ ] 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


Hi @cherreman. Thank you for your report.
To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


Need to check /products REST API documentation and update if needed

Hi @cherreman. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


  • Join Magento Community Engineering Slack and ask your questions in #github channel.

    :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

:white_check_mark: Confirmed by @sivaschenko
Thank you for verifying the issue. Based on the provided information internal tickets MC-38419 were created

Issue Available: @sivaschenko, _You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself._

Closed in favor of this Issue https://github.com/magento/magento2/issues/13639 that already has a PR.

Unfortunately, we are archiving this ticket now as it did not get much attention from both Magento Community and Core developers for an extended period. This is done in an effort to create a quality, community-driven backlog which will allow us to allocate the required attention more easily.

Please feel free to comment or reopen according to the Issue reporting guidelines
the ticket if you are still facing this issue on the latest 2.x-develop branch. Thank you for collaboration.

Was this page helpful?
0 / 5 - 0 ratings