0
votes

I am performing an update operation on a contact using the Google PeopleService "updateContact" endpoint, and I'm noticing that some fields are not properly updating. I've acquired a contact using the "get" endpoint, and updated the contact's Work-type address to add in a postal code where there was none before, and then submitted the contact back using updateContact. I get a 200 OK response, but the returned contact object does not show the change. I see this behavior in using the .NET Client Libraries as well as the API explorer.

Address data before updating:

"addresses": [
{
    {
    "metadata": {
        "source": {
            "type": "CONTACT",
            "id": "61327fef08903be4"
        }
    },
    "formattedValue": "123 Anywhere Street\nSometown",
    "type": "work",
    "formattedType": "Work",
    "streetAddress": "123 Anywhere Street",
    "city": "Sometown"
}]

Address data altered, prior to update:

"addresses": [
{
    {
    "metadata": {
        "source": {
            "type": "CONTACT",
            "id": "61327fef08903be4"
        }
    },
    "formattedValue": "123 Anywhere Street\nSometown",
    "type": "work",
    "formattedType": "Work",
    "streetAddress": "123 Anywhere Street",
    "city": "Sometown",
    "postalCode": "55555"
}]

Address data received in response to update request:

"addresses": [
{
    {
    "metadata": {
        "source": {
            "type": "CONTACT",
            "id": "61327fef08903be4"
        }
    },
    "formattedValue": "123 Anywhere Street\nSometown",
    "type": "work",
    "formattedType": "Work",
    "streetAddress": "123 Anywhere Street",
    "city": "Sometown"
}]

In the above example, the expectation is that the new postal code with a value of "55555" would show up in the addresses object.

I am specifying the full set of possible fields in the Update Person Fields Mask (specifically, in this case, the "addresses" field), and confirmed that the resource name and ETag of the contact in question is accurate and the latest, and that I am pulling the latest copy after the update is complete.

Is this a known issue with the People Service update endpoint? Is there something more I need to specify in the request to force an update that isn't documented in the documentation?

1
There seems to be a bug where the Address field isn't updated unless the formattedValue is changed.Amos Yuen
Looks like you're right; adding a forced re-evaluation of the formattedValue property resolved the missing update. Thanks!Chris Turner

1 Answers

0
votes

A fix has been submitted for this bug, the address should now update properly without needing to modify the formattedValue.