I am trying to update a product from the catalog with the api: https://developers.klaviyo.com/en/reference/update_catalog_item
When i was trying this i was getting erorr.:
This is the the body:
7175259619489 is the item ID
{
"data": {
"type": "catalog-item",
"id": "$custom:::$default::7175259619489",
"attributes": {
"title": "Ocean Blue Shirt (Sample)",
"price": 42,
"description": "A description of the catalog item.",
"url": "https://via.placeholder.com/150",
"image_full_url": "https://via.placeholder.com/300",
"image_thumbnail_url": "https://via.placeholder.com/150",
"custom_metadata": {
"newKey": "New Value"
},
"published": true
},
"relationships": {
"categories": {
"data": :
{
"type": "catalog-category",
"id": "$custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL"
}
]
}
}
}
}
This is the error:
{
"errors": R
{
"id": "b9e0d202-8058-40ec-9988-14d2c9a3c6f8",
"status": 400,
"code": "invalid",
"title": "Invalid input.",
"detail": "'$custom:::$default::7175259619489' does not match the primary key used at the endpoint. '$custom:::$default:::7175259619489' is the expected primary key.",
"source": {
"pointer": "/data/id"
},
"meta": {}
}
]
}