It was the year 1767. King George III was on the throne, the legal campaign against slavery was beginning, James Watt was inventing a condenser for the steam engine, and Captain Cook was planning his first voyage to the Antipodes in the Endeavour.

In York, two men –William Bayldon and Robert Berry – opened a shop close to Bootham Bar selling cough lozenges, lemon and orange candied peel and other sweets.

It was the birth of one of York’s best-known firms. Few today have heard of Robert Berry and Co, or Berry’s. But that is because in the 1820s the company changed its name.

In 1823, a 30-year-old apothecary named Joseph Terry joined the business. According to York oral historian Van Wilson’s marvellous new book, The Story Of Terry’s, Terry had learned, though his medical training, how to “sugar the pill” – a talent that was to stand him in good stead. He also had experience of running his own business, opposite York Castle, selling spices, pickling vinegar, essence of spruce, patent medicines and perfumery.

Bayldon and Berry themselves are said to have described Terry as a “benign man” with “a kindly attitude to others…. courteous, fair and seeking the best.”

William Bayldon soon left the business, and Robert Berry died. Terry, who had married Robert Berry’s niece, took over the running of the renamed firm, together with Berry’s son George. An advert in the Yorkshire Gazette dated October 29, 1825, stated: “Joseph Terry and George Berry, confectioners, St Helen’s Square, having taken the Stock and entered upon the premises of the late Robert Berry and Co, most respectfully solicit from the Friends of the late Firm and from the Public at large that Patronage so liberally bestowed on their Predecessors.” Stick with us, its business as usual, in other words.

The partnership quickly dissolved, however, and Terry found himself running the business alone from St Helen’s Square, with a factory in Brearly Yard.

He expanded the range to include confits, medicated lozenges, marmalade, mushroom ketchup and the original of the modern “love hearts”, with the teasing message “how do you flirt?” on them.

The coming of the railways saw Terry’s business boom. By 1840, the company’s products were being sold in 75 towns all over the north of England.

Terry died in 1850. Three of his five sons – Joseph, Robert and John – went into the business, but it was Joseph Junior who took it forward. The works were moved to a new site at Clementhorpe in 1862, where there was space for warehouses. By 1867, 100 years after Berry and Bayldon first set up the company, Terry’s were selling over 400 items – including 13 different kinds of chocolate. By 1874, its product list included everything from peels, cakes, biscuits and jams to chocolate cigars, cream balls, and chocolate cream cakes.

Joseph Terry II became one of York’s most high-profile figures. Knighted in 1887, he was four times Lord Mayor of York, as well as Chairman of the Yorkshire Gala Committee, governor of the Merchant Adventurers’ Company, deputy chairman of the York New Waterworks Company and a supporter of the York Charity Organisation Society.

In 1893, he presided over a Japanese bazaar behind York Art Gallery, with the words: “It is right to think of our poorer neighbours. If the bazaar is successful, then 1,000 waifs and strays would be entertained on Christmas day in the Corn Exchange.”

When he died in 1898, the Yorkshire Herald reported: There was no person in the city more loved or respected, and no-one who was more possessed of the qualities that constitute a genial and amiable Englishman.”

• The Story of Terry’s by Van Wilson is published by York Oral History Society priced £9.95. It is available at the Barbican bookshop, and most other York bookshops.