Convert Mapper's Metadata

The convert_mapper method in the Cataloglake allows users to apply an existing metadata mapper to a given set of metadata. It translates the input metadata keys into the mapped keys as defined in the specified mapper, enabling seamless integration and standardized metadata processing.

Example Payload

metadata_convert_payload = {
                          "customer_id": "121287096096",
                          "mapper_id": "79ca0c06-bd0f-4df9-af23-aa3dd126839f",
                          "input_type": "key_value",
                          "metadata": {
                            "address_of_manufacturer": "236, society, Bangalore",
                            "fssai_number": "12331233",
                            "marketing_fssai_num": "33443344",
                            "fssai_number_of_manufacturer": "66776677",
                            "fabric_colour": "red"
                                      }
                          }

Usage Example

metadata_convert_response = cataloglake.convert_mapper(metadata_convert_payload)
print(metadata_convert_response)

Example Response

{
  "customer_id": "121287096096",
  "mapper_id": "79ca0c06-bd0f-4df9-af23-aa3dd126839f",
  "input_type": "key_value",
  "product_metadata_data": {
    "items": [
      {
        "client_item_id": "",
        "client_category": "",
        "client_category_id": "",
        "product_type": "",
        "name": "",
        "description": "",
        "short_description": "",
        "category": "",
        "provider": "",
        "variant_group_id": "",
        "variant": "",
        "brand": "",
        "location_id": [],
        "inventory_info": {
          "qty": "",
          "min_qty": "",
          "max_qty": "",
          "is_in_stock": "1"
        },
        "pricing_info": {
          "mrp": null,
          "sale_price": "",
          "discount_start_date": "",
          "discount_end_date": "",
          "discounted_price": ""
        },
        "attributes": {
          "manufacturer_address": "",
          "fssai_number": "",
          "marketing_fssai_number": "33443344",
          "colour": "red"
        }
      }
    ]
  }
}

Last updated