Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Greetings, Umbraco community!
I'm implementing a website headlessly and have run into some issues with Umbraco Commerce. Here's my situation:
I'm uncertain how to pass products to the API correctly. According to Swagger, the request body should look like this:
json { "productReference": "string", "productVariantReference": "string", "quantity": 0, "properties": { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" }, "bundleId": "string" }
However, for the products in my content tree, I've only added: - SKU (a text string) - Price (Umbraco.Commerce.Price)
When I provide just these details, I get an error: "Value cannot be null. (Parameter 'productSnapshot')"
"Value cannot be null. (Parameter 'productSnapshot')"
I'm quite new to Umbraco Commerce, so any guidance or resources would be greatly appreciated. Thanks in advance for your help!
So the issue was simply that i passed the SKU as productReference. What i needed to pass was the products ID, which is a guid.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Problems setting up headless Umbraco Commerce - Storefront API
Greetings, Umbraco community!
I'm implementing a website headlessly and have run into some issues with Umbraco Commerce. Here's my situation:
The Issue
I'm uncertain how to pass products to the API correctly. According to Swagger, the request body should look like this:
json { "productReference": "string", "productVariantReference": "string", "quantity": 0, "properties": { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" }, "bundleId": "string" }
However, for the products in my content tree, I've only added: - SKU (a text string) - Price (Umbraco.Commerce.Price)
When I provide just these details, I get an error:
"Value cannot be null. (Parameter 'productSnapshot')"
Questions
I'm quite new to Umbraco Commerce, so any guidance or resources would be greatly appreciated. Thanks in advance for your help!
So the issue was simply that i passed the SKU as productReference. What i needed to pass was the products ID, which is a guid.
is working on a reply...