Contact Service (java)

Wrapper for '/contact/' endpoint

List of all options

  • Contact management
  • Enterprise info management

Initialize service

TrivoreID sdk = TrivoreID.mgmtApiClient();
ContactServiceImpl contactService = new ContactServiceImpl(sdk.contactService());

Contact Management

// get page with contacts with the first name "FirstName"
Criteria criteria = new Criteria(Filter.equal("firstName", "FirstName"));
Page<Contact> page = contactService.getAll(criteria);

// create new contact
// the function returns contact object with the generated id
Contact contact = contactService.create(new Contact());
String contactId = contact.getId();

// update contact
contact.setNotes("Example notes.");
contactService.update(contact);

// get contact
contact = contactService.get(contactId);

// delete contact
contactService.delete(contactId);

Enterprise management

// get and update enterprise info
Enterprise enterprise = contactService.getEnterprise(contactId);

// update enterprise information
enterprise.setVatId("vatId");
contactService.updateEnterprise(contactId, enterprise);

Contact Service Models

/wiki/spaces/TISpubdoc/pages/20515248

/wiki/spaces/TISpubdoc/pages/20515271