All persons who, before their entry into Costa Rica, have been in countries at risk, should be vaccinated against yellow fever. This must be proved by an "International Certificate of Vaccination Against Yellow Fever", which is valid from 10 days after vaccination.
Persons on their way to Costa Rica that have been in transit through countries at risk, (on theirs airports, ports and border posts) are exempt from the requirement of vaccination against yellow fever.
Also exempt from the immunization requirement are persons who, having been in the countries considered at risk, before entering Costa Rica, have remained for a period of at least 6 days in a country that is not at risk and have not developed fever during that period.
In Africa: Angola, Benin, Burkina Faso, Burundi, Cameroon, Central African Republic, Chad, Democratic Republic of the Congo, Republic of the Congo, Côte d'Ivoire, Eritrea, Ethiopia, Gabon, Gambia, Ghana, Guinea, Equatorial Guinea, Kenya, Liberia, Mali, Mauritania, Niger, Nigeria, Senegal, Sierra Leone, Somalia, Sudan, South Sudan, Sao Tomé and Príncipe, Tanzania, Togo, Uganda and Zambia.
In America: Bolivia, Brazil, Colombia, Ecuador, Peru, Venezuela, French Guyana and Trinidad and Tobago
Please read more information in the link