0

Using the Directory API I am able to update the individual address attributes e.g. streetAddress, region and postalCode.

However the 'formatted' attribute still has the old address and it is this that shows in the users Directory profile. The 'formatted' attribute is not writable so how does this get updated with the new address?

Jon
  • 3
  • 2
  • which formatted attribute are you referring to? maybe it will help us to answer your question if you share your HTTP response with us? https://developers.google.com/admin-sdk/directory/v1/reference/users#resource according to the documentation of the user's resource representation fields, all the address related fields are writable... – Emily Dec 05 '13 at 00:09
  • Jon, did you solve the issue, I am running into similar, I cannot update nested json objects such as phones.type – simpleProgrammer Oct 30 '14 at 15:50

1 Answers1

0

I was having trouble getting my addresses to display correctly as well. But at the time I didn't know about the "formatted" attribute. After working with support, the solution was to also update the "formatted" field with whatever you want displayed for their address. It is a writeable attribute for me.

Example:

{
  "type":"work", 
  "formatted":"123 Nowhere Somewhereville MN 55555", 
  "streetAddress":"123 Nowhere",
  "locality":"Somewhereville", 
  "region":"MN", 
  "postalCode":"55555"
}
andyrue
  • 903
  • 10
  • 24