Developer forum

Forum » Dynamicweb 10 » Cannot remove favorite product using webapi

Cannot remove favorite product using webapi

Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi,

 

Using 10.24.5, I'm trying to use the DELETE method with /dwapi/ecommerce/favorites/items/{listId}/{id}.

 

Documentation suggests that I need the "favorite entry Id", but I can't seem to find it in any of Get routes. I eventually tried using the product id as the "id", but gave me an error (as expected).

Looking at the source code, it does seem that I need the autoId to do a Delete, but I can't find it being rendered in the list of products within a list.

 

Is this a bug, or am I missing something?

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
Hi Nuno,
 
This is actually working as intended — the id field in the GET response is the AutoId, just exposed under a friendlier name.
 
When you call GET /dwapi/ecommerce/favorites/items/{listId}, each item in the response has an id field:
 
{
  "id": 9,
  "productId": "PROD101",
  "productVariantId": "",
  ...
}
That id is the value you pass as {id} in the DELETE call:
 
DELETE /dwapi/ecommerce/favorites/items/{listId}/9
The internal entity property is named AutoId, but the API maps it to id in the response — so you won't find a field literally called autoId in the JSON. The Swagger docs for the DELETE endpoint do mention this: "the favorite entry ID is identified as 'id' in the response", but I agree it could be clearer.
 
Let me know if that helps!
 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Nicolai,

 

I understand, but then the problem is in the list of favorite products - Id is returning the productId, not the AutoId

 

Take a look at my screencast trying to use "id" from the list of favorite products to delete it https://app.screencast.com/VEtWSkoAIgloX - I get a "No matching product found." error

 

Based on your information, I got the AutoId from the database and still could not get it to work https://app.screencast.com/IjoQiUm2Pxgzd

 

 

Am I missing something?

 

BR

Nuno Aguiar

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Nuno,

Sorry for the confusion — I should have verified first before answering.

I've just gone through the source code again more carefully. The mapping is correct on our end:

GET /dwapi/ecommerce/favorites/items/{listId} → each item's id field is populated from favoriteProduct.AutoId (not ProductId)
DELETE /dwapi/ecommerce/favorites/items/{listId}/{id} → looks up the favorite by AutoId == id
So the design is consistent. Could you share the raw JSON response from the GET call? I'd like to see what id and productId values are coming back for you — it's possible there's something environment-specific going on (e.g. a cached/old build, or a different endpoint being hit). The "No matching product found" error from the DELETE would only happen if no FavoriteProduct with that AutoId exists for that listId, which could point to a list ID mismatch rather than an ID field issue.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

You need to get the items from the list from items/{listId}

You are retrieving the products on that list

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Nicolai,

 

No worries. Here's the full response. I only have 1 list with 4 products in it. If you want I can also share the username and password (and site) if that helps

 

