A colonoscopy is when they put a scope and camera into your large intestine (via your colon) in order to look for any abnormalities and to also take biopsies of tissue. An endocsopy, they put down your esophagus and into your small intestine ans stomach, for the same reasons.
This procedure is also a very significant one when dealing with these issues because they could spot something that you, otherwise, would not know existed; for instance, erosion of the esophagus or sphincter issues (not closing or opening properly)...which may in fact cause breath odors...