/
Contract Service (java)

NOTE: Trivore ID Documentation has moved to https://trivoreid.com

The content on this site IS OUT OF DATE!

This space has been archived!

Please go ahead to the new site!

Contract Service (java)

List of all options:

  • Contracts management

  • Contract's Parties management

  • Party's Signers management

  • Party's Contacts management

  • Appendix management

  • Contract body's file management

  • Appendix file management

Contract Status

  • DRAFT - new contract has been created.

  • SIGNABLE - contract has been finalized. NB! Even if the allowed action modifyFinalised is True, after contract is finalized user can modify only notes.

  • SIGNED - every signer has signed.

  • EXPIRED - contract passes expiration dates.

  • TERMINATED - contract termination conditions are passed

  • ARCHIVED - expired or terminated contract will eventually be archived

Contract Actions

  • Finalize - to finalize contract following conditions should be fulfilled:

    • current user must have read access to contract

    • current user must be owner of contract

    • contract's state must be DRAFT

    • contract must have an owner

    • contract must have at least one party

    • each party must have at least one signer

  • Sign

  • Terminate

Initialize service

TrivoreID sdk = TrivoreID.openIdClient(); ContractServiceImpl contractService = new ContractServiceImpl(sdk.contractService());

Contracts management

// Get list of all contracts Page<Contract> page = contractService.getAll(); // Apply filter Filter filter = Filter.equal("id", contractId); page = contractService.getAll(new Criteria(filter)); // Add new Contract Contract contract = new Contract(); contract.setValidFrom("2018-04-26T08:38:02.730Z"); contract.setValidTo("2022-04-26T08:38:02.730Z"); contract.setCode("exampleCode"); contract.getFinancialTerms().setBillingTerms("Example Billing Terms"); // This method returns new contract object with the generated ID contract = contractService.create(contract); String contractId = contract.getId(); // Get one and Update contract = api.contract_service.get(contractId) contract.setScope("modified scope"); contract.setTitle("Modified Title"); contractService.update(contract); // Get all allowed actions, finalise, sign and terminate the contract // returns dictionary with all actions AllowedActions actions = contractService.getAllowedActions(contractId); contractService.finalise(contractId); contractService.sign(contractId); contractService.terminate(contractId, "Example reason."); // Delete contractService.delete(contract);

Contract's Party management

// Get list of all contract's parties. // Instead of Page returns list of parties. No pagination or filter can be applied. List<Party> parties = contractService.getAllParties(contractId); // Add new Party Party party = new Party(); party.setName("Example Name"); party.setAddress("Example Address"); // This method returns new party object with the generated ID party = contractService.createParty(contractId, party); String partyId = party.getId(); // Get one, Update and Delete party.setMobile("+358401234567"); party.setEmail("example@example.com"); contractService.updateParty(contractId, party); party = contractService.getParty(contractId, partyId); contractService.deleteParty(contractId, partyId);

Party's Signer management

Party's Contact management

Contract's Appendix management

Contract Service Models

Contract

ContractContent

FinancialTerms

Appendix

Party

Signer

PartyContact

AllowedActions

Related content

NOTE: Trivore ID Documentation has moved to https://trivoreid.com

The content on this site IS OUT OF DATE!

This space has been archived!