Solved

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

  • 1 April 2023
  • 1 reply
  • 145 views

Userlevel 1

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?

icon

Best answer by Vignesh Ponnusamy 3 April 2023, 16:25

View original

1 reply

Userlevel 7
Badge +4

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


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved