I am trying to use the Directory API to update a client object, but trying to change something at the top level will return a 400 error (invalid client language).
This is the source object (some elements have been edited to ensure confidentiality)
Request
GET https://www.googleapis.com/admin/directory/v1/customers/<customerID>
answer
200 OK { "kind": "admin#directory#customer", "id": "<customerID>", "etag": "\"<etag>\"", "customerDomain": "<domainName>", "alternateEmail": "<email>", "postalAddress": { "contactName": "<name>", "organizationName": "", "locality": "<city>", "region": "<state>", "countryCode": "US", "addressLine1": "<address1>", "addressLine2": "", "addressLine3": "", "postalCode": "<zip>" }, "phoneNumber": "<phoneNumber>", "language": "en", "customerCreationTime": "2011-03-31T03:45:49.408Z" }
Attempting to update the phone number or language separately will result in an error. It doesnβt matter if I use a patch or update call.
Phone Patch:
{ "phoneNumber": "+18005551234" }
Call a language patch:
{ "language": "en-GB" }
Patch or Refresh Call Answer
400 OK { "error": { "errors": [ { "domain": "global", "reason": "invalid", "message": "Invalid Customer language" } ], "code": 400, "message": "Invalid Customer language" } }
Now I just play with online tools ( https://developers.google.com/admin-sdk/directory/v1/reference/customers/patch ) before I output it to the code. I did not find anything in the documents, forums, tray issues or here where the problem is addressed; Any help would be greatly appreciated!