Clients
Clients are a core part of Elements. The Elements API refers to these as FirmClients. On this page, we'll dive into the different queries and mutations you can use to manage clients programmatically.
The FirmClient model
- Name
id- Type
- ID!
- Description
Unique identifier for the client.
- Name
createdAt- Type
- Time!
- Description
ISO-8601 timestamp of when this
FirmClientwas created.
- Name
updatedAt- Type
- Time!
- Description
ISO-8601 timestamp of when this
FirmClientwas last updated.
- Name
givenNamesDisplay- Type
- String!
- Description
The client's given names, as they should be displayed.
- Name
familyNamesDisplay- Type
- String!
- Description
The client's family names, as they should be displayed.
- Name
status- Type
- FirmClientStatus!
- Description
The client's status. This is an enum with possible values being
ACTIVEorARCHIVED.
- Name
mode- Type
- FirmClientMode!
- Description
The client's mode. This is an enum with possible values being
PROSPECT,ONBOARDING_IN_PROGRESS(Onboarding), orONBOARDING_COMPLETED(Active).
- Name
household- Type
- Household!
- Description
The household representing the client's household. Please reference the Household section for more information.
Querying clients
This query allows you to fetch all the clients for a firm. To get your firm ID, please see the Authentication section. The list of firms your user is affiliated (and their IDs) come back in the signIn mutation.
Required arguments
- Name
firmID- Type
- ID!
- Description
The ID for the firm you want to fetch clients for.
Optional arguments
- Name
cursor- Type
- String
- Description
A cursor to fetch the next page of results.
Request
query FirmClients($firmID: ID!, $cursor: String) {
firmClientsForFirm(firmID: $firmID, cursor: $cursor) {
items {
id
createdAt
updatedAt
givenNamesDisplay
familyNamesDisplay
status
mode
household {
id
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
Retrieve a client
This query allows you to retrieve a client by providing the firm ID and client ID. To get your firm ID, please see the Authentication section. The list of firms your user is affiliated (and their IDs) come back in the signIn mutation.
Required arguments
- Name
firmID- Type
- ID!
- Description
The ID for the firm you want to fetch the client for.
- Name
id- Type
- ID!
- Description
The ID for the client you want to fetch.
Request
query FirmClient($firmID: ID!, $id: ID!) {
firmClient(firmID: $firmID, id: $id) {
id
createdAt
updatedAt
givenNamesDisplay
familyNamesDisplay
status
mode
household {
id
}
}
}