Skip to main content
Solved

Postal code requirement / validation


Forum|alt.badge.img

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

Best answer by Naveen Boga

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.

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

3 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3377 replies
  • Answer
  • July 9, 2021

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.


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • 21 replies
  • July 9, 2021

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


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3377 replies
  • July 9, 2021

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


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