try:
catalog_price_update = catalog.update_price(product_object)
print("catalog_price_update----", catalog_price_update)
except Exception as e:
print(f"Error updating price: {e}")
{
"items": [
{
"groc_item_id": "2640001967",
"pricing_info": {
"mrp": "599.00",
"sale_price": "299.00",
"discount_start_date": "",
"discount_end_date": "",
"discounted_price": ""
}
}
]
}
product_object = {
"items": [
{
"groc_item_id": "1384267950",
"pricing_info": {
"mrp": "1999.0",
"sale_price": "1999.0",
"discount_start_date": "",
"discount_end_date": "",
"discounted_price": ""
}
}
],
}
catalog_price_update = catalog.update_price(product_object)
print("catalog_price_update----", catalog_price_update)
#RESPONSE FOR PRICE UPDATE
# {
# "api_action_status": "success",
# "items": [
# {
# "groc_item_id": 1384267950,
# "updated_mrp": 1999.0,
# "updated_sale_price": 1999.0,
# "updated_discount_start_date": null,
# "updated_discount_end_date": null,
# "updated_discounted_price": 0.0,
# "updated_at": "2024-11-20 14:45:13"
# }
# ]
# }