Manual Journal Entries

Get a list of all manual journal entries

ENDPOINT
  GET /manualJournalEntries

SAMPLE CALL
  curl -u [your_bullet_username]:[your_api_key] https://accounts-app.bullethq.com/api/v1/manualJournalEntries


RESPONSE CODES
  200 - Successful call

SAMPLE RESPONSE
[
  {
    "id": 2,
    "reason": "A reason for the manual journal entry",
    "date": "2014-01-14",
    "manualJournalEntryLines": [
      {
        "id": 4,
        "accountCode": "SALES",
        "debitAmountValue": "400.00",
        "creditAmountValue": "400.00"
      }
    ]
  },
  {
    "id": 3,
    "reason": "Another reason for the manual journal entry",
    "date": "2014-01-15",
    "manualJournalEntryLines": [
      {
        "id": 5,
        "accountCode": "ADVERTISING",
        "debitAmountValue": "200.00",
        "creditAmountValue": "10.00"
      },
      {
        "id": 6,
        "accountCode": "SALES",
        "debitAmountValue": "0.00",
        "creditAmountValue": "190.00"
      }
    ]
  }
]

Create an manual journal entry

Note : the account specifed by "accountCode" must already exist.

Log into Bullet and go to "My Company -> Chart of Accounts" to see the list of accounts. Clicking on an account will show its details, here you will see the "code" for the account. It is this value that needs to be specified in the api call.

Also the total credits and debits for the manual journal entry must balance or the creation will fail.

ENDPOINT
  POST /manualJournalEntries


SAMPLE CALL
    curl -u [your_bullet_username]:[your_api_key] \
    -H "Accept: application/json" \
    -H "Content-type: application/json" \
    --data @createManualJournalEntry.json \
    -X POST \
    https://accounts-app.bullethq.com/api/v1/manualJournalEntries/

SAMPLE createManualJournalEntry.json

    {
        "reason": "A manual journal entry with multiple lines",
        "date": "2014-01-24",
        "manualJournalEntryLines": [
            {
                "accountCode": "SALES",
                "debitAmountValue": 400,
                "creditAmountValue": 400
            },
            {
                "accountCode": "ADVERTISING",
                "debitAmountValue": 300,
                "creditAmountValue": 0
            },
            {
                "accountCode": "SALES",
                "debitAmountValue": 200,
                "creditAmountValue": 500
            }
        ]
    }

RESPONSE CODES
  200 - Successful call

SAMPLE RESPONSE
{ 
  "date" : "2014-01-24",
  "id" : 1,
  "manualJournalEntryLines" : [ 
      { "accountCode" : "SALES",
        "creditAmountValue" : "400.00",
        "debitAmountValue" : "400.00",
        "id" : 1
      },
      { "accountCode" : "ADVERTISING",
        "creditAmountValue" : "0.00",
        "debitAmountValue" : "300.00",
        "id" : 2
      },
      { "accountCode" : "SALES",
        "creditAmountValue" : "500.00",
        "debitAmountValue" : "200.00",
        "id" : 3
      }
    ],
  "reason" : "A manual journal entry with multiple lines"
}

Get a Manual Journal Entry

ENDPOINT
  GET /manualJournalEntries/[manual_journal_entry_id]


SAMPLE CALL
    curl -u [your_bullet_username]:[your_api_key] \
    -H "Accept: application/json" \
    -H "Content-type: application/json" \
    -X GET \
    https://accounts-app.bullethq.com/api/v1/manualJournalEntries/4


RESPONSE CODES
  200 - Successful call

SAMPLE RESPONSE
{
  "id": 4,
  "reason": "A reason for the manual journal entry",
  "date": "2014-01-14",
  "manualJournalEntryLines": [
    {
      "id": 7,
      "accountCode": "SALES",
      "debitAmountValue": "400.00",
      "creditAmountValue": "400.00"
    }
  ]
}

Update a Manual Journal Entry

Note : the account specifed by "accountCode" must already exist.

Log into Bullet and go to "My Company -> Chart of Accounts" to see the list of accounts. Clicking on an account will show its details, here you will see the "code" for the account. It is this value that needs to be specified in the api call.

Also the resulting total credits and debits for the manual journal entry must balance or the update will fail. When updating :

  • if json includes manual journal entry lines with no id, we add them as part of the update.
  • if json includes manual journal entry line with an id - this updates the line also

ENDPOINT
  PUT /manualJournalEntries/[manual_journal_entry_id]

SAMPLE updateManualJournalEntry.json

{
    "reason": "Updated reason",
    "date": "2014-02-16",
    "manualJournalEntryLines": [
        {
            "accountCode": "ADVERTISING",
            "debitAmountValue": 20,
            "creditAmountValue": 10
        },
        {
            "accountCode": "SALES",
            "debitAmountValue": 80,
            "creditAmountValue": 90
        },
        {
            "id": 8,
            "accountCode": "TRADE_PAYABLES",
            "debitAmountValue": 5,
            "creditAmountValue": 5
        }
    ]
}

SAMPLE CALL
    curl -u [your_bullet_username]:[your_api_key] \
    -H "Accept: application/json" \
    -H "Content-type: application/json" \
    --data @updateManualJournalEntry.json \
    -X PUT \
    https://accounts-app.bullethq.com/api/v1/manualJournalEntries/5

RESPONSE CODES

  200 - Successful call

SAMPLE RESPONSE
{
  "id": 5,
  "reason": "Updated reason",
  "date": "2014-02-16",
  "manualJournalEntryLines": [
    {
      "id": 8,
      "accountCode": "TRADE_PAYABLES",
      "debitAmountValue": "5.00",
      "creditAmountValue": "5.00"
    },
    {
      "id": 9,
      "accountCode": "ADVERTISING",
      "debitAmountValue": "20.00",
      "creditAmountValue": "10.00"
    },
    {
      "id": 10,
      "accountCode": "SALES",
      "debitAmountValue": "80.00",
      "creditAmountValue": "90.00"
    }
  ]
}

Delete an Manual Journal Entry

ENDPOINT
  DELETE /manualJournalEntries/[manual_journal_entry_id]

SAMPLE CALL
    curl -u [your_bullet_username]:[your_api_key]
    -H "Accept: application/json"
    -H "Content-type: application/json"
    -X DELETE
    https://accounts-app.bullethq.com/api/v1/manualJournalEntries/4

RESPONSE CODES
  200 - Successful call

SAMPLE RESPONSE
{
  "id": 4,
  "reason": "A reason for the manual journal entry",
  "date": "2014-01-14",
  "manualJournalEntryLines": [
    {
      "id": 7,
      "accountCode": "SALES",
      "debitAmountValue": "400.00",
      "creditAmountValue": "400.00"
    }
  ]
}

Add a manual journal entry line

This adds a manual journal entry line to an existing manual journal entry.

The account specifed by "accountCode" must already exist.

If adding the manual journal entry line causes a debits and credits imbalance, the addition will fail

ENDPOINT
  POST /manualJournalEntries/[manual_journal_entry_id]/manualJournalEntryLines/

SAMPLE addManualJournalEntryLine.json

{
    "accountCode": "TRADE_PAYABLES",
    "debitAmountValue": 5,
    "creditAmountValue": 5
}

SAMPLE CALL
    curl -u [your_bullet_username]:[your_api_key] \
    -H "Accept: application/json" \
    -H "Content-type: application/json" \
    --data @addManualJournalEntryLine.json \
    -X POST \
    https://accounts-app.bullethq.com/api/v1/manualJournalEntries/1/manualJournalEntryLines


RESPONSE CODES
  200 - Successful call

SAMPLE RESPONSE
{
  "id": 14,
  "accountCode": "TRADE_PAYABLES",
  "debitAmountValue": "5.00",
  "creditAmountValue": "5.00"
}

Update a manual journal entry line

This updates a manual journal entry line for an existing manual journal entry.

The account specifed by "accountCode" must already exist.

If updating the manual journal entry line causes a debits and credits imbalance, the update will fail


ENDPOINT
  PUT /manualJournalEntries/[manual_journal_entry_id]/manualJournalEntryLines/[manual_journal_entry_line_id]

SAMPLE updateManualJournalEntryLine.json
{
    "accountCode": "TRADE_PAYABLES",
    "debitAmountValue": 23,
    "creditAmountValue": 23
}

SAMPLE CALL
    curl -u [your_bullet_username]:[your_api_key] \
    -H "Accept: application/json" \
    -H "Content-type: application/json" \
    --data @updateManualJournalEntryLine.json \
    -X PUT \
    https://accounts-app.bullethq.com/api/v1/manualJournalEntries/1/manualJournalEntryLines/15


RESPONSE CODES
  200 - Successful call

SAMPLE RESPONSE
{
  "id": 15,
  "accountCode": "TRADE_PAYABLES",
  "debitAmountValue": "23.00",
  "creditAmountValue": "23.00"
}

Delete a manual journal entry line

This deletes a manual journal entry line from an existing manual journal entry.

If deleting the manual journal entry line causes a debits and credits imbalance, the deletion will fail

ENDPOINT
  DELETE /manualJournalEntries/[manual_journal_entry_id]/manualJournalEntryLines/[manual_journal_entry_line_id]


SAMPLE CALL
    curl -u [your_bullet_username]:[your_api_key] \
    -H "Accept: application/json" \
    -H "Content-type: application/json" \
    -X DELETE \
    https://accounts-app.bullethq.com/api/v1/manualJournalEntries/1/manualJournalEntryLines/15


RESPONSE CODES
  200 - Successful call

SAMPLE RESPONSE
{
  "id": 15,
  "accountCode": "TRADE_PAYABLES",
  "debitAmountValue": "23.00",
  "creditAmountValue": "23.00"
}