0

Using G Suite Reseller API to create a new customer account ([/reseller/v1/customers][1]).

Most accounts work successfully, but every now and then I get the following error, and it seems to happen primarily for non-USA postal codes:

Error calling POST https://www.googleapis.com/apps/reseller/v1/customers: (400) resource.postalAddress - Invalid Postal code. Please enter the correct Postal code.

I've double checked the same formatting for these postal codes using the google maps API and they check out as valid. And per the Reseller API, the postal code is a required string with no specific formatting nor size required. So I'm curious, why do I get this error sometimes?

Here are examples of valid postal codes that failed:

v3t-4sg

00229

CR0 0BW

Community
  • 1
  • 1
ronan
  • 9
  • 2
  • If you haven't tried the [step by step tutorial](https://developers.google.com/admin-sdk/reseller/v1/codelab/end-to-end#step_3_create_a_customer_with_the_reseller_api) in the documentation, try to do so. Also, try to check if you all meet the required parameters [here](https://developers.google.com/admin-sdk/reseller/v1/support/reseller_api_common_errors#400invalid). – MαπμQμαπkγVπ.0 Jan 07 '18 at 01:52
  • I have done both (i.e. reviewed and tried the step by step tutorial, and reviewed the required parameters) with no luck. I'm beginning to think that the reseller API is a little buggy with Canadian zip codes specifically. BUT because it's not a consistent issue it's also quite likely something in my implementation (unfortunately I cannot share the code here). My next step is to force all entries for Canadian postal codes to be in the format A1A A1A (where A is a letter, A-Z, and 1 is a number 0-9) and keep an eye out for this error recurring in the future on production. – ronan Jan 08 '18 at 19:27

0 Answers0