I am trying on the api for adding an item to the shopping cart; that's, the /cart/{categoryId}/{productId}/{skuId}. According to the documentation, this Api can be executed using POST method without any requirements on query parameters, so I tried invoking it with localhost:8080/api/cart/2003/100?skuId=100&customerId=1101. However, that request caused me with the following error:
Code: Select all
[ERROR] 02:15:57 DefaultErrorHandler - An error occurred during the workflow
org.broadleafcommerce.core.order.service.exception.RequiredAttributeNotProvidedException: Unable to add to product (100) cart. Required attribute was not provided: COLOR
I did this experiment with DemoSite's database and BroadLeaf 2.2. I requested to that url because I did checking out the code from the repository and saw that the requested URI is not exactly the one shown in the documentation. I also tested with checkout Api and it caused similar error. However, such problems are not occurred with GET methods.
Therefore, if anyone knows how to solve this problems, please let me know. Looking forward to your answers.
Thank you in advance.