Invalid country code and region - What IS valid?

@Dominik_Klein @John_Borelli
The Slovakia issue should be resolved now. Let us know if you continue to experience problems with this.

1 Like

The list of states is useful for those living in America, I assume anything in this repository is usable, for other countries?

Sorry to revive an old thread but it seems a relevant place.
What would cause the following address to be invalid when it provides a valid postcode, region, and country-code?

{
  "country_code": "GBR",
  "line1": "Queen Street",
  "region": "GB-KHL",
  "locality": "Hull",
  "zip_code": "HU11UU"
}

The API response messages can often vague and not very helpful

{
  "message": "Address Field is invalid"
}

If I add line2 I get a response code of 400 with error message

{
  "message": "Input could not be converted to a valid request"
}

However it’s not that the rest of the request has an error in it, as if I remove the addresses field, the PUT request goes through fine with a 201.

The request looks as follows, with some of the values swapped out.

{  
    "addresses": [
        {
            "country_code": "GBR",
            "line1": "Queen Street",
            "line2"; "test",
            "region": "GB-KHL",
            "locality": "Hull",
            "zip_code": "HU11UU"
        }
    ],
    "email_addresses": [
        {
            "email": "foo@bar.com",
            "field": "EMAIL1"
        }
    ],
    "duplicate_option": "Email",
    "family_name": "Bar",
    "given_name": "Foo",
    "lead_source_id": 0,
    "middle_name": "Fooba",
    "owner_id": 0,
    "phone_numbers": [
        {
            "extension": "",
            "field": "PHONE1",
            "number": "12345678912",
            "type": ""
        }
    ],
    "source_type": "API"
}

Hi @Adam_King1, there’s a bug in our documentation right now that is omitting the field property from the address object. I believe adding "field": "BILLING" to your address object will do the trick. The other valid values are SHIPPING and OTHER.

Ah, I did wonder why the address type wasn’t required.
No worries, though, that seems to have done it; thanks for the help @Nicholas_Trecina

I am wondering if its possible to add the option for all caps country names to be recognized in the billing address country field? We have an integration with netFORUM and the countries are all caps but when they get sent to IS its not recognizing them and marking them as (invalid) which causes the timezone field to not work. You can see in this image for one of our Australia members .


it does somehow still recognize the country even though its marked as invalid because if I go into Contacts>search by address> choose Australia> I get 3k results and Jacqui is listed in the results