{
  "base_request": {
    "business_id": "Demo",
    "sucursal_id": 7,
    "login_id": "77",
    "request_origin": "gestionar-modelos",
    "scope": {
      "id_modelo": 301,
      "id_contrato": 501,
      "id_contrato_version": 2
    },
    "contract_name": "Contrato Demo",
    "original_contract_config": {
      "generacion": {
        "ultimo_html_inline": "",
        "campos_dinamicos": [
          {
            "key": "cliente_nombre_completo",
            "label": "Nombre completo del cliente"
          },
          {
            "key": "cliente_telefono",
            "label": "Telefono de contacto del cliente"
          },
          {
            "key": "monto_total_contrato",
            "label": "Monto total del contrato"
          },
          {
            "key": "saldo_financiado",
            "label": "Saldo financiado"
          },
          {
            "key": "monto_parcialidad",
            "label": "Monto por parcialidad"
          },
          {
            "key": "fecha_firma_contrato",
            "label": "Fecha de firma del contrato"
          },
          {
            "key": "dia_pago",
            "label": "Dia de pago"
          }
        ]
      },
      "hechos_contractuales": {
        "cliente": {
          "nombre": "Cliente Demo",
          "telefono": "5551112222"
        }
      },
      "matriz_clausulas": [
        {
          "type": "partes-y-definiciones",
          "title": "Partes y definiciones"
        },
        {
          "type": "precio-y-forma-de-pago",
          "title": "Precio y forma de pago"
        },
        {
          "type": "calendario-de-pagos",
          "title": "Calendario de pagos"
        },
        {
          "type": "firmas",
          "title": "Firmas"
        }
      ]
    },
    "original_preview_document": ""
  },
  "scenarios": {
    "rename_party": {
      "edits": [
        {
          "selection_id": "sel-1",
          "selected_text": "Cliente Demo",
          "selected_html_fragment": "<span data-contract-variable-key=\"cliente_nombre_completo\">Cliente Demo</span>",
          "instruction_text": "Actualiza el nombre del cliente a Ana Maria Lopez.",
          "requested_action_hint": "rename_party",
          "scope_policy_hint": "selection_plus_dependencies",
          "ordinal": 1,
          "variable_tokens": [
            {
              "key": "cliente_nombre_completo",
              "label": "Nombre completo del cliente"
            }
          ],
          "section_hint": "Partes y definiciones",
          "anchor": {
            "selection_id": "sel-1",
            "selected_text": "Cliente Demo",
            "selected_html_fragment": "<span data-contract-variable-key=\"cliente_nombre_completo\">Cliente Demo</span>",
            "context_before": "Se extiende el presente contrato con",
            "context_after": "teniendo el número de teléfono",
            "structural_path": [
              "body",
              "h2:nth-of-type(1)",
              "p:nth-of-type(2)"
            ],
            "start_offset": 0,
            "end_offset": 12
          }
        }
      ]
    },
    "update_price": {
      "edits": [
        {
          "selection_id": "sel-price",
          "selected_text": "$3,500.00 MXN",
          "selected_html_fragment": "<span data-contract-variable-key=\"monto_total_contrato\">$3,500.00 MXN</span>",
          "instruction_text": "Actualiza el monto total del contrato a $4,200.00 MXN.",
          "requested_action_hint": "update_price",
          "scope_policy_hint": "",
          "ordinal": 1,
          "variable_tokens": [
            {
              "key": "monto_total_contrato",
              "label": "Monto total del contrato"
            }
          ],
          "section_hint": "Precio y forma de pago",
          "anchor": {
            "selection_id": "sel-price",
            "selected_text": "$3,500.00 MXN",
            "selected_html_fragment": "<span data-contract-variable-key=\"monto_total_contrato\">$3,500.00 MXN</span>",
            "context_before": "El monto total del contrato es de",
            "context_after": ".",
            "structural_path": [
              "body",
              "h2:nth-of-type(2)",
              "p:nth-of-type(3)"
            ],
            "start_offset": 0,
            "end_offset": 13
          }
        }
      ]
    },
    "update_date": {
      "edits": [
        {
          "selection_id": "sel-date",
          "selected_text": "2026-03-16",
          "selected_html_fragment": "<span data-contract-variable-key=\"fecha_firma_contrato\">2026-03-16</span>",
          "instruction_text": "Actualiza la fecha de firma a 2026-04-20.",
          "requested_action_hint": "update_date",
          "scope_policy_hint": "",
          "ordinal": 1,
          "variable_tokens": [
            {
              "key": "fecha_firma_contrato",
              "label": "Fecha de firma del contrato"
            }
          ],
          "section_hint": "Calendario de pagos",
          "anchor": {
            "selection_id": "sel-date",
            "selected_text": "2026-03-16",
            "selected_html_fragment": "<span data-contract-variable-key=\"fecha_firma_contrato\">2026-03-16</span>",
            "context_before": "a partir del",
            "context_after": ".",
            "structural_path": [
              "body",
              "h2:nth-of-type(3)",
              "p:nth-of-type(6)"
            ],
            "start_offset": 0,
            "end_offset": 10
          }
        }
      ]
    },
    "update_contact": {
      "edits": [
        {
          "selection_id": "sel-contact",
          "selected_text": "5551112222",
          "selected_html_fragment": "<span data-contract-variable-key=\"cliente_telefono\">5551112222</span>",
          "instruction_text": "Actualiza el teléfono de contacto del cliente a 5553334444.",
          "requested_action_hint": "update_contact",
          "scope_policy_hint": "",
          "ordinal": 1,
          "variable_tokens": [
            {
              "key": "cliente_telefono",
              "label": "Telefono de contacto del cliente"
            }
          ],
          "section_hint": "Partes y definiciones",
          "anchor": {
            "selection_id": "sel-contact",
            "selected_text": "5551112222",
            "selected_html_fragment": "<span data-contract-variable-key=\"cliente_telefono\">5551112222</span>",
            "context_before": "teniendo el número de teléfono",
            "context_after": "a quien en lo sucesivo",
            "structural_path": [
              "body",
              "h2:nth-of-type(1)",
              "p:nth-of-type(2)"
            ],
            "start_offset": 0,
            "end_offset": 10
          }
        }
      ]
    },
    "move_clause_without_destination": {
      "edits": [
        {
          "selection_id": "sel-move",
          "selected_text": "Precio y forma de pago",
          "selected_html_fragment": "<h2>Precio y forma de pago</h2>",
          "instruction_text": "Mueve esta cláusula.",
          "requested_action_hint": "",
          "scope_policy_hint": "",
          "ordinal": 1,
          "variable_tokens": [],
          "section_hint": "Precio y forma de pago",
          "anchor": {
            "selection_id": "sel-move",
            "selected_text": "Precio y forma de pago",
            "selected_html_fragment": "<h2>Precio y forma de pago</h2>",
            "context_before": "",
            "context_after": "",
            "structural_path": [
              "body",
              "h2:nth-of-type(2)"
            ],
            "start_offset": 0,
            "end_offset": 24
          }
        }
      ]
    },
    "move_clause_after_signatures": {
      "edits": [
        {
          "selection_id": "sel-move-ok",
          "selected_text": "Precio y forma de pago",
          "selected_html_fragment": "<h2>Precio y forma de pago</h2>",
          "instruction_text": "Mueve esta cláusula después de Firmas.",
          "requested_action_hint": "move_clause",
          "scope_policy_hint": "",
          "ordinal": 1,
          "variable_tokens": [],
          "section_hint": "Precio y forma de pago",
          "anchor": {
            "selection_id": "sel-move-ok",
            "selected_text": "Precio y forma de pago",
            "selected_html_fragment": "<h2>Precio y forma de pago</h2>",
            "context_before": "",
            "context_after": "",
            "structural_path": [
              "body",
              "h2:nth-of-type(2)"
            ],
            "start_offset": 0,
            "end_offset": 24
          }
        }
      ]
    },
    "delete_clause": {
      "edits": [
        {
          "selection_id": "sel-delete",
          "selected_text": "Calendario de pagos",
          "selected_html_fragment": "<h2>Calendario de pagos</h2>",
          "instruction_text": "Elimina esta cláusula.",
          "requested_action_hint": "delete_clause",
          "scope_policy_hint": "",
          "ordinal": 1,
          "variable_tokens": [],
          "section_hint": "Calendario de pagos",
          "anchor": {
            "selection_id": "sel-delete",
            "selected_text": "Calendario de pagos",
            "selected_html_fragment": "<h2>Calendario de pagos</h2>",
            "context_before": "",
            "context_after": "",
            "structural_path": [
              "body",
              "h2:nth-of-type(3)"
            ],
            "start_offset": 0,
            "end_offset": 20
          }
        }
      ]
    },
    "delete_inline_optional_total": {
      "edits": [
        {
          "selection_id": "sel-delete-inline-total",
          "selected_text": "$3,500.00 MXN",
          "selected_html_fragment": "<span data-contract-variable-key=\"monto_total_contrato\">$3,500.00 MXN</span>",
          "instruction_text": "Quita esto.",
          "requested_action_hint": "",
          "scope_policy_hint": "",
          "ordinal": 1,
          "variable_tokens": [
            {
              "key": "monto_total_contrato",
              "label": "Monto total del contrato",
              "required": true
            }
          ],
          "section_hint": "Precio y forma de pago",
          "anchor": {
            "selection_id": "sel-delete-inline-total",
            "selected_text": "$3,500.00 MXN",
            "selected_html_fragment": "<span data-contract-variable-key=\"monto_total_contrato\">$3,500.00 MXN</span>",
            "context_before": "El monto total del contrato es de",
            "context_after": ".",
            "structural_path": [
              "body",
              "h2:nth-of-type(2)",
              "p:nth-of-type(3)"
            ],
            "start_offset": 0,
            "end_offset": 13
          }
        }
      ]
    },
    "delete_inline_optional_total_preview_chip": {
      "edits": [
        {
          "selection_id": "sel-delete-inline-total-chip",
          "selected_text": "Monto total del contrato",
          "selected_html_fragment": "<span class=\"gcm-contract-variable-chip\" data-contract-variable-key=\"monto_total_contrato\" data-contract-variable-required=\"false\" tabindex=\"0\" aria-describedby=\"gcm-contract-variable-tooltip-1\">Monto total del contrato</span>",
          "instruction_text": "Quita esto.",
          "requested_action_hint": "",
          "scope_policy_hint": "",
          "ordinal": 1,
          "variable_tokens": [
            {
              "key": "monto_total_contrato",
              "label": "Monto total del contrato",
              "required": true
            }
          ],
          "section_hint": "monto_total_contrato",
          "anchor": {
            "selection_id": "sel-delete-inline-total-chip",
            "selected_text": "Monto total del contrato",
            "selected_html_fragment": "<span class=\"gcm-contract-variable-chip\" data-contract-variable-key=\"monto_total_contrato\" data-contract-variable-required=\"false\" tabindex=\"0\" aria-describedby=\"gcm-contract-variable-tooltip-1\">Monto total del contrato</span>",
            "context_before": "El monto total del contrato es de",
            "context_after": ".",
            "structural_path": [
              "body",
              "h2:nth-of-type(2)",
              "p:nth-of-type(3)"
            ],
            "start_offset": 0,
            "end_offset": 24
          }
        }
      ]
    },
    "delete_inline_required_balance_denied": {
      "edits": [
        {
          "selection_id": "sel-delete-inline-required",
          "selected_text": "$2,500.00 MXN",
          "selected_html_fragment": "<span data-contract-variable-key=\"saldo_financiado\">$2,500.00 MXN</span>",
          "instruction_text": "Quita esto.",
          "requested_action_hint": "",
          "scope_policy_hint": "",
          "ordinal": 1,
          "variable_tokens": [
            {
              "key": "saldo_financiado",
              "label": "Saldo financiado",
              "required": true
            }
          ],
          "section_hint": "Precio y forma de pago",
          "anchor": {
            "selection_id": "sel-delete-inline-required",
            "selected_text": "$2,500.00 MXN",
            "selected_html_fragment": "<span data-contract-variable-key=\"saldo_financiado\">$2,500.00 MXN</span>",
            "context_before": "El saldo financiado será de",
            "context_after": "en 5 parcialidades",
            "structural_path": [
              "body",
              "h2:nth-of-type(2)",
              "p:nth-of-type(5)"
            ],
            "start_offset": 0,
            "end_offset": 13
          }
        }
      ]
    },
    "update_price_preview_chip": {
      "edits": [
        {
          "selection_id": "sel-price-preview-chip",
          "selected_text": "Monto total del contrato",
          "selected_html_fragment": "<span class=\"gcm-contract-variable-chip\" data-contract-variable-key=\"monto_total_contrato\" data-contract-variable-required=\"false\" tabindex=\"0\" aria-describedby=\"gcm-contract-variable-tooltip-1\">Monto total del contrato</span>",
          "instruction_text": "Actualiza el monto total del contrato a $4,200.00 MXN.",
          "requested_action_hint": "update_price",
          "scope_policy_hint": "",
          "ordinal": 1,
          "variable_tokens": [
            {
              "key": "monto_total_contrato",
              "label": "Monto total del contrato"
            }
          ],
          "section_hint": "monto_total_contrato",
          "anchor": {
            "selection_id": "sel-price-preview-chip",
            "selected_text": "Monto total del contrato",
            "selected_html_fragment": "<span class=\"gcm-contract-variable-chip\" data-contract-variable-key=\"monto_total_contrato\" data-contract-variable-required=\"false\" tabindex=\"0\" aria-describedby=\"gcm-contract-variable-tooltip-1\">Monto total del contrato</span>",
            "context_before": "El monto total del contrato es de",
            "context_after": ".",
            "structural_path": [
              "body",
              "h2:nth-of-type(2)",
              "p:nth-of-type(3)"
            ],
            "start_offset": 0,
            "end_offset": 24
          }
        }
      ]
    },
    "conflicting_price_updates": {
      "edits": [
        {
          "selection_id": "sel-conflict-1",
          "selected_text": "$3,500.00 MXN",
          "selected_html_fragment": "<span data-contract-variable-key=\"monto_total_contrato\">$3,500.00 MXN</span>",
          "instruction_text": "Actualiza el monto total del contrato a $4,200.00 MXN.",
          "requested_action_hint": "update_price",
          "scope_policy_hint": "",
          "ordinal": 1,
          "variable_tokens": [
            {
              "key": "monto_total_contrato",
              "label": "Monto total del contrato"
            }
          ],
          "section_hint": "Precio y forma de pago",
          "anchor": {
            "selection_id": "sel-conflict-1",
            "selected_text": "$3,500.00 MXN",
            "selected_html_fragment": "<span data-contract-variable-key=\"monto_total_contrato\">$3,500.00 MXN</span>",
            "context_before": "El monto total del contrato es de",
            "context_after": ".",
            "structural_path": [
              "body",
              "h2:nth-of-type(2)",
              "p:nth-of-type(4)"
            ],
            "start_offset": 0,
            "end_offset": 13
          }
        },
        {
          "selection_id": "sel-conflict-2",
          "selected_text": "$3,500.00 MXN",
          "selected_html_fragment": "<span data-contract-variable-key=\"monto_total_contrato\">$3,500.00 MXN</span>",
          "instruction_text": "Actualiza el monto total del contrato a $4,800.00 MXN.",
          "requested_action_hint": "update_price",
          "scope_policy_hint": "",
          "ordinal": 2,
          "variable_tokens": [
            {
              "key": "monto_total_contrato",
              "label": "Monto total del contrato"
            }
          ],
          "section_hint": "Precio y forma de pago",
          "anchor": {
            "selection_id": "sel-conflict-2",
            "selected_text": "$3,500.00 MXN",
            "selected_html_fragment": "<span data-contract-variable-key=\"monto_total_contrato\">$3,500.00 MXN</span>",
            "context_before": "El monto total del contrato es de",
            "context_after": ".",
            "structural_path": [
              "body",
              "h2:nth-of-type(2)",
              "p:nth-of-type(4)"
            ],
            "start_offset": 0,
            "end_offset": 13
          }
        }
      ]
    },
    "multi_edit_batch": {
      "edits": [
        {
          "selection_id": "sel-batch-price",
          "selected_text": "$3,500.00 MXN",
          "selected_html_fragment": "<span data-contract-variable-key=\"monto_total_contrato\">$3,500.00 MXN</span>",
          "instruction_text": "Actualiza el monto total del contrato a $4,200.00 MXN.",
          "requested_action_hint": "update_price",
          "scope_policy_hint": "",
          "ordinal": 1,
          "variable_tokens": [
            {
              "key": "monto_total_contrato",
              "label": "Monto total del contrato"
            }
          ],
          "section_hint": "Precio y forma de pago",
          "anchor": {
            "selection_id": "sel-batch-price",
            "selected_text": "$3,500.00 MXN",
            "selected_html_fragment": "<span data-contract-variable-key=\"monto_total_contrato\">$3,500.00 MXN</span>",
            "context_before": "El monto total del contrato es de",
            "context_after": ".",
            "structural_path": [
              "body",
              "h2:nth-of-type(2)",
              "p:nth-of-type(3)"
            ],
            "start_offset": 0,
            "end_offset": 13
          }
        },
        {
          "selection_id": "sel-batch-date",
          "selected_text": "2026-03-16",
          "selected_html_fragment": "<span data-contract-variable-key=\"fecha_firma_contrato\">2026-03-16</span>",
          "instruction_text": "Actualiza la fecha de firma a 2026-04-20.",
          "requested_action_hint": "update_date",
          "scope_policy_hint": "",
          "ordinal": 2,
          "variable_tokens": [
            {
              "key": "fecha_firma_contrato",
              "label": "Fecha de firma del contrato"
            }
          ],
          "section_hint": "Calendario de pagos",
          "anchor": {
            "selection_id": "sel-batch-date",
            "selected_text": "2026-03-16",
            "selected_html_fragment": "<span data-contract-variable-key=\"fecha_firma_contrato\">2026-03-16</span>",
            "context_before": "a partir del",
            "context_after": ".",
            "structural_path": [
              "body",
              "h2:nth-of-type(3)",
              "p:nth-of-type(6)"
            ],
            "start_offset": 0,
            "end_offset": 10
          }
        },
        {
          "selection_id": "sel-batch-contact",
          "selected_text": "5551112222",
          "selected_html_fragment": "<span data-contract-variable-key=\"cliente_telefono\">5551112222</span>",
          "instruction_text": "Actualiza el teléfono de contacto del cliente a 5553334444.",
          "requested_action_hint": "update_contact",
          "scope_policy_hint": "",
          "ordinal": 3,
          "variable_tokens": [
            {
              "key": "cliente_telefono",
              "label": "Telefono de contacto del cliente"
            }
          ],
          "section_hint": "Partes y definiciones",
          "anchor": {
            "selection_id": "sel-batch-contact",
            "selected_text": "5551112222",
            "selected_html_fragment": "<span data-contract-variable-key=\"cliente_telefono\">5551112222</span>",
            "context_before": "teniendo el número de teléfono",
            "context_after": "a quien en lo sucesivo",
            "structural_path": [
              "body",
              "h2:nth-of-type(1)",
              "p:nth-of-type(2)"
            ],
            "start_offset": 0,
            "end_offset": 10
          }
        }
      ]
    }
  }
}
