Search code examples
google-apigoogle-calendar-apigoogle-people-apigoogle-tasks-api

Can I create extended properties in Google People API and Task API?


I have added an extended property to a Google calendar entry and been able to read it back successfully. The format of the json is like this:

"extendedProperties": {
 "private": {
 "MyPropertyName": "yes"
 }
 },

I want to do the same thing to created Task entries and contact entries (via the People API). With the People API, trying to create the entry results in http 400. With the Task API, it accepts the json, but the property is not returned when I retrieve the task.

Is it possible to do what I want with the current versions of the People and Task API?


Solution

  • In People API extended properties are called ClientData

    The json structure of the resouce is:

    {
      "metadata": {
        object (FieldMetadata)
      },
      "key": string,
      "value": string
    }
    

    with FieldMetadata:

    {
      "primary": boolean,
      "sourcePrimary": boolean,
      "verified": boolean,
      "source": {
        object (Source)
      }
    }