{
  "pageSize": 0,
  "pageCount": 0,
  "currentPage": 0,
  "totalFavoriteListsCount": 0,
  "favoriteLists": [
    {
      "id": 146,
      "name": "Hello world",
      "description": "",
      "userId": 1348,
      "isDefault": true,
      "productList": {
        "products": [
          {
            "id": "413123",
            "variantId": "",
            "languageId": "ENU",
            "name": "A/C - Ceiling Assembly Kit - Advent Air - Analog - W/Flash Freeze",
            "title": "A/C - Ceiling Assembly Kit - Advent Air - Analog - W/Flash Freeze",
            "shortDescription": "",
            "longDescription": "",
            "metaDescription": "",
            "metaCanonical": "",
            "metaTitle": "",
            "metaKeywords": "",
            "number": "413123",
            "created": "2025-10-21T16:18:25",
            "updated": "2025-10-21T16:18:25",
            "keywords": "",
            "stockLevel": 0,
            "weight": 0,
            "productType": "stock",
            "priceType": "calculated",
            "width": 0,
            "height": 0,
            "depth": 0,
            "purchaseMinimumQuantity": 0,
            "purchaseQuantityStep": 0,
            "cost": 0,
            "ean": "",
            "discontinued": false,
            "discontinuedAction": 0,
            "pointPrice": 0,
            "defaultVariantId": "",
            "defaultUnitId": "",
            "variantName": "",
            "active": true,
            "rating": 0,
            "replacementProduct": {
              "productId": "",
              "variantId": ""
            },
            "price": {
              "showPricesWithVat": false,
              "price": 72.2,
              "priceFormatted": "$72.20",
              "priceFormattedNoSymbol": "72.20",
              "priceWithoutVat": 72.2,
              "priceWithoutVatFormatted": "$72.20",
              "priceWithVat": 72.2,
              "priceWithVatFormatted": "$72.20",
              "vat": 0,
              "vatFormatted": "$0.00",
              "vatPercent": 0,
              "vatPercentFormatted": "0%",
              "currencyCode": "USD",
              "reverseChargeForVat": false
            },
            "priceInformative": {
              "showPricesWithVat": false,
              "price": 0,
              "priceWithoutVat": 0,
              "priceWithVat": 0,
              "vat": 0,
              "vatPercent": 0,
              "reverseChargeForVat": false
            },
            "priceBeforeDiscount": {
              "showPricesWithVat": false,
              "price": 72.2,
              "priceFormatted": "$72.20",
              "priceFormattedNoSymbol": "72.20",
              "priceWithoutVat": 72.2,
              "priceWithoutVatFormatted": "$72.20",
              "priceWithVat": 72.2,
              "priceWithVatFormatted": "$72.20",
              "vat": 0,
              "vatFormatted": "$0.00",
              "vatPercent": 0,
              "vatPercentFormatted": "0%",
              "currencyCode": "USD",
              "reverseChargeForVat": false
            },
            "discount": {
              "showPricesWithVat": false,
              "price": 0,
              "priceFormatted": "$0.00",
              "priceFormattedNoSymbol": "0.00",
              "priceWithoutVat": 0,
              "priceWithoutVatFormatted": "$0.00",
              "priceWithVat": 0,
              "priceWithVatFormatted": "$0.00",
              "vat": 0,
              "vatFormatted": "$0.00",
              "vatPercent": 0,
              "vatPercentFormatted": "0%",
              "currencyCode": "USD",
              "reverseChargeForVat": false
            },
            "productDiscounts": [],
            "prices": [],
            "productFields": {},
            "productCategories": {
              "information_bullets": {
                "id": "information_bullets",
                "name": "Information Bullets",
                "fields": {
                  "Bullets_1": {
                    "systemName": "Bullets_1",
                    "name": "Bullets 1",
                    "type": "Text",
                    "listType": 0
                  },
                  "Bullets_2": {
                    "systemName": "Bullets_2",
                    "name": "Bullets 2",
                    "type": "Text",
                    "listType": 0
                  },
                  "Listbox1": {
                    "systemName": "Listbox1",
                    "name": "Listbox-1",
                    "type": "List",
                    "value": [],
                    "listType": 0
                  },
                  "Number1": {
                    "systemName": "Number1",
                    "name": "Number-1",
                    "type": "Integer",
                    "listType": 0
                  }
                }
              }
            },
            "fieldDisplayGroups": {
              "All_specs": {
                "id": "All_specs",
                "name": "All specs",
                "fields": {
                  "ProductVolume": {
                    "systemName": "ProductVolume",
                    "name": "Volume",
                    "type": "Double",
                    "value": [
                      {
                        "name": "0 m³",
                        "value": "0"
                      }
                    ],
                    "listType": 0
                  },
                  "ProductWeight": {
                    "systemName": "ProductWeight",
                    "name": "Weight",
                    "type": "Double",
                    "value": [
                      {
                        "name": "0 kg",
                        "value": "0"
                      }
                    ],
                    "listType": 0
                  },
                  "ProductWidth": {
                    "systemName": "ProductWidth",
                    "name": "Width",
                    "type": "Double",
                    "value": [
                      {
                        "name": "0 cm",
                        "value": "0"
                      }
                    ],
                    "listType": 0
                  },
                  "ProductHeight": {
                    "systemName": "ProductHeight",
                    "name": "Height",
                    "type": "Double",
                    "value": [
                      {
                        "name": "0 cm",
                        "value": "0"
                      }
                    ],
                    "listType": 0
                  }
                }
              }
            },
            "groups": [],
            "primaryOrDefaultGroup": {
              "id": "L1-KRVTop-L2-Alpine-L3-AL2024-L4-AL24AP-L5-AL24AP_011",
              "name": "A/C",
              "primaryPageId": 0
            },
            "variantInfo": {
              "productID": "413123",
              "variantID": "",
              "optionSort": 0,
              "productName": "A/C - Ceiling Assembly Kit - Advent Air - Analog - W/Flash Freeze",
              "productNumber": "413123",
              "productStock": 0,
              "variantGroupDisplayType": "nothingSelected",
              "image": {
                "value": "/files/Images/nopic.png",
                "name": "Default",
                "keywords": "",
                "displayName": ""
              },
              "price": {
                "showPricesWithVat": false,
                "price": 72.2,
                "priceFormatted": "$72.20",
                "priceFormattedNoSymbol": "72.20",
                "priceWithoutVat": 72.2,
                "priceWithoutVatFormatted": "$72.20",
                "priceWithVat": 72.2,
                "priceWithVatFormatted": "$72.20",
                "vat": 0,
                "vatFormatted": "$0.00",
                "vatPercent": 0,
                "vatPercentFormatted": "0%",
                "currencyCode": "USD",
                "reverseChargeForVat": false
              },
              "priceMin": {
                "showPricesWithVat": false,
                "price": 72.2,
                "priceFormatted": "$72.20",
                "priceFormattedNoSymbol": "72.20",
                "priceWithoutVat": 72.2,
                "priceWithoutVatFormatted": "$72.20",
                "priceWithVat": 72.2,
                "priceWithVatFormatted": "$72.20",
                "vat": 0,
                "vatFormatted": "$0.00",
                "vatPercent": 0,
                "vatPercentFormatted": "0%",
                "currencyCode": "USD",
                "reverseChargeForVat": false
              },
              "priceMax": {
                "showPricesWithVat": false,
                "price": 72.2,
                "priceFormatted": "$72.20",
                "priceFormattedNoSymbol": "72.20",
                "priceWithoutVat": 72.2,
                "priceWithoutVatFormatted": "$72.20",
                "priceWithVat": 72.2,
                "priceWithVatFormatted": "$72.20",
                "vat": 0,
                "vatFormatted": "$0.00",
                "vatPercent": 0,
                "vatPercentFormatted": "0%",
                "currencyCode": "USD",
                "reverseChargeForVat": false
              },
              "stock": 0
            },
            "defaultImage": {
              "value": "/files/Images/nopic.png",
              "name": "Default",
              "keywords": "",
              "displayName": ""
            },
            "groupPaths": [],
            "imagePatternImages": [],
            "manufacturer": {},
            "assetCategories": [],
            "neverOutOfstock": false,
            "stockUnits": [],
            "unitOptions": [],
            "relatedGroups": [],
            "externalId": "",
            "externalVariantId": "",
            "uniqueId": "f0bc2fc6-efbe-f011-8194-6045bdb8f14b"
          },
          {
            "id": "553599",
            "variantId": "",
            "languageId": "ENU",
            "name": "A/C - Air Box - Knob Only - Fan Motor - Speed Control - Knob",
            "title": "A/C - Air Box - Knob Only - Fan Motor - Speed Control - Knob",
            "shortDescription": "",
            "longDescription": "",
            "metaDescription": "",
            "metaCanonical": "",
            "metaTitle": "",
            "metaKeywords": "",
            "number": "553599",
            "created": "2025-10-21T16:18:25",
            "updated": "2026-02-25T16:46:33.557",
            "keywords": "",
            "stockLevel": 33,
            "weight": 0,
            "productType": "stock",
            "priceType": "calculated",
            "width": 0,
            "height": 0,
            "depth": 0,
            "purchaseMinimumQuantity": 0,
            "purchaseQuantityStep": 0,
            "cost": 0,
            "ean": "",
            "discontinued": false,
            "discontinuedAction": 0,
            "pointPrice": 0,
            "defaultVariantId": "",
            "defaultUnitId": "",
            "variantName": "",
            "active": true,
            "rating": 0,
            "replacementProduct": {
              "productId": "",
              "variantId": ""
            },
            "price": {
              "showPricesWithVat": false,
              "price": 18.16,
              "priceFormatted": "$18.16",
              "priceFormattedNoSymbol": "18.16",
              "priceWithoutVat": 18.16,
              "priceWithoutVatFormatted": "$18.16",
              "priceWithVat": 18.16,
              "priceWithVatFormatted": "$18.16",
              "vat": 0,
              "vatFormatted": "$0.00",
              "vatPercent": 0,
              "vatPercentFormatted": "0%",
              "currencyCode": "USD",
              "reverseChargeForVat": false
            },
            "priceInformative": {
              "showPricesWithVat": false,
              "price": 0,
              "priceWithoutVat": 0,
              "priceWithVat": 0,
              "vat": 0,
              "vatPercent": 0,
              "reverseChargeForVat": false
            },
            "priceBeforeDiscount": {
              "showPricesWithVat": false,
              "price": 18.16,
              "priceFormatted": "$18.16",
              "priceFormattedNoSymbol": "18.16",
              "priceWithoutVat": 18.16,
              "priceWithoutVatFormatted": "$18.16",
              "priceWithVat": 18.16,
              "priceWithVatFormatted": "$18.16",
              "vat": 0,
              "vatFormatted": "$0.00",
              "vatPercent": 0,
              "vatPercentFormatted": "0%",
              "currencyCode": "USD",
              "reverseChargeForVat": false
            },
            "discount": {
              "showPricesWithVat": false,
              "price": 0,
              "priceFormatted": "$0.00",
              "priceFormattedNoSymbol": "0.00",
              "priceWithoutVat": 0,
              "priceWithoutVatFormatted": "$0.00",
              "priceWithVat": 0,
              "priceWithVatFormatted": "$0.00",
              "vat": 0,
              "vatFormatted": "$0.00",
              "vatPercent": 0,
              "vatPercentFormatted": "0%",
              "currencyCode": "USD",
              "reverseChargeForVat": false
            },
            "productDiscounts": [],
            "prices": [],
            "productFields": {},
            "productCategories": {
              "information_bullets": {
                "id": "information_bullets",
                "name": "Information Bullets",
                "fields": {
                  "Bullets_1": {
                    "systemName": "Bullets_1",
                    "name": "Bullets 1",
                    "type": "Text",
                    "listType": 0
                  },
                  "Bullets_2": {
                    "systemName": "Bullets_2",
                    "name": "Bullets 2",
                    "type": "Text",
                    "listType": 0
                  },
                  "Listbox1": {
                    "systemName": "Listbox1",
                    "name": "Listbox-1",
                    "type": "List",
                    "value": [],
                    "listType": 0
                  },
                  "Number1": {
                    "systemName": "Number1",
                    "name": "Number-1",
                    "type": "Integer",
                    "listType": 0
                  }
                }
              }
            },
            "fieldDisplayGroups": {
              "All_specs": {
                "id": "All_specs",
                "name": "All specs",
                "fields": {
                  "ProductVolume": {
                    "systemName": "ProductVolume",
                    "name": "Volume",
                    "type": "Double",
                    "value": [
                      {
                        "name": "0 m³",
                        "value": "0"
                      }
                    ],
                    "listType": 0
                  },
                  "ProductWeight": {
                    "systemName": "ProductWeight",
                    "name": "Weight",
                    "type": "Double",
                    "value": [
                      {
                        "name": "0 kg",
                        "value": "0"
                      }
                    ],
                    "listType": 0
                  },
                  "ProductWidth": {
                    "systemName": "ProductWidth",
                    "name": "Width",
                    "type": "Double",
                    "value": [
                      {
                        "name": "0 cm",
                        "value": "0"
                      }
                    ],
                    "listType": 0
                  },
                  "ProductHeight": {
                    "systemName": "ProductHeight",
                    "name": "Height",
                    "type": "Double",
                    "value": [
                      {
                        "name": "0 cm",
                        "value": "0"
                      }
                    ],
                    "listType": 0
                  }
                }
              }
            },
            "groups": [],
            "primaryOrDefaultGroup": {
              "id": "L1-KRVTop-L2-Alpine-L3-AL2024-L4-AL24AP-L5-AL24AP_011",
              "name": "A/C",
              "primaryPageId": 0
            },
            "variantInfo": {
              "productID": "553599",
              "variantID": "",
              "optionSort": 0,
              "productName": "A/C - Air Box - Knob Only - Fan Motor - Speed Control - Knob",
              "productNumber": "553599",
              "productStock": 33,
              "variantGroupDisplayType": "nothingSelected",
              "image": {
                "value": "/files/Images/nopic.png",
                "name": "Default",
                "keywords": "",
                "displayName": ""
              },
              "price": {
                "showPricesWithVat": false,
                "price": 18.16,
                "priceFormatted": "$18.16",
                "priceFormattedNoSymbol": "18.16",
                "priceWithoutVat": 18.16,
                "priceWithoutVatFormatted": "$18.16",
                "priceWithVat": 18.16,
                "priceWithVatFormatted": "$18.16",
                "vat": 0,
                "vatFormatted": "$0.00",
                "vatPercent": 0,
                "vatPercentFormatted": "0%",
                "currencyCode": "USD",
                "reverseChargeForVat": false
              },
              "priceMin": {
                "showPricesWithVat": false,
                "price": 18.16,
                "priceFormatted": "$18.16",
                "priceFormattedNoSymbol": "18.16",
                "priceWithoutVat": 18.16,
                "priceWithoutVatFormatted": "$18.16",
                "priceWithVat": 18.16,
                "priceWithVatFormatted": "$18.16",
                "vat": 0,
                "vatFormatted": "$0.00",
                "vatPercent": 0,
                "vatPercentFormatted": "0%",
                "currencyCode": "USD",
                "reverseChargeForVat": false
              },
              "priceMax": {
                "showPricesWithVat": false,
                "price": 18.16,
                "priceFormatted": "$18.16",
                "priceFormattedNoSymbol": "18.16",
                "priceWithoutVat": 18.16,
                "priceWithoutVatFormatted": "$18.16",
                "priceWithVat": 18.16,
                "priceWithVatFormatted": "$18.16",
                "vat": 0,
                "vatFormatted": "$0.00",
                "vatPercent": 0,
                "vatPercentFormatted": "0%",
                "currencyCode": "USD",
                "reverseChargeForVat": false
              },
              "stock": 33
            },
            "defaultImage": {
              "value": "/files/Images/nopic.png",
              "name": "Default",
              "keywords": "",
              "displayName": ""
            },
            "groupPaths": [],
            "imagePatternImages": [],
            "manufacturer": {},
            "assetCategories": [],
            "neverOutOfstock": false,
            "stockUnits": [],
            "unitOptions": [],
            "relatedGroups": [],
            "externalId": "",
            "externalVariantId": "",
            "uniqueId": "fbbc2fc6-efbe-f011-8194-6045bdb8f14b"
          },
          {
            "id": "PROD370",
            "variantId": "",
            "languageId": "ENU",
            "name": "My Axl Kit",
            "title": "My Axl Kit",
            "shortDescription": "",
            "longDescription": "",
            "metaDescription": "",
            "metaCanonical": "",
            "metaTitle": "",
            "metaKeywords": "",
            "number": "12345",
            "created": "2026-02-26T21:44:38.543",
            "updated": "2026-02-26T22:01:19.423",
            "keywords": "",
            "stockLevel": 0,
            "weight": 0,
            "productType": "bom",
            "priceType": "fixedPrice",
            "width": 0,
            "height": 0,
            "depth": 0,
            "purchaseMinimumQuantity": 0,
            "purchaseQuantityStep": 0,
            "cost": 0,
            "ean": "",
            "discontinued": false,
            "discontinuedAction": 0,
            "pointPrice": 0,
            "defaultVariantId": "",
            "defaultUnitId": "",
            "variantName": "",
            "active": true,
            "rating": 0,
            "replacementProduct": {
              "productId": "",
              "variantId": ""
            },
            "price": {
              "showPricesWithVat": false,
              "price": 555,
              "priceFormatted": "$555.00",
              "priceFormattedNoSymbol": "555.00",
              "priceWithoutVat": 555,
              "priceWithoutVatFormatted": "$555.00",
              "priceWithVat": 555,
              "priceWithVatFormatted": "$555.00",
              "vat": 0,
              "vatFormatted": "$0.00",
              "vatPercent": 0,
              "vatPercentFormatted": "0%",
              "currencyCode": "USD",
              "reverseChargeForVat": false
            },
            "priceInformative": {
              "showPricesWithVat": false,
              "price": 0,
              "priceWithoutVat": 0,
              "priceWithVat": 0,
              "vat": 0,
              "vatPercent": 0,
              "reverseChargeForVat": false
            },
            "priceBeforeDiscount": {
              "showPricesWithVat": false,
              "price": 555,
              "priceFormatted": "$555.00",
              "priceFormattedNoSymbol": "555.00",
              "priceWithoutVat": 555,
              "priceWithoutVatFormatted": "$555.00",
              "priceWithVat": 555,
              "priceWithVatFormatted": "$555.00",
              "vat": 0,
              "vatFormatted": "$0.00",
              "vatPercent": 0,
              "vatPercentFormatted": "0%",
              "currencyCode": "USD",
              "reverseChargeForVat": false
            },
            "discount": {
              "showPricesWithVat": false,
              "price": 0,
              "priceFormatted": "$0.00",
              "priceFormattedNoSymbol": "0.00",
              "priceWithoutVat": 0,
              "priceWithoutVatFormatted": "$0.00",
              "priceWithVat": 0,
              "priceWithVatFormatted": "$0.00",
              "vat": 0,
              "vatFormatted": "$0.00",
              "vatPercent": 0,
              "vatPercentFormatted": "0%",
              "currencyCode": "USD",
              "reverseChargeForVat": false
            },
            "productDiscounts": [],
            "prices": [],
            "productFields": {},
            "productCategories": {
              "information_bullets": {
                "id": "information_bullets",
                "name": "Information Bullets",
                "fields": {
                  "Bullets_1": {
                    "systemName": "Bullets_1",
                    "name": "Bullets 1",
                    "type": "Text",
                    "listType": 0
                  },
                  "Bullets_2": {
                    "systemName": "Bullets_2",
                    "name": "Bullets 2",
                    "type": "Text",
                    "listType": 0
                  },
                  "Listbox1": {
                    "systemName": "Listbox1",
                    "name": "Listbox-1",
                    "type": "List",
                    "value": [],
                    "listType": 0
                  },
                  "Number1": {
                    "systemName": "Number1",
                    "name": "Number-1",
                    "type": "Integer",
                    "listType": 0
                  }
                }
              }
            },
            "fieldDisplayGroups": {
              "All_specs": {
                "id": "All_specs",
                "name": "All specs",
                "fields": {
                  "ProductVolume": {
                    "systemName": "ProductVolume",
                    "name": "Volume",
                    "type": "Double",
                    "value": [
                      {
                        "name": "0 m³",
                        "value": "0"
                      }
                    ],
                    "listType": 0
                  },
                  "ProductWeight": {
                    "systemName": "ProductWeight",
                    "name": "Weight",
                    "type": "Double",
                    "value": [
                      {
                        "name": "0 kg",
                        "value": "0"
                      }
                    ],
                    "listType": 0
                  },
                  "ProductWidth": {
                    "systemName": "ProductWidth",
                    "name": "Width",
                    "type": "Double",
                    "value": [
                      {
                        "name": "0 cm",
                        "value": "0"
                      }
                    ],
                    "listType": 0
                  },
                  "ProductHeight": {
                    "systemName": "ProductHeight",
                    "name": "Height",
                    "type": "Double",
                    "value": [
                      {
                        "name": "0 cm",
                        "value": "0"
                      }
                    ],
                    "listType": 0
                  }
                }
              }
            },
            "groups": [],
            "primaryOrDefaultGroup": {
              "id": "GROUP486",
              "name": "T1C7-312BHOK Eagle HT TT-MI",
              "primaryPageId": 0
            },
            "variantInfo": {
              "productID": "PROD370",
              "variantID": "",
              "optionSort": 0,
              "productName": "My Axl Kit",
              "productNumber": "12345",
              "productStock": 0,
              "variantGroupDisplayType": "nothingSelected",
              "image": {
                "value": "/files/Images/nopic.png",
                "name": "Default",
                "keywords": "",
                "displayName": ""
              },
              "price": {
                "showPricesWithVat": false,
                "price": 555,
                "priceFormatted": "$555.00",
                "priceFormattedNoSymbol": "555.00",
                "priceWithoutVat": 555,
                "priceWithoutVatFormatted": "$555.00",
                "priceWithVat": 555,
                "priceWithVatFormatted": "$555.00",
                "vat": 0,
                "vatFormatted": "$0.00",
                "vatPercent": 0,
                "vatPercentFormatted": "0%",
                "currencyCode": "USD",
                "reverseChargeForVat": false
              },
              "priceMin": {
                "showPricesWithVat": false,
                "price": 555,
                "priceFormatted": "$555.00",
                "priceFormattedNoSymbol": "555.00",
                "priceWithoutVat": 555,
                "priceWithoutVatFormatted": "$555.00",
                "priceWithVat": 555,
                "priceWithVatFormatted": "$555.00",
                "vat": 0,
                "vatFormatted": "$0.00",
                "vatPercent": 0,
                "vatPercentFormatted": "0%",
                "currencyCode": "USD",
                "reverseChargeForVat": false
              },
              "priceMax": {
                "showPricesWithVat": false,
                "price": 555,
                "priceFormatted": "$555.00",
                "priceFormattedNoSymbol": "555.00",
                "priceWithoutVat": 555,
                "priceWithoutVatFormatted": "$555.00",
                "priceWithVat": 555,
                "priceWithVatFormatted": "$555.00",
                "vat": 0,
                "vatFormatted": "$0.00",
                "vatPercent": 0,
                "vatPercentFormatted": "0%",
                "currencyCode": "USD",
                "reverseChargeForVat": false
              },
              "stock": 0
            },
            "defaultImage": {
              "value": "/files/Images/nopic.png",
              "name": "Default",
              "keywords": "",
              "displayName": ""
            },
            "groupPaths": [],
            "imagePatternImages": [],
            "manufacturer": {},
            "assetCategories": [],
            "neverOutOfstock": true,
            "stockUnits": [],
            "unitOptions": [],
            "relatedGroups": [],
            "externalId": "",
            "externalVariantId": "",
            "uniqueId": "29680e59-5c13-f111-a69b-6045bd795b68"
          },
          {
            "id": "746099",
            "variantId": "",
            "languageId": "ENU",
            "name": "100 Watt Solar Package-Aspen Trail",
            "title": "100 Watt Solar Package-Aspen Trail",
            "shortDescription": "",
            "longDescription": "",
            "metaDescription": "",
            "metaCanonical": "",
            "metaTitle": "",
            "metaKeywords": "",
            "number": "746099",
            "created": "2025-10-21T16:18:25",
            "updated": "2026-02-25T18:22:42.313",
            "keywords": "",
            "stockLevel": 0,
            "weight": 0,
            "productType": "stock",
            "priceType": "calculated",
            "width": 0,
            "height": 0,
            "depth": 0,
            "purchaseMinimumQuantity": 0,
            "purchaseQuantityStep": 0,
            "cost": 0,
            "ean": "",
            "discontinued": false,
            "discontinuedAction": 0,
            "pointPrice": 0,
            "defaultVariantId": "",
            "defaultUnitId": "",
            "variantName": "",
            "active": true,
            "rating": 0,
            "replacementProduct": {
              "productId": "",
              "variantId": ""
            },
            "price": {
              "showPricesWithVat": false,
              "price": 224.42,
              "priceFormatted": "$224.42",
              "priceFormattedNoSymbol": "224.42",
              "priceWithoutVat": 224.42,
              "priceWithoutVatFormatted": "$224.42",
              "priceWithVat": 224.42,
              "priceWithVatFormatted": "$224.42",
              "vat": 0,
              "vatFormatted": "$0.00",
              "vatPercent": 0,
              "vatPercentFormatted": "0%",
              "currencyCode": "USD",
              "reverseChargeForVat": false
            },
            "priceInformative": {
              "showPricesWithVat": false,
              "price": 0,
              "priceWithoutVat": 0,
              "priceWithVat": 0,
              "vat": 0,
              "vatPercent": 0,
              "reverseChargeForVat": false
            },
            "priceBeforeDiscount": {
              "showPricesWithVat": false,
              "price": 224.42,
              "priceFormatted": "$224.42",
              "priceFormattedNoSymbol": "224.42",
              "priceWithoutVat": 224.42,
              "priceWithoutVatFormatted": "$224.42",
              "priceWithVat": 224.42,
              "priceWithVatFormatted": "$224.42",
              "vat": 0,
              "vatFormatted": "$0.00",
              "vatPercent": 0,
              "vatPercentFormatted": "0%",
              "currencyCode": "USD",
              "reverseChargeForVat": false
            },
            "discount": {
              "showPricesWithVat": false,
              "price": 0,
              "priceFormatted": "$0.00",
              "priceFormattedNoSymbol": "0.00",
              "priceWithoutVat": 0,
              "priceWithoutVatFormatted": "$0.00",
              "priceWithVat": 0,
              "priceWithVatFormatted": "$0.00",
              "vat": 0,
              "vatFormatted": "$0.00",
              "vatPercent": 0,
              "vatPercentFormatted": "0%",
              "currencyCode": "USD",
              "reverseChargeForVat": false
            },
            "productDiscounts": [],
            "prices": [],
            "productFields": {},
            "productCategories": {
              "information_bullets": {
                "id": "information_bullets",
                "name": "Information Bullets",
                "fields": {
                  "Bullets_1": {
                    "systemName": "Bullets_1",
                    "name": "Bullets 1",
                    "type": "Text",
                    "listType": 0
                  },
                  "Bullets_2": {
                    "systemName": "Bullets_2",
                    "name": "Bullets 2",
                    "type": "Text",
                    "listType": 0
                  },
                  "Listbox1": {
                    "systemName": "Listbox1",
                    "name": "Listbox-1",
                    "type": "List",
                    "value": [],
                    "listType": 0
                  },
                  "Number1": {
                    "systemName": "Number1",
                    "name": "Number-1",
                    "type": "Integer",
                    "listType": 0
                  }
                }
              }
            },
            "fieldDisplayGroups": {
              "All_specs": {
                "id": "All_specs",
                "name": "All specs",
                "fields": {
                  "ProductVolume": {
                    "systemName": "ProductVolume",
                    "name": "Volume",
                    "type": "Double",
                    "value": [
                      {
                        "name": "0 m³",
                        "value": "0"
                      }
                    ],
                    "listType": 0
                  },
                  "ProductWeight": {
                    "systemName": "ProductWeight",
                    "name": "Weight",
                    "type": "Double",
                    "value": [
                      {
                        "name": "0 kg",
                        "value": "0"
                      }
                    ],
                    "listType": 0
                  },
                  "ProductWidth": {
                    "systemName": "ProductWidth",
                    "name": "Width",
                    "type": "Double",
                    "value": [
                      {
                        "name": "0 cm",
                        "value": "0"
                      }
                    ],
                    "listType": 0
                  },
                  "ProductHeight": {
                    "systemName": "ProductHeight",
                    "name": "Height",
                    "type": "Double",
                    "value": [
                      {
                        "name": "0 cm",
                        "value": "0"
                      }
                    ],
                    "listType": 0
                  }
                }
              }
            },
            "groups": [],
            "primaryOrDefaultGroup": {
              "id": "L1-KRVTop-L2-Alpine-L3-AL2024-L4-AL24RU-L5-AL24RU_67R",
              "name": "Roof",
              "primaryPageId": 0
            },
            "variantInfo": {
              "productID": "746099",
              "variantID": "",
              "optionSort": 0,
              "productName": "100 Watt Solar Package-Aspen Trail",
              "productNumber": "746099",
              "productStock": 0,
              "variantGroupDisplayType": "nothingSelected",
              "image": {
                "value": "/files/Images/nopic.png",
                "name": "Default",
                "keywords": "",
                "displayName": ""
              },
              "price": {
                "showPricesWithVat": false,
                "price": 224.42,
                "priceFormatted": "$224.42",
                "priceFormattedNoSymbol": "224.42",
                "priceWithoutVat": 224.42,
                "priceWithoutVatFormatted": "$224.42",
                "priceWithVat": 224.42,
                "priceWithVatFormatted": "$224.42",
                "vat": 0,
                "vatFormatted": "$0.00",
                "vatPercent": 0,
                "vatPercentFormatted": "0%",
                "currencyCode": "USD",
                "reverseChargeForVat": false
              },
              "priceMin": {
                "showPricesWithVat": false,
                "price": 224.42,
                "priceFormatted": "$224.42",
                "priceFormattedNoSymbol": "224.42",
                "priceWithoutVat": 224.42,
                "priceWithoutVatFormatted": "$224.42",
                "priceWithVat": 224.42,
                "priceWithVatFormatted": "$224.42",
                "vat": 0,
                "vatFormatted": "$0.00",
                "vatPercent": 0,
                "vatPercentFormatted": "0%",
                "currencyCode": "USD",
                "reverseChargeForVat": false
              },
              "priceMax": {
                "showPricesWithVat": false,
                "price": 224.42,
                "priceFormatted": "$224.42",
                "priceFormattedNoSymbol": "224.42",
                "priceWithoutVat": 224.42,
                "priceWithoutVatFormatted": "$224.42",
                "priceWithVat": 224.42,
                "priceWithVatFormatted": "$224.42",
                "vat": 0,
                "vatFormatted": "$0.00",
                "vatPercent": 0,
                "vatPercentFormatted": "0%",
                "currencyCode": "USD",
                "reverseChargeForVat": false
              },
              "stock": 0
            },
            "defaultImage": {
              "value": "/files/Images/nopic.png",
              "name": "Default",
              "keywords": "",
              "displayName": ""
            },
            "groupPaths": [],
            "imagePatternImages": [],
            "manufacturer": {},
            "assetCategories": [],
            "neverOutOfstock": true,
            "stockUnits": [],
            "unitOptions": [],
            "relatedGroups": [],
            "externalId": "",
            "externalVariantId": "",
            "uniqueId": "21bd2fc6-efbe-f011-8194-6045bdb8f14b"
          }
        ],
        "pageSize": 0,
        "pageCount": 0,
        "currentPage": 0,
        "totalProductsCount": 4
      }
    }
  ]
}

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Oh wait, I missed your other reply. Let me give that a go

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Yes - that is the list of the products on the list. Use the endpoint I added.

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Nicolai,

 

Yep, I got it to work, thanks.

 

Feels a bit clunky in the frontend because I need to always get /dwapi/ecommerce/favorites/lists/{id} do to some hydration of the page, but also call /dwapi/ecommerce/favorites/items/{listId} just because of the "id" to be able to delete items. Feels like the list of favorites should really provide the auto id (and rename "id" to "productid") so I wouldn't have to make the call to /items/{listid} just for the sake of the autoId

 

Best Regards

Nuno Aguiar

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi again Nicolai,

 

I took the next step. So now I need to:

  • Call /dwapi/ecommerce/favorites/lists/{id} to get all of the authenticated user's lists
    • This alone helps me identify if a product is in a favorite list and we can add the proper icon/toggle
  • But to remove from favorites I need to call /dwapi/ecommerce/favorites/items/{listId} for each list to find the proper auto ids

 

So it does seem as if providing the autoid in the /favorites/lists endpoint would allow it to be more efficient when users have multiple lists of favorites - it's not a huge deal, but certainly would help

 

Thanks for your help

Nuno 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

The /dwapi/ecommerce/favorites/lists/{id} endpoint returns a productlistviewmodel - and that cannot contain the favorite item autiid...

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Nicolai,

 

Yeah, I see that, especially when we start considering a product can be in multiple favorites. I changed the logic, and now I just need to be able to use "FilledProperties" to optimize payloads, but I'll submit features requests and/or email you directly about that.

 

Thank you

Nuno Aguiar

 

You must be logged in to post in the forum