Cozy Contacts doctype
io.cozy.contacts
The io.cozy.contacts
doctype is loosely based on the vCard RFC, in that some of the attributes have been renamed for clarity. The attributes with a ?
are optional.
indexes
: {object} Used to sort contacts in different waysbyFamilyNameGivenNameEmailCozyUrl
: {string}
displayName
: {string} Displayed name in cozy applicationsfullname?
: {string} Unstructured representation of the name (example:"Dr. Gregory House, M.D."
)name?
: {object} Optional structured representation of the name, with the following possible attributes:familyName?
: {string} (example:"House"
)givenName?
: {string} (example:"Gregory"
)additionalName?
: {string} (example:"J."
)namePrefix?
: {string} (example:"Dr."
)nameSuffix?
: {string} (example:"III"
)surname?
: {string} (example:"Anderson"
)
birthday?
: {date} (example:"1959-05-15"
)gender?
: {string}male|female
note?
: {string}email?
: {array} An array of email addresses objects with the following attributes:address
: {string} Email addresstype?
: {string} A user-provided localized type (example:"Personnal"
,"Profressional"
,"Other"
)label?
: {string} A keyword to identify the type, must bework|home
primary?
: {boolean} Indicates a preferred-use address
address?
: {array} An array of postal addresses objects with the following attributes:id?
: {string} id of the addressstreet?
: {string} Street namepobox?
: {string} P.O Box numbercity?
: {string} City nameregion?
: {string} Region namenumber?
: {string} Lane numbercode?
: {string} Postal codecountry?
: {string} Country nametype?
: {string} A user-provided localized type (example:"Personnal"
,"Profressional"
,"Other"
)label?
: {string} A keyword to identify the type, must bework|home
primary?
: {boolean} Indicates a preferred-use addressextendedAddress?
: {object}locality?
: {string} Locality namebuilding?
: {string} Building numberstairs?
: {string} Stairs numberfloor?
: {string} Apartment floorapartment?
: {string} Apartment numberentrycode?
: {string} Entry code
formattedAddress?
: {string} Unstructured version of the addressgeo?
: {object}geo?
: {array} Coordinates of the address, must be[long, lat]
-
cozyCategory?
: {“homework”} The category of the address type
phone?
: {array} An array of phone number objects with the following attributes:number
: {string}type?
: {string} A user-provided localized type (example:"Personnal"
,"Profressional"
,"Other"
), could be provided by Contacts app too asvoice|fax|cell
label?
: {string} A keyword to identify the type, must bework|home
primary?
: {boolean} Indicates a preferred-use number
cozy?
: {array} An array of cozy instances with the following attributes:url
: {string}type?
: {string} A user-provided localized type (example:"Personnal"
,"Profressional"
,"Other"
)label?
: {string} A keyword to identify the type, must bework|home
primary?
: {boolean} Indicates a preferred-use instance
url?
: {string} Deprecated. Cozy instance url. Usecozy?
array of cozy instances instead.company
: {string} CompanyjobTitle
: {string} Job titlerelationships
: {object} links between documentsgroups
: {object} groups the contact belongs todata
: {array} list of groups_id
: {string} id of the io.cozy.contacts.groups document_type
: {string} doctype “io.cozy.contacts.groups”
accounts
: {object}data
: {array} list of accounts_id
: {string} id of the io.cozy.contacts.accounts document_type
: {string} doctype “io.cozy.contacts.accounts”
related
: {object}data
: {array} list of related contacts_id
: {string} id of the related io.cozy.contacts document_type
: {string} doctype “io.cozy.contacts”metadata
: {object}relationTypes
: {array} list of relationship types with target contacts (see related-type-value)
trashed?
: {boolean} istrue
if the contact is marked for removal and will be deleted soon (e.g. after remote deletion is confirmed)me
: {boolean} whether the contact matches the cozy owner (defaults tofalse
)nationalities?
: {array} 2-letter iso3166 country codes (can be set in io.cozy.identities for legal reasons in Banks)birthcity?
: {string} City of birth of a contact (can be set in io.cozy.identities for legal reasons in Banks)birthcountry?
: {string} Country of birth of a contact (can be set in io.cozy.identities for legal reasons in Banks)metadata
: {object} previous metadata information.cozy
: {boolean} whether the contact has been created by cozygoogle
: {object} Google metadataversion
: {integer} used for migrations. Current version is 1
cozyMetaData
: {object}- …
cozyMetadata
: Document metadata sync
: {object}ded4265b38c54b0683408c76d9ebd
: {object} id of the sourceContactsAccountkonnector
: {string} example :"google"
lastSync
: {date} (example:"2018-10-19T10:58:37.025688+02:00"
) Last time a sync task updated this contactcontactsAccountsId
: {string} id of the io.cozy.contacts.accounts objectid
: {string} id of the remote objectremoteRev
: {string} latest rev of the remote object
- …
io.cozy.contacts.groups
Used to group contacts together. A group can obviously have multiple contacts, but contacts can also be part of multiple groups.
name
: {string} is the group’s public nametrashed?
: {boolean} istrue
if the group is marked for removal and will be deleted soonmetadata
: {object}version
: {integer} Used for migrations. Current version is 1-
relationships
: {object} links between documentsaccounts
: {object}data
: {array} list of accounts_id
: {string} id of the io.cozy.contacts.accounts document_type
: {string} doctype “io.cozy.contacts.accounts”
-
cozyMetaData
: {object}- …
cozyMetadata
: Document metadata -
sync
: {object}-
ded4265b38c54b0683408c76d9ebd
: {object} id of the io.cozy.contacts.accounts objectkonnector
: {string} example :"google"
lastSync
: {date} (example:"2018-10-19T10:58:37.025688+02:00"
)contactsAccountsId
: {string} id of the io.cozy.contacts.accounts objectid
: {string} id of the remote objectremoteRev
: {string} latest rev of the remote object
-
- …
io.cozy.contacts.accounts
Used to know which accounts (Google, Apple, etc) a contact is related to.
id
: {id} id of the io.cozy.contacts.account objectname
: {string} name of the account (example:"toto@gmail.com"
)type
: {string} konnector type (example:"konnector-google"
)canLinkContacts
: {boolean} whether contacts can be linked or unlinked to this sourceshouldSyncOrphan
: {boolean} whether we should sync orphans with this account or notsourceAccount
: {string} id of the related io.cozy.accountslastSync
: {date} last remote sync (example:"2018-10-19T10:58:37.025688+02:00"
)lastLocalSync
: {date} last local sync (example:"2018-10-19T10:58:37.025688+02:00"
)syncToken
: {string} used to only retrieve what have been edited since last sync (See request sync token)version
: {integer}