For uncomplicated, single pregnancies, you can be a maximum of 36 weeks pregnant on your return flight. For multiple pregnancies, you can only fly up to 32 weeks.
Fitness to fly letters
Just so you know, you'll need to provide a fitness to fly letter from a doctor or midwife if you'll be over 28 weeks pregnant when you fly, or if there have been complications at any stage of your pregnancy. It must include your estimated date of confinement, confirmation that your pregnancy is uncomplicated and that you're fit to fly. The letter must be dated no earlier than 14 days prior to departure - anything dated earlier will not be accepted.
You'll also need to make sure your insurance covers you for the whole trip as many policies only cover you until you're 28 weeks pregnant.
You'll need to check with the airline you're flying with if you're not travelling with TUI. Each airline has different rules for flying while pregnant. If you're not sure who you're flying with, take a look at "Which airline am I flying with?"