Accounts
Accounts are organizations you trade with. These can include your customers, prospects or even suppliers. Any organization known to you will be considered an Account. They are the billable entities in the system.
Search
The accounts query accepts the standard connection pagination options. The following example fetches the first page of all Accounts whose name ends with corp
:
Example
query {
accounts(filters: [{
field: name, operation: like, value: "%corp"
}]) {
edges {
node {
id
name
}
}
}
}
For the full range of available filters see the AccountField API Reference.
Create
The following example creates a new Account with name Training Corp
and returns its id
.
Example
mutation {
account{
create(input:{
name: "Training Corp"
}){
account{
id
}
errors{
label
message
value
}
}
}
}
For the full range of available create parameters, see the AccountCreateInput API reference.
Update
The following example updates the specified Account ID with a new email address
Example
mutation {
account{
update(input:{
accountId: "T3JnYW5pc2F0aW9uOjE="
emailAddress: "new-email@example.com"
}){
errors{
label
message
value
}
}
}
}
For the full range of available update parameters, see the AccountUpdateInput API reference.