On a typical school day in Bogotá, Colombia’s capital city, about a million pupils, from four to 18 years old, will sit down for a meal at one of our 384 public schools.

Balanced nutrition is crucial for children’s development. The food we provide may well be their main meal for the entire day. So when concerns were raised in 2016 over the quality, delivery, price, and even the origin of our meals, we took them very seriously.

Colombia had recently started publishing detailed public contracting records as open data for the first time. So our first port of call was to work with our national procurement agency, Colombia Compra Eficiente, to analyse the US$136m that we were spending on meals and other services. What we found shocked us: severe inefficiency, or worse.

Mayor Enrique Peñalosa and I set out radical reforms based on an open contracting approach. We established minimum and maximum prices for meals and we made the whole contracting process competitive and fully open. Sourcing, packing and distribution of food would no longer be a single contract, and the lowest bid price would not be the deciding factor when choosing a supplier. Instead, it would be about quality.

We began sharing all the information about how meals were procured, from their planning to their delivery, on a public online platform for anyone to see, in a way that was easy to understand.

We faced resistance from all directions. Some of the existing suppliers threatened to sue, with nine lawsuits attempting to halt the process, and tensions flared in our politically polarised city, with more than 10 debates in the city council over the process. On top of that, a media smear campaign attempted to discredit and sabotage the reforms by spreading misleading information about, for example, food arriving damaged because of the new system.

In December 2016, we opened up for bids to procure 74 products. By March 2017, suppliers had been found for all of them, except one: no company put in a bid to provide fresh fruit at the set cost.

This made us suspicious. The US$22m that companies said they needed to supply us was more than we had budgeted for. Had firms boycotted the bidding process to force us to open a new one with higher prices?

Armed with our information, the education secretariat and Colombia Compra Eficiente complained to the market regulator, the Superintendency of Industry and Commerce. It initiated an investigation looking into the allegation that companies were exaggerating the cost of fresh fruit by a staggering 50%. For instance, our budget was 4p (141 Colombian peso) for a banana and 11p (418 Colombian peso) for an apple. Instead, we were being offered prices of 8p for a banana and 15p for an apple.

The case continues. In the meantime we have been able to push through our reforms, using open data to be transparent and make our tendering smarter. The budget of US$136m previously shared between 12 companies is now being spent among 54 specialised producers. They sell to us directly, cutting out intermediaries.

We now distribute 790,000 cold snacks, and 163,000 hot meals every day to Bogotá’s schoolchildren and our school food programme has been recognised with an award from the Ministry of Education in Colombia.

Just as our children need healthy food to thrive, governments need transparency and integrity so that taxpayers’ money is spent wisely and benefits citizens. Public contracting is a trillion-dollar business; it needs a revolution, not just in Bogotá’s schools, but everywhere public money is being spent.

Sign up for your free Guardian Public Leaders newsletter with comment and sector views sent direct to you every month. Follow us: @Guardianpublic

Looking for a job in central or local government, or need to recruit public service staff? Take a look at Guardian Jobs