Skip to main content
Solved

How to look up country code using country name with REST?

  • 1 April 2023
  • 1 reply
  • 201 views

SBalmer1
Freshman I

Our integration creates order in Acumatica via APIs and we override and fill in the ship to address as part of the order creation process.  We get an error when we send the country name instead of country code.  For example if we use CANADA instead of CA, Acumatica will not accept it.   

Our commerce system does not have country codes and all we have are the country names.  While we can create our own table lookups in the origin system, this shoudl not be required.   As a workaround we can use a GI and manage a custom endpoint but this shoudl also not be needed.

The question is why is country table not available in the default end point so we can lookup country codes using full names or are we missing something?

Best answer by Vignesh Ponnusamy

Hi @SBalmer1, Out of the box not all the screens are mapped to Default endpoints. So the option is to extend the Default and map the screens, fields as per your requirements. Below the setup you can try to retrieve filter and lookup country codes,

  • Extend latest Default endpoint version in your instance → Map Country(CS204000) screen

 

  • Map the field

 

  • Do a get request with filter to fetch a specific country code

 

Hope that helps.! Thanks, 

View original
Did this topic help you find an answer to your question?

Vignesh Ponnusamy
Acumatica Employee
Forum|alt.badge.img+5

Hi @SBalmer1, Out of the box not all the screens are mapped to Default endpoints. So the option is to extend the Default and map the screens, fields as per your requirements. Below the setup you can try to retrieve filter and lookup country codes,

  • Extend latest Default endpoint version in your instance → Map Country(CS204000) screen

 

  • Map the field

 

  • Do a get request with filter to fetch a specific country code

 

Hope that helps.! Thanks, 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings