Storefront API cartLinesAdd response error The merchandise with id does not exist

I installed a 17Track APP, which helped me create many additional products. Now I want to use StorefrontAPI in my self-built store and manually add variant Ids to the shopping cart as needed. But now the storefront API returned an error to me.

{
	"data": {
		"cartLinesAdd": {
			"userErrors": [
				{
					"field": [
						"lines",
						"0",
						"merchandiseId"
					],
					"message": "The merchandise with id gid://shopify/ProductVariant/xxxxxxxxxxx does not exist."
				}
			],
			"cart": null
		}
	}
}

Hi Xuan1,

Is this only happening with products created by the 17Track app?

Yes, only the products created by 17Track will have this issue. Could it be that StorefrontAPI does not have these permissions? I don’t encounter this error when calling the Ajax API.

That is certainly possible - have you contacted the 17Track team to see if they’re aware of behaviour like this?

Contacted 17Track, after creating a product in the 17Track application, an error was reported when calling the Shopify API interface (adding products to the shopping cart). This error is responded by Shopify and has nothing to do with 17Track. This issue only occurs in the Storefront API, not in the Shopify Ajax API.