You need to sign in to do that
Don't have an account?

Get Country ShortCode from API
Is there a way to access the configured Country and State picklists (Setup > Data Management > State and Country Picklists) via the API?
You need to sign in to do that
Don't have an account?
Once country and state picklists is enabled in the org, you could simply access all the values from the picklist values of those picklist field from account or contact object. The link hast the example for getting it via apex, if you need the same info via REST API then uset the /services/data/v29.0/sobjects/Account/describe or /services/data/v29.0/sobjects/Contact/describe endpoints and parse the picklist values for the statecode or countrycode fields.
Hope this helps.
All Answers
Once country and state picklists is enabled in the org, you could simply access all the values from the picklist values of those picklist field from account or contact object. The link hast the example for getting it via apex, if you need the same info via REST API then uset the /services/data/v29.0/sobjects/Account/describe or /services/data/v29.0/sobjects/Contact/describe endpoints and parse the picklist values for the statecode or countrycode fields.
Hope this helps.
Hi
I am trying to submit form data through Curl
when submitting form geeting error in email
Salesforce could not create this lead because of the reason listed below. For more information about this error or help with Web-to-Lead, please contact Customer Support.
Reason: There's a problem with this country, even though it may appear correct. Please select a country/territory from the list of valid countries.
Lead Capture Page: Not available.
please help