Top

Journals

Get journal list
GET /journals
Get journal list
Get journal
GET /journals/:journal_id
Get the details of the journal
Create a journal
POST /journals
Create a journal
Update a journal
PUT /journals/:journal_id
Updates the journal with given information
Delete a journal
DELETE /journals/:journal_id
Deletes the given journal

Get journal list

GET  /journals

Get journal list

Parameters

entry_number string
[100]
Search journals by journal entry number.
Variants: entry_number_startswith and entry_number_contains
reference_number string
[100]
Search journals by journal reference number.
Variants: reference_number_startswith and reference_number_contains
date string
[yyyy-MM-dd]
Search journals by journal date.
Variants: date_start, date_end, date_before and date_after
notes string
[100]
Search journals by journal notes.
Variants: notes_startswith and notes_contains
total double Search journals by journal total.
Variants: total_less_than, total_less_equals, total_greater_than and total_greater_equals
filter_by string Filter journals by journal date.
Allowed Values: JournalDate.All, JournalDate.Today, JournalDate.ThisWeek, JournalDate.ThisMonth, JournalDate.ThisQuarter and JournalDate.ThisYear
sort_column string Sort journal list.
Allowed Values: journal_date, entry_number, reference_number and total

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "journals": [
    {
      "journal_id": "460000000038131",
      "journal_date": "2013-09-05",
      "entry_number": "3",
      "reference_number": "",
      "notes": "Tracking a depreciation of a fixed asset",
      "total": 1000.00
    },
    {
      "journal_id": "460000000038001",
      "journal_date": "2013-09-04",
      "entry_number": "1",
      "reference_number": "7355",
      "notes": "Loan repayment",
      "total": 5050.00
    }
  ],
  "page_context": {
    "page": 1,
    "per_page": 200,
    "has_more_page": false,
    "report_name": "Manual Journals",
    "applied_filter": "JournalDate.ThisYear",
    "start_date": "2013-01-01",
    "end_date": "2013-12-31",
    "sort_column": "journal_date",
    "sort_order": "D"
  }
}

Get journal

GET  /journals/:journal_id

Get the details of the journal

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "journal": {
    "journal_id": "460000000038001",
    "entry_number": "1",
    "reference_number": "7355",
    "notes": "Loan repayment",
    "currency_id": "460000000000097",
    "currency_code": "USD",
    "currency_symbol": "$",
    "journal_date": "2013-09-04",
    "line_items": [
      {
        "line_id": "460000000038005",
        "account_id": "460000000000361",
        "account_name": "Petty Cash",
        "description": "",
        "debit_or_credit": "credit",
        "tax_id": "",
        "tax_name": "",
        "tax_type": "tax",
        "tax_percentage": "",
        "amount": 5050.00
      },
      {
        "line_id": "460000000038007",
        "account_id": "460000000038079",
        "account_name": "Notes Payable",
        "description": "",
        "debit_or_credit": "debit",
        "tax_id": "",
        "tax_name": "",
        "tax_type": "",
        "tax_percentage": "",
        "amount": 5000.00
      },
      {
        "line_id": "460000000040007",
        "account_id": "460000000040001",
        "account_name": "Interest Expense",
        "description": "",
        "debit_or_credit": "debit",
        "tax_id": "",
        "tax_name": "",
        "tax_type": "tax",
        "tax_percentage": "",
        "amount": 50.00
      }
    ],
    "line_item_total": 5050.00,
    "total": 5050.00,
    "price_precision": 2,
    "taxes": [],
    "created_time": "2013-09-04T09:40:07+0530",
    "last_modified_time": "2013-09-05T17:13:31+0530"
  }
}

Create a journal

POST  /journals

Create a journal

Request attributes

journal_date* string
[yyyy-MM-dd]
Date on which the journal to be recorded.
reference_number string
[100]
Reference number for the journal.
notes string
[500]
Notes for the journal.
account_id string ID of account for which journals to be recorded.
description string
[500]
Description that can be given at the line item level.
tax_id string ID of the tax.
amount* double Amount to be recorded for the journal.
debit_or_credit* string Whether the accounts needs to be debited or credited.
Allowed Values: debit and credit

Sample Request

{
      "journal_date": "2013-09-04",
      "reference_number": "7355",
      "notes": "Loan repayment",
      "line_items": [
        {
          "account_id": "460000000000361",
          "description": "",
          "tax_id": "",
          "amount": 5000.00,
          "debit_or_credit": "credit"
        },
        {
          "account_id": "460000000038079",
          "description": "",
          "tax_id": "",
          "amount": 5000.00,
          "debit_or_credit": "debit"
        }
      ]
    }

Sample Response

Status: 201 Created
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "The journal has been created.",
      "journal": {
        "journal_id": "460000000038001",
        "entry_number": "1",
        "reference_number": "7355",
        "notes": "Loan repayment",
        "currency_id": "460000000000097",
        "currency_code": "USD",
        "currency_symbol": "$",
        "journal_date": "2013-09-04",
        "line_items": [
          {
            "line_id": "460000000038005",
            "account_id": "460000000000361",
            "account_name": "Petty Cash",
            "description": "",
            "debit_or_credit": "credit",
            "tax_id": "",
            "tax_name": "",
            "tax_type": "tax",
            "tax_percentage": "",
            "amount": 5000.00
          },
          {
            "line_id": "460000000038007",
            "account_id": "460000000038079",
            "account_name": "Notes Payable",
            "description": "",
            "debit_or_credit": "debit",
            "tax_id": "",
            "tax_name": "",
            "tax_type": "tax",
            "tax_percentage": "",
            "amount": 5000.00
          }
        ],
        "line_item_total": 5000.00,
        "total": 5000.00,
        "price_precision": 2,
        "taxes": [],
        "created_time": "2013-09-04T09:40:07+0530",
        "last_modified_time": "2013-09-05T17:13:31+0530"
      }
    }

Update a journal

PUT  /journals/:journal_id

Updates the journal with given information

Request attributes

journal_date* string
[yyyy-MM-dd]
Date on which the journal to be recorded.
reference_number string
[100]
Reference number for the journal.
notes string
[500]
Notes for the journal.
account_id string ID of account for which journals to be recorded.
description string
[500]
Description that can be given at the line item level.
tax_id string ID of the tax.
amount* double Amount to be recorded for the journal.
debit_or_credit* string Whether the accounts needs to be debited or credited.
Allowed Values: debit and credit

Sample Request

{
      "journal_date": "2013-09-04",
      "reference_number": "7355",
      "notes": "Loan repayment",
      "line_items": [
        {
          "account_id": "460000000000361",
          "line_id": "460000000038005",
          "description": "",
          "tax_id": "",
          "amount": 5050.00,
          "debit_or_credit": "credit"
        },
        {
          "account_id": "460000000038079",
          "line_id": "460000000038007",
          "description": "",
          "tax_id": "",
          "amount": 5000.00,
          "debit_or_credit": "debit"
        },
        {
          "account_id": "460000000040001",
          "line_id": "460000000040007",
          "description": "",
          "tax_id": "",
          "amount": 50.00,
          "debit_or_credit": "debit"
        }
      ]
    }

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "The journal has been updated.",
      "journal": {
        "journal_id": "460000000038001",
        "entry_number": "1",
        "reference_number": "7355",
        "notes": "Loan repayment",
        "currency_id": "460000000000097",
        "currency_code": "USD",
        "currency_symbol": "$",
        "journal_date": "2013-09-04",
        "line_items": [
          {
            "line_id": "460000000038005",
            "account_id": "460000000000361",
            "account_name": "Petty Cash",
            "description": "",
            "debit_or_credit": "credit",
            "tax_id": "",
            "tax_name": "",
            "tax_type": "",
            "tax_percentage": "",
            "amount": 5050.0
          },
          {
            "line_id": "460000000038007",
            "account_id": "460000000038079",
            "account_name": "Notes Payable",
            "description": "",
            "debit_or_credit": "debit",
            "tax_id": "",
            "tax_name": "",
            "tax_type": "tax",
            "tax_percentage": "",
            "amount": 5000.0
          },
          {
            "line_id": "460000000040007",
            "account_id": "460000000040001",
            "account_name": "Interest Expense",
            "description": "",
            "debit_or_credit": "debit",
            "tax_id": "",
            "tax_name": "",
            "tax_type": "tax",
            "tax_percentage": "",
            "amount": 50.0
          }
        ],
        "line_item_total": 5050.0,
        "total": 5050.0,
        "price_precision": 2,
        "taxes": [],
        "created_time": "2013-09-04T09:40:07+0530",
        "last_modified_time": "2013-09-05T17:13:31+0530"
      }
    }

Delete a journal

DELETE  /journals/:journal_id

Deletes the given journal

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The selected journal entry has been deleted."
}