Solved

Postal code requirement / validation

  • 9 July 2021
  • 3 replies
  • 440 views

Userlevel 3
Badge

Good morning, 

We are integrating with Acumatica via its API, and have run into a situation w/regard to postal code. 

In the Acumatica UI, I can create a business account without entering a postal code. It doesn’t matter which country I specify in the address fields. 

Via the Acumatica API, I can create a business account without entering a postal code if I specify the country as France. But if I set the country to US and don’t enter a postal code, the response is a 422 error code specifying a problem with postal code. 

So it seems the postal code is required by Acumatica API if country = US, but there’s no similar requirement in Acumatica UI. Can any one please shed some light on this? I don’t know where requirements like this might be configured or if there’s a way we can work around this. 

Thank you, 

Dave

icon

Best answer by Naveen Boga 9 July 2021, 15:44

View original

3 replies

Userlevel 3
Badge

Thank you @Naveen B , that’s very helpful. I do see that we’re configured to strictly validate the form of the postal code for US but for France the validation is very loose. 

From this, I think I now see that in the Acumatica UI, if you leave the Postal Code field empty it’s probably not subjected to validation. But via the API we have been sending Postal Code = None, which is subjected to validation and results in a failure. 

Thank you very much for your help with this!

Dave

Userlevel 7
Badge +17

Hi @dhollinden  I’m NOT sure about the issue but you can verify the Countries related configuration in below screen. You can compare the US and France configuration and you may get any idea on this issue.

Userlevel 7
Badge +17

Great :) I’m glad that you got a solution with my suggestion.

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