Preparation is crucial for a successful endoscopy. The child will need to fast for a specified period before the procedure, typically 6-8 hours for solids and 2-4 hours for clear liquids. The healthcare provider will give specific instructions regarding fasting and any medications the child is taking.