Update Product Data
You can update the catalog data by sending a request to the Catalog using the following code:
Python
try:
catalog_update = CatalogLake().update(payload)
print("CATALOG UPDATE", catalog_update)
except Exception as e:
print(f"Error while updating product data: {e}")
Example of Product Object
{
"items": [
{
"groc_item_id": "string",
"client_item_id": "string",
"groc_category": "string",
"groc_category_id": "string",
"product_type": "simple",
"name": "string",
"description": "string",
"short_description": "string",
"category": "string",
"variant_group_id": "string",
"variant": "string",
"location_id": [],
"inventory_info": {
"qty": "0",
"min_qty": "10",
"max_qty": "1",
"is_in_stock": "1"
},
"pricing_info": {
"mrp": "599.00",
"sale_price": "299.00",
"discount_start_date": "",
"discount_end_date": "",
"discounted_price": ""
},
"images": [
"string"
],
"attributes": {
"pattern": "string",
"material": "string",
"occasion": "string",
"season": "string",
"trend": "string",
"features": "string",
"material_finish": "string",
"size_chart": "string",
"fulfillment_mode": "string",
"available_on_cod": false,
"cancellable": false,
"rateable": false,
"return_pickup": false,
"return_window": "P7D",
"returnable": true,
"time_to_ship": "P2D",
"common_or_generic_name_of_commodity": "string",
"imported_product_country_of_origin": "string",
"manufacturer_address": "string",
"manufacturer_name": "string",
"measure_of_commodity_in_pkg": "string",
"month_year_of_manufacture_packing_import": "string",
"nutritional_info": "string",
"additives_info": "string",
"brand_owner_fssai_license_no": "string",
"other_fssai_license_no": "string",
"importer_fssai_license_no": "string",
"is_veg": "string",
"ondc_domain": "string",
"gender": "string",
"colour": "string",
"size": "string",
"brand": "string",
"fabric": "string",
"strap_material": "string",
"water_resistant": "string",
"display": "string",
"glass_material": "string",
"colour_name": "string",
"sport_type": "string",
"base_metal": "string",
"plating": "string",
"care_instructions": "string",
"wash_type": "string",
"fit": "string",
"collar": "string",
"neck": "string",
"hemline": "string",
"sleeve_length": "string",
"battery_life": "string",
"bluetooth": "string",
"model": "string",
"model_year": "string",
"os_type": "string",
"weight": "string",
"length": "string",
"breadth": "string",
"height": "string",
"refurbished": "string",
"skin_type": "string",
"ingredient": "string",
"formulation": "string",
"veg_nonveg_flag": "string",
"upc_code": "string",
"ram": "string",
"ram_unit": "string",
"storage": "string",
"storage_unit": "string",
"storage_type": "string",
"screen_size": "string",
"cpu": "string",
"os_version": "string",
"form_factor": "string",
"expiry_date": "string",
"best_before": "string",
"marketed_by": "string",
"net_weight": "string",
"number_of_items": "string",
"item_quantity": "string",
"flavour": "string",
"country_of_origin": "string",
"number_of_pieces": "string",
"allergen_information": "string",
"package_information": "string",
"package_weight": "string",
"item_form": "string",
"sodium_mg": "string",
"total_fat_gm": "string",
"total_fat_saturated_gm": "string",
"total_fat_trans_gm": "string",
"energy_kcal": "string",
"protein_gm": "string",
"carbohydrates_gm": "string",
"scent": "string",
"consumer_care_phone": "string",
"consumer_care_email": "string",
"manufacturing_date": "string",
"batch_number": "string",
"product_description": "string",
"product_benefits": "string",
"product_highlights": "string",
"item_volume": "string",
"net_volume": "string",
"product_disclaimer": "string",
"product_instructions": "string",
"more_image_links": "string",
"scan_type": "string",
"GTIN": "string",
"CSIN": "string",
"fssai_number": "string",
"marketing_fssai_number": "string",
"manufacturer_fssai_number": "string"
}
}
]
}
Example App Code
payload = {
"items": [
{
"cache":"true",
"groc_item_id":"8512385278",
"client_item_id": "0017",
"groc_category": "DRESk",
"groc_category_id": "1",
"product_type": "simple",
"name": "blue dress",
"description": "new patter dresss",
"short_description": "new patter dress",
"category": "Dress",
"variant_group_id": "11111",
"variant": "Size",
"location_id": [],
"inventory_info": {
"qty": "1",
"min_qty": "10",
"max_qty": "1",
"is_in_stock": "1"
},
"pricing_info": {
"mrp": "599.00",
"sale_price": "299.00",
"discount_start_date": "",
"discount_end_date": "",
"discounted_price": ""
},
"images": [
"https://cdnaz.plotch.io/image/upload/w_551/C/V/PLOsKP4Wlc1724847153_38aacdfdc7af7e11c26263295e196d6fdb0e2b1773fe981eff83ad08a248014a.jpg"
],
"attributes": {
"pattern": "plane",
"material": "Cotten",
"occasion": "casual",
"season": "winter",
"trend": "leates",
"features": "Statable",
"material_finish": "fabric",
"size_chart": "m",
"fulfillment_mode": "test",
"available_on_cod": "false",
"cancellable": "false",
"rateable": "false",
"return_pickup": "false",
"return_window": "P7D",
"returnable": "true",
"time_to_ship": "P2D",
"common_or_generic_name_of_commodity": "qa",
"imported_product_country_of_origin": "ind",
"manufacturer_address": "KK",
"manufacturer_name": "platiga",
"measure_of_commodity_in_pkg": "bag",
"month_year_of_manufacture_packing_import": "2024",
"nutritional_info": "No",
"additives_info": "Gakas",
"brand_owner_fssai_license_no": "141264",
"other_fssai_license_no": "141264",
"importer_fssai_license_no": "141264",
"is_veg": "False",
"ondc_domain": "store1.samhita.org",
"gender": "Female",
"colour": "blue",
"size": "m",
"brand": "test-12",
"fabric": "cotten",
"strap_material": "string",
"water_resistant": "string",
"display": "string",
"glass_material": "string",
"colour_name": "string",
"sport_type": "string",
"base_metal": "string",
"plating": "string",
"care_instructions": "string",
"wash_type": "string",
"fit": "string",
"collar": "string",
"neck": "string",
"hemline": "string",
"sleeve_length": "string",
"battery_life": "string",
"bluetooth": "string",
"model": "string",
"model_year": "string",
"os_type": "string",
"weight": "string",
"length": "string",
"breadth": "string",
"height": "string",
"refurbished": "string",
"skin_type": "string",
"ingredient": "string",
"formulation": "string",
"veg_nonveg_flag": "string",
"upc_code": "string",
"ram": "string",
"ram_unit": "string",
"storage": "string",
"storage_unit": "string",
"storage_type": "string",
"screen_size": "string",
"cpu": "string",
"os_version": "string",
"form_factor": "string",
"expiry_date": "string",
"best_before": "string",
"marketed_by": "string",
"net_weight": "string",
"number_of_items": "string",
"item_quantity": "string",
"flavour": "string",
"country_of_origin": "string",
"number_of_pieces": "string",
"allergen_information": "string",
"package_information": "string",
"package_weight": "string",
"item_form": "string",
"sodium_mg": "string",
"total_fat_gm": "string",
"total_fat_saturated_gm": "string",
"total_fat_trans_gm": "string",
"energy_kcal": "string",
"protein_gm": "string",
"carbohydrates_gm": "string",
"scent": "string",
"consumer_care_phone": "string",
"consumer_care_email": "string",
"manufacturing_date": "string",
"batch_number": "string",
"product_description": "string",
"product_benefits": "string",
"product_highlights": "string",
"item_volume": "string",
"net_volume": "string",
"product_disclaimer": "string",
"product_instructions": "string",
"more_image_links": "string",
"scan_type": "string",
"GTIN": "string",
"CSIN": "string",
"fssai_number": "string",
"marketing_fssai_number": "string",
"manufacturer_fssai_number": "1"
}
}
],
}
catalog_update = CatalogLake().update(payload)
print("CATALOG UPDATE", catalog_update)
#RESPONSE FROM CATALOG UPDATE
# {
# "api_action_status": "success",
# "catalog_push_request_id": "107fd17e-f4b2-480b-b74c-7ea658009cab",
# "catalog_push_received_product_count": "1",
# "catalog_push_success_product_count": "0",
# "catalog_push_failed_product_count": "1",
# "items": [
# {
# "0017": ""
# }
# ]
# }
Last updated