The codes that Microsoft adCenter API uses for targeting ad groups or campaigns to specific countries/regions are documented at Country Codes.
If you want to see the codes for states/provinces within a country, click the specific country within the Country Codes topic. For example, United States.
Within a country topic, you can click the states/provinces to determine the metro area codes and city codes. For example, within the California (United States) topic, you'll see metro area codes for Anaheim, Los Angeles, San Diego (and other metro areas), and you'll also see the cities and city codes within those metro areas.
For more information about targeting by country, state/province, metro area and city, and also by business and geographical location, see Location Targeting.
If you would like the raw XML used for the country, state/province, metro area and city codes, you can download it here. Please note that the data and XML schema is subject to change without notice.