Skip to main content

Create journal and accounts

Create a journal

GraphQL body

mutation journalCreate($input: JournalCreateInput!) {
journalCreate(input: $input) {
journal {
journalId
name
}
}
}

Variables

{
"input": {
"journalId": "bcc24f47-990c-457d-88cb-76332450ac77",
"name": "General Ledger"
}
}

Response

{
"data": {
"journalCreate": {
"journal": {
"journalId": "bcc24f47-990c-457d-88cb-76332450ac77",
"name": "General Ledger"
}
}
}
}

Create a checking account

GraphQL body

mutation accountCreate($input: AccountCreateInput!) {
accountCreate(input: $input) {
account {
accountId
name
}
}
}

Variables

{
"input": {
"accountId": "3a7d421b-7f5a-43ca-ba6f-5f3e6ee67237",
"name": "Alice - Checking",
"code": "ALICE.CHECKING-3a7d421b-7f5a-43ca-ba6f-5f3e6ee67237",
"normalBalanceType": "CREDIT"
}
}

Response

{
"data": {
"accountCreate": {
"account": {
"accountId": "3a7d421b-7f5a-43ca-ba6f-5f3e6ee67237",
"name": "Alice - Checking"
}
}
}
}

Create a debit account

GraphQL body

mutation accountCreate($input: AccountCreateInput!) {
accountCreate(input: $input) {
account {
accountId
name
}
}
}

Variables

{
"input": {
"accountId": "2e40175d-35c2-4b6f-9c01-cc2309934d25",
"name": "Assets",
"code": "ASSET-2e40175d-35c2-4b6f-9c01-cc2309934d25",
"normalBalanceType": "DEBIT"
}
}

Response

{
"data": {
"accountCreate": {
"account": {
"accountId": "2e40175d-35c2-4b6f-9c01-cc2309934d25",
"name": "Assets"
}
}
}
}