Step 6: Synthesis of methyl 6-bromo-1H-indazole-4-carboxylate
To a stirred solution of methyl 1-acetyl-6-bromo-1H-indazole-4-carboxylate (18 g, 61.0 mmol) in methanol (350 mL) was slowly added 6N HCl (350 mL). The reaction mixture was stirred at 60 °C for 8 hours. Upon completion of the reaction, the solvent was removed by distillation under reduced pressure. Subsequently, the reaction mixture was alkalized with saturated NaHCO3 solution to pH 8. The precipitated solid was collected by filtration and dried under vacuum. The dried solid was stirred in ether for 15 min, filtered again and dried to give methyl 6-bromo-1H-indazole-4-carboxylate (11 g, 71.7% yield).