IntroductionBefore you beginTerminologyGetting started
Authorization
Accounts
Entities
IntroductionEntity definitionsRetrieve an entityClientsCreate a clientEdit a clientMerge clientsRetrieve type qualifiersAdd type qualifierAssign employee to clientRemove assigned employee from clientEngagementsEmployees
User accounts
GroupsFilesFoldersTemplatesEmail templatesAppsErrors

Clients

SmartVault's API allows the creation of clients as entities for an account as well as the ability to modify them at any time.

You can also merge clients under certain circumstances but you can't delete them.







Create a client

There are no limitations based on the user permissions for entity creation, both employee and administrator level users can create clients.
You can create both clients as individual (person) or entity.

Create an employee
PUT/nodes/entity/SmartVault.Accounting.Firm/{account_id}/SmartVault.Accounting.FirmClient


Parameters


account_idstringThe account's alphanumerical identification.
You can find more info on how to retrieve the account's id here.


Body parameters


Show body parameters


Get more info about all the type qualifiers available in the retrieve type qualifiers section.
You can also add your own custom type qualifiers for client creation. More information about this here.


Example of a request body for adding a new client (entity).

Show body request


Example of a request body for adding a new client (person).

Show body request



Response


Will return the newly added client object.

Show success object


You can get an error when trying to add a new client if there's already a client in that account with the same client ID.

If you are setting the "aliases" field, this also would need to be exclusive to the new client, otherwise it also prompt you with the following error.

Show error object









Edit a client

You can modify every input parameter of the client after it has been created.

Edit a client
POST/nodes/entity/SmartVault.Accounting.Firm/{account_id}/SmartVault.Accounting.FirmClient/{client_id}


Parameters


account_idstringThe account's alphanumerical identification.
client_idstringThe client's alphanumerical identification.
You can find more info on how to retrieve the account's id here.


Body parameters


Show body parameters



Example of a request body for updating the membership type an employee.

Show body request




Response


Will return the modified client.

Show success object









Merge clients

SmartVault allows the merge of two clients as long as this two share, at least one of the 2 following elements:

The client's tax identifier.
The client's name.

Merge clients
POST/nodes/entity/SmartVault.Accounting.Firm/{account_id}/SmartVault.Accounting.FirmClient/{client_id}


Parameters


account_idstringThe account's alphanumerical identification.
client_idstringThe client's alphanumerical identification. This will be the client on which the merge will happen.
You can find more info on how to retrieve the account's id here.


Body parameters


The only value that needs to be modified for every merge is the "value" in the "parameters" object.
This needs to be the path to the client that merges into the client with client_id& specified in the path param.

Show body request








Retrieve type qualifiers

All the type qualifiers related to a client can be retrieved by making a request to this section endpoint and looking in the response body for the "type_qualifiers" object that "applies_to" "organization".

Check the example below for clarity.

Retrieve type qualifier
GET/nodes/entity-definition/{accout_id}/SmartVault.Accounting.Firm/SmartVault.Accounting.FirmClient?eprop=true


Show example








Add type qualifier

You can create new custom type qualifiers for an account.
These can be related either to an entity or a person, the types of client present in the SmartVault infrastructure.

Add type qualifier
PUT/typequalifiers/type-qualifier


Body parameters


Show Body parameters



The difference for the requests to create a type qualifier for entity or person is the value you assign to the "applies_to" key in the request body.

{
"items": [
{
"applies_to": "organization",
"type_qualifiers": [
{
"display": "Test type qualifier for entity"
}
],
"account_id": "h4bEql3mPESe5dwSiGfMVw"
}
]
}
{
"items": [
{
"applies_to": "persons",
"type_qualifiers": [
{
"display": "Test type qualifier for persons"
}
],
"account_id": "h4bEql3mPESe5dwSiGfMVw"
}
]
}








Assign employee to client

As specified here, those employees created with he "assigned" type can only work with clients that they are assigned to.

Assign employee to client
PUT/nodes/entity/SmartVault.Accounting.Firm/{account_id}/SmartVault.Accounting.FirmClient/{client_id}/SmartVault.Accounting.ClientToPrincipal


To retrieve the "client_id" of all the employee's with "assigned" type, perform a GET request to `/nodes/entity/SmartVault.Accounting.Firm/{account_name}/SmartVault.Accounting.FirmToEmployee?aemployees=true&children=1&eprop=true`.

This request will return something similar the following:

Show assigned employees



Parameters


account_idstringThe account's alphanumerical identification.
client_idstringThe client's alphanumerical identification.


Body parameters


While assigning an employee to a client, you can make it a "Firm manager" by specifying the following property in the request body.

{
"rid":"8",
"member":true
}

Show body parameters









Remove assigned employee from client

You are also able to delete one of the already assigned employees to a client.

Delete assigned employee
DELETE/nodes/entity/SmartVault.Accounting.Firm/{account_id}/SmartVault.Accounting.FirmClient/{client_id}/SmartVault.Accounting.ClientToPrincipal/User:{employee_id}


Parameters


account_idstringThe account's alphanumerical identification.
client_idstringThe client's alphanumerical identification.
employee_idstringThe assigned employee's id.


You can perform a GET request to
/nodes/entity/SmartVault.Accounting.Firm/{ account_id }/SmartVault.Accounting.FirmClient/{ client_id }/SmartVault.Accounting.ClientToPrincipal;

to retrieve all the information related to the assigned employees to that client.

You can then search for the assigned user id in the "identity" object in the "user_association" and use it to delete that assigned user. Check the response example below for the GET request.

Show content