When you leave a job, you ask for a letter of reference (Arbeitszeugnis). It explains when you worked for the employer, and what type of work you did.
A qualified letter of reference (qualifiziertes Arbeitszeugnis) also includes an evaluation of your performance, and why you left the company.2
When you leave a company, your employer is required to give you an Arbeitszeugnis.1 Ask for it in your resignation letter.