from trivoreid.utils.criteria import Filter
from trivoreid.models.contactcontrol import contactControl
# get page with the first 5 contacts with the 'userId' in userIdWrite list
f = Filter(Filter.EQUALS, 'firstName', 'FirstName')
page = api.contact_service.get_all(f, start_index=0, count=5)
# create new contact
contact = Contact()
contact.nsCode = 'examplecode'
contact.mobile = '+3584012345678'
# the function returns contact object with the generated id
contact = api.contact_service.create(contact)
# update contact
contact.nickName = 'ExampleNickname'
contact = api.contact_service.update(contact)
# get contact
contact = api.contact_service.get(contact.id)
# delete contact
api.contact_service.delete(contact.id)
# get enterprise info
enterprise = api.contact_service.get_enterprise_info(contact.id)
# update enterprise information
enterprise.vatId = 'vatId'
api.contact_service.update_enterprise_info(contact.id, enterprise)
/wiki/spaces/TISpubdoc/pages/20515248
/wiki/spaces/TISpubdoc/pages/20515271