Getting error with shoppingCartType. Request is addProductToCartFromDetails. I am trying to make a request with fetcher library.
My payload looks like this. From this i am getting shoppingCartType is required
payload1:
{
productId: 1,
shoppingCartType: "ShoppingCart",
}
another payload looks like this:
payload2:
``
{
productId: Number(_productId.value),
shoppingCartType: {
shoppingCartType: "ShoppingCart",
},
}
``
but from it i got this error {
"errors": {
"shoppingCartType": [
"Unexpected character encountered while parsing value: {. Path 'shoppingCartType', line 1, position 21.",
"After parsing a value an unexpected character was encountered: :. Path 'shoppingCartType', line 1, position 39."
]
},
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": ""
}