try:
catalog_inventory_update = catalog.update_inventory(inventory_object)
print("catalog_inventory_data----", catalog_inventory_update)
except Exception as e:
print(f"Error updating inventory: {e}")
{
"items": [
{
"groc_item_id": "2640001967",
"inventory_info": {
"qty": "1",
"min_qty": "1",
"max_qty": "2",
"is_in_stock": "1"
}
}
]
}
inventory_object = {
"items": [
{
"groc_item_id": "2466313886",
"inventory_info": {
"qty": "10",
"min_qty": "1",
"max_qty": "2",
"is_in_stock": "1"
}
}
]
}
catalog_inventory_update = catalog.update_inventory(inventory_object)
print("catalog_inventory_data----", catalog_inventory_update)
#RESPONSE OBJECT
# {
# "api_action_status": "success",
# "items": [
# {
# "groc_item_id": 2466313886,
# "updated_qty": 10,
# "is_in_stock": 1,
# "updated_at": "2024-10-29 22:05:19"
# }
# ]
# }