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.
Parameters
account_id
stringThe account's alphanumerical identification.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.
Parameters
account_id
stringThe account's alphanumerical identification.client_id
stringThe client's alphanumerical identification.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:
Parameters
account_id
stringThe account's alphanumerical identification.client_id
stringThe client's alphanumerical identification. This will be the client on which the merge will happen.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.
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.
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.
This request will return something similar the following:
Show assigned employees
Parameters
account_id
stringThe account's alphanumerical identification.client_id
stringThe 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.
Parameters
account_id
stringThe account's alphanumerical identification.client_id
stringThe client's alphanumerical identification.employee_id
stringThe assigned employee's id./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.