{
    "name": "Malfini",
    "app_type": "malfini",
    "sync_type": "api",
    "is_active": true,
    "debug_mode": false,
    "unique_product_identifier": "_sku",
    "unique_product_variation_identifier": "_sku",
    "authorization": {
        "auth_type": "custom",
        "auth_settings": {
            "request_settings": {
                "method": "POST",
                "url": "https://api.malfini.com/api/v4/api-auth/login",
                "headers": {
                    "Content-Type": "application/json"
                },
                "body": {
                    "type": "json",
                    "data": {
                        "username": "<username>",
                        "password": "<password>"
                    }
                },
                "token_type": "Bearer",
                "authorization_header_name": "Authorization"
            },
            "response_settings": {
                "token_key": "access_token",
                "expires_in_key": "expires_in",
                "expires_in_value": 259200,
                "token_type": "Bearer"
            }
        }
    },
    "connections": [
        {
            "name": "Products",
            "type": "api",
            "is_active": true,
            "is_primary": true,
            "resource_type": "product",
            "priority": 1,
            "configuration": {
                "auth_enabled": true,
                "method": "GET",
                "endpoint": "https://api.malfini.com/api/v4/product",
                "headers": {
                    "Content-Type": "application/json",
                    "Accept": "application/json"
                },
                "body": {},
                "prerequisites": {
                    "product_response": "",
                    "variable_response": {
                        "variable_path": "variants",
                        "nested_variations": {
                            "is_active": true,
                            "attribute_key": "nomenclatures"
                        }
                    },
                    "main_product_unique_identifier": "code",
                    "variable_product_unique_identifier": "nomenclatures->productSizeCode"
                },
                "advanced_configuration": {}
            }
        },
        {
            "name": "Pricing",
            "type": "api",
            "is_active": true,
            "is_primary": false,
            "resource_type": "product",
            "priority": 2,
            "configuration": {
                "auth_enabled": true,
                "method": "GET",
                "endpoint": "https://api.malfini.com/api/v4/product/prices",
                "headers": {
                    "Content-Type": "application/json",
                    "Accept": "application/json"
                },
                "body": {},
                "prerequisites": {
                    "product_response": "",
                    "prerequisite_type": "no-variations",
                    "prerequisite_variation_type": "link-variations",
                    "variable_response": null,
                    "main_product_unique_identifier": "productSizeCode",
                    "variable_product_unique_identifier": ""
                },
                "advanced_configuration": {}
            }
        },
        {
            "name": "Stock",
            "type": "api",
            "is_active": true,
            "is_primary": false,
            "resource_type": "product",
            "priority": 3,
            "configuration": {
                "auth_enabled": true,
                "method": "GET",
                "endpoint": "https://api.malfini.com/api/v4/product/availabilities",
                "headers": {
                    "Content-Type": "application/json",
                    "Accept": "application/json"
                },
                "body": {},
                "prerequisites": {
                    "product_response": "",
                    "prerequisite_type": "no-variations",
                    "prerequisite_variation_type": "link-variations",
                    "variable_response": null,
                    "main_product_unique_identifier": "productSizeCode",
                    "variable_product_unique_identifier": ""
                },
                "advanced_configuration": {}
            }
        }
    ],
    "attribute_mapping": [
        {
            "connection": "Products",
            "product_type": "parent",
            "type": "core",
            "wc_attribute": "sku",
            "supplier_attribute": "code",
            "advanced_configuration": null
        },
        {
            "connection": "Products",
            "product_type": "parent",
            "type": "core",
            "wc_attribute": "name",
            "supplier_attribute": "name",
            "advanced_configuration": null
        },
        {
            "connection": "Products",
            "product_type": "parent",
            "type": "core",
            "wc_attribute": "description",
            "supplier_attribute": "description+##<br>##+specification",
            "advanced_configuration": null
        },
        {
            "connection": "Pricing",
            "product_type": "parent",
            "type": "core",
            "wc_attribute": "regular_price",
            "supplier_attribute": "price",
            "advanced_configuration": null
        },
        {
            "connection": "Stock",
            "product_type": "parent",
            "type": "core",
            "wc_attribute": "stock_quantity",
            "supplier_attribute": "quantity",
            "advanced_configuration": null
        },
        {
            "connection": "Products",
            "product_type": "parent",
            "type": "core",
            "wc_attribute": "images",
            "supplier_attribute": "variants->0->images->0->link",
            "advanced_configuration": null
        }
    ],
    "operations": [
        {
            "operation": "product-operations",
            "operation_type": "data-sync",
            "is_active": true,
            "configuration": {
                "available_products": {
                    "add": true,
                    "update": true,
                    "update_product_status": false,
                    "product_status": "publish"
                },
                "unavailable_products": {
                    "operation": "none",
                    "products_of": "none"
                }
            },
            "connections": [
                "Products"
            ]
        },
        {
            "operation": "product-operations",
            "operation_type": "data-sync",
            "is_active": true,
            "configuration": {
                "available_products": {
                    "add": false,
                    "update": true,
                    "update_product_status": false,
                    "product_status": "publish"
                },
                "unavailable_products": {
                    "operation": "none",
                    "products_of": "none"
                }
            },
            "connections": [
                "Pricing"
            ]
        },
        {
            "operation": "product-operations",
            "operation_type": "data-sync",
            "is_active": true,
            "configuration": {
                "available_products": {
                    "add": false,
                    "update": true,
                    "update_product_status": false,
                    "product_status": "publish"
                },
                "unavailable_products": {
                    "operation": "none",
                    "products_of": "none"
                }
            },
            "connections": [
                "Stock"
            ]
        }
    ]
}