Contact REST API error

Hi ,

We are trying to update a contact using the PATCH request.

The URL is:

https://api.infusionsoft.com/crm/rest/v1/contacts/235?access_token=xxxxxxx

the JSON is:

{“phone_numbers”:[{“field”:“PHONE1”}],“addresses”:[{“country_code”:“USA”,“field”:“BILLING”,“locality”:“Culver City”,“region”:“CA”}],“custom_fields”:[{“id”:9,“content”:“”},{“id”:3,“content”:“3”},{“id”:1,“content”:“”},{“id”:13,“content”:“”}]}

We receive the following error:

400:Bad Request:BILLING Region is invalid

Can you please explain this error. The request seems to be correct according to your docs: Keap REST API
We have a correct country_code and the value “BILLING” should be correct as a field. The region called “CA” should seems also to be fine. The error message is confusing.

Thanks,
Sorin.

Hi @Robert_Howard , for both the country and region fields, we require ISO 3166 codes. Specifically for region, it has to be the full code and in your case it would be US-CA. Here’s a full list of state codes for the United States: ISO 3166-2:US - Wikipedia.