Posted on 08/06/2026 14:52:51
Explain why you added orderlinetype and productnumber to the payload? Why both a productnumber and the productid? Why an orderlineType? I am asking because the docs has another example and I just want to understand what you are trying to accomplish with this combination?
Not sure this is the fix - but drop orderLineType from the AddLineToCart payload entirely for normal catalog products. Send only:
{
"productId": "16018",
"productVariantId": "",
"productLanguageId": "LANG1",
"quantity": 2
}
Let the engine assign the type and resolve the price from the catalog. (productNumber is also optional and only overrides the displayed number - if the product with the productid has a productnumber already, DW will add that it self.
The most likely other potential issues - all verifiable only against your actual data:
- Assortment / user permission. The lookup now passes cart.CustomerAccessUserId (recently changed, commit 94c780f51d). If product 16018 (your second add) is restricted for this cart's user by assortment, GetProductById returns null → and since you send no unitPrice, the line is silently not created (NotFound). Worth checking the second call's HTTP status — was it actually 200?
- Unit pricing. If 16018 has prices defined per a specific unit and your line's UnitId is empty, pricing resolves via DefaultUnitId fallback (PriceProductSelection.cs:66-76) — fine unless the product has no default unit / no unit-less price row.
- No valid price row for that product at the cart's currency/customer-group/quantity — yields 0 legitimately.
To pin it down I need: Was the second product the same productId as the first, or different? What was the HTTP status of the second add? And is product 16018 unit-priced / variant / assortment-restricted?
Also disable live integration to test.