Top

Recurring Expenses

List recurring expenses
GET /recurringexpenses
List recurring expenses with pagination.
Get a recurring expense
GET /recurringexpenses/:recurring_expense_id
Get the details of a recurring expense.
Create a recurring expense
POST /recurringexpenses
Create a recurring expense.
Update a recurring expense
PUT /recurringexpenses/:recurring_expense_id
Update an existing recurring expense.
Delete a recurring expense
DELETE /recurringexpenses/:recurring_expense_id
Delete an existing recurring expense.
Stop a recurring expense
POST /recurringexpenses/:recurring_expense_id/status/stop
Stop an active recurring expense.
Resume a recurring expense
POST /recurringexpenses/:recurring_expense_id/status/resume
Resume a stopped recurring expense.
List child expenses created
GET /recurringexpenses/:recurring_expense_id/expenses
List child expenses created from recurring expense.
List recurring expense history
GET /recurringexpenses/:recurring_expense_id/comments
Get history and comments of a recurring expense.

List recurring expenses

GET  /recurringexpenses

List recurring expenses with pagination.

Parameters

recurrence_name string
[100]
Search recurring expenses by recurring expense name.
Variants: recurrence_name_startswith and recurrence_name_contains
last_created_date string
[yyyy-mm-dd]
Search recurring expenses by date on when last expense was generated.
Variants: last_created_date_start, last_created_date_end, last_created_date_before and last_created_date_after
next_expense_date string
[yyyy-mm-dd]
Search recurring expenses by date on which next expense will be generated.
Variants: next_expense_date_start, next_expense_date_end, next_expense_date_before and next_expense_date_after
amount double Search recurring expenses by amount.
Variants: amount_less_than, amount_less_equals, amount_greater_than and amount_greater_equals
account_name string
[100]
Search recurring expenses by expense account name.
Variants: account_name_startswith and account_name_contains
status string Search recurring expenses by recurring expense status.
Allowed Values: active, stopped and expired
customer_name string
[100]
Search recurring expenses by customer name.
Variants: customer_name_startswith and customer_name_contains
customer_id string Param Description.
paid_through_account_id string Search expenses by paid through account id.
description string
[100]
Search recurring expenses by description.
Variants: description_startswith and description_contains
filter_by string Filter recurring expenses by status.
Allowed Values: Status.All, Status.Active, Status.Stopped and Status.Expired
search_text string
[100]
Search recurring expenses by recurrence name or customer name.
sort_column string Sort recurring expenses.
Allowed Values: recurrence_name, last_created_date, next_expense_date, account_name, total, customer_name, and created_time

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "recurring_expenses": [
    {
      "recurring_expense_id": "982000000567240",
      "recurrence_name": "Monthly Rental ",
      "recurrence_frequency": "months",
      "repeat_every": 1,
      "last_created_date": "2013-11-18",
      "next_expense_date": "2013-12-18",
      "account_name": "Rent",
      "description": "",
      "currency_id": "982000000000190",
      "currency_code": "USD",
      "total": 281.25,
      "is_billable": true,
      "customer_name": "Bowman & Co",
      "status": "stopped",
      "created_time": "2013-11-18T02:41:36-0800",
      "last_modified_time": ""
    }
  ],
  "page_context": {
    "page": 1,
    "per_page": 200,
    "has_more_page": false,
    "report_name": "Recurring Expenses",
    "applied_filter": "Status.All",
    "sort_column": "created_time",
    "sort_order": "D"
  }
}

Get a recurring expense

GET  /recurringexpenses/:recurring_expense_id

Get the details of a recurring expense.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "recurring_expense": {
    "recurring_expense_id": "982000000567240",
    "recurrence_name": "Monthly Rental ",
    "start_date": "2013-11-18",
    "end_date": "",
    "recurrence_frequency": "months",
    "repeat_every": 1,
    "last_created_date": "2013-11-18",
    "next_expense_date": "2013-12-18",
    "account_id": "982000000561061",
    "account_name": "Rent",
    "currency_id": "982000000000190",
    "currency_code": "USD",
    "exchange_rate": 1.00,
    "tax_id": "982000000557028",
    "tax_name": "VAT",
    "tax_percentage": 12.5,
    "tax_amount": 31.25,
    "sub_total": 250.00,
    "total": 281.25,
    "bcy_total": 281.25,
    "amount": 250.00,
    "description": "",
    "is_inclusive_tax": false,
    "is_billable": true,
    "customer_id": "982000000567001",
    "customer_name": "Bowman & Co",
    "status": "stopped",
    "created_time": "2013-11-18T02:41:36-0800",
    "last_modified_time": "2013-11-18T02:41:36-0800",
    "project_id": "",
    "project_name": ""
  }
}

Create a recurring expense

POST  /recurringexpenses

Create a recurring expense.

Request attributes

account_id* string ID of the expense account.
recurrence_name* string
[100]
Name of the recurring expense.
start_date* string
[yyyy-mm-dd]
Start date of the recurring expense. Expenses will not be generated for dates prior to the current date.
end_date string
[yyyy-mm-dd]
Date on which recurring expense has to expire. Can be left as empty to run forever.
recurrence_frequency* string Frequency of the recurring expense. E.g. weekly, monthly, yearly.
Allowed Values: days, weeks, months and years
repeat_every* int Frequency to repeat. E.g. 1, 6, 12.
amount* double Recurring expense amount.
tax_id string ID of the tax or tax group applied to the recurring expense.
is_inclusive_tax boolean Boolean to specify if the tax is inclusive of the expense amount.
is_billable boolean Boolean to specify if the expense is billable.
customer_id string ID of the customer, if the expense is billable.
project_id string ID of the project associated with the expense.
currency_id string ID of the project associated with the expense.
exchange_rate double Exchange rate of the currency specified.

Sample Request

{
  "account_id": "982000000561061",
  "recurrence_name": "Monthly Rental ",
  "start_date": "2013-11-18",
  "end_date": "",
  "recurrence_frequency": "months",
  "repeat_every": 1,
  "amount": 250.00,
  "tax_id": "982000000557028",
  "is_inclusive_tax": false,
  "is_billable": true,
  "description": "",
  "customer_id": "982000000567001",
  "project_id": "",
  "currency_id": "982000000000190",
  "exchange_rate": 1.00
}

Sample Response

Status: 201 Created
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The recurring expense has been created.",
  "recurring_expense": {
    "recurring_expense_id": "982000000567240",
    "recurrence_name": "Monthly Rental ",
    "start_date": "2013-11-18",
    "end_date": "",
    "recurrence_frequency": "months",
    "repeat_every": 1,
    "last_created_date": "2013-11-18",
    "next_expense_date": "2013-12-18",
    "account_id": "982000000561061",
    "account_name": "Rent",
    "currency_id": "982000000000190",
    "currency_code": "USD",
    "exchange_rate": 1.00,
    "tax_id": "982000000557028",
    "tax_name": "VAT",
    "tax_percentage": 12.5,
    "tax_amount": 31.25,
    "sub_total": 250.00,
    "total": 281.25,
    "bcy_total": 281.25,
    "amount": 250.00,
    "description": "",
    "is_inclusive_tax": false,
    "is_billable": true,
    "customer_id": "982000000567001",
    "customer_name": "Bowman & Co",
    "status": "stopped",
    "created_time": "2013-11-18T02:41:36-0800",
    "last_modified_time": "2013-11-18T02:41:36-0800",
    "project_id": "",
    "project_name": ""
  }
}

Update a recurring expense

PUT  /recurringexpenses/:recurring_expense_id

Update an existing recurring expense.

Request attributes

account_id string ID of the expense account.
recurrence_name* string
[100]
Name of the recurring expense.
start_date* string
[yyyy-mm-dd]
Start date of the recurring expense. Expenses will not be generated for dates prior to the current date.
end_date string
[yyyy-mm-dd]
Date on which recurring expense has to expire. Can be left as empty to run forever.
recurrence_frequency* string Frequency of the recurring expense. E.g. weekly, monthly, yearly.
Allowed Values: days, weeks, months and years
repeat_every* int Frequency to repeat. E.g. 1, 6, 12.
amount* double Recurring expense amount.
tax_id string ID of the tax or tax group applied to the recurring expense.
is_inclusive_tax boolean Boolean to specify if the tax is inclusive of the expense amount.
is_billable boolean Boolean to specify if the expense is billable.
customer_id string ID of the customer, if the expense is billable.
project_id string ID of the project associated with the expense.
currency_id string ID of the project associated with the expense.
exchange_rate double Exchange rate of the currency specified.

Sample Request

{
  "account_id": "982000000561061",
  "recurrence_name": "Monthly Rental ",
  "start_date": "2013-11-18",
  "end_date": "",
  "recurrence_frequency": "months",
  "repeat_every": 1,
  "amount": 250.00,
  "tax_id": "982000000557028",
  "is_inclusive_tax": false,
  "is_billable": true,
  "description": "",
  "customer_id": "982000000567001",
  "project_id": "",
  "currency_id": "982000000000190",
  "exchange_rate": 1.00
}

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Recurring expense information has been updated.",
  "recurring_expense": {
    "recurring_expense_id": "982000000567240",
    "recurrence_name": "Monthly Rental ",
    "start_date": "2013-11-18",
    "end_date": "",
    "recurrence_frequency": "months",
    "repeat_every": 1,
    "last_created_date": "2013-11-18",
    "next_expense_date": "2013-12-18",
    "account_id": "982000000561061",
    "account_name": "Rent",
    "currency_id": "982000000000190",
    "currency_code": "USD",
    "exchange_rate": 1.00,
    "tax_id": "982000000557028",
    "tax_name": "VAT",
    "tax_percentage": 12.5,
    "tax_amount": 31.25,
    "sub_total": 250.00,
    "total": 281.25,
    "bcy_total": 281.25,
    "amount": 250.00,
    "description": "",
    "is_inclusive_tax": false,
    "is_billable": true,
    "customer_id": "982000000567001",
    "customer_name": "Bowman & Co",
    "status": "stopped",
    "created_time": "2013-11-18T02:41:36-0800",
    "last_modified_time": "2013-11-18T02:41:36-0800",
    "project_id": "",
    "project_name": ""
  }
}

Delete a recurring expense

DELETE  /recurringexpenses/:recurring_expense_id

Delete an existing recurring expense.

Sample Response

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

Stop a recurring expense

POST  /recurringexpenses/:recurring_expense_id/status/stop

Stop an active recurring expense.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The recurring expense has been stopped."
}

Resume a recurring expense

POST  /recurringexpenses/:recurring_expense_id/status/resume

Resume a stopped recurring expense.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The recurring expense has been activated."
}

List child expenses created

GET  /recurringexpenses/:recurring_expense_id/expenses

List child expenses created from recurring expense.

Parameters

sort_column string Sort child expenses created.
Allowed Values: date, account_name, customer_name and total

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "expensehistory": [
    {
      "expense_id": "982000000567250",
      "date": "2013-11-18",
      "account_name": "Rent",
      "customer_name": "Bowman & Co",
      "total": 281.25,
      "status": "unbilled"
    }
  ],
  "page_context": {
    "page": 1,
    "per_page": 200,
    "has_more_page": false,
    "report_name": "expense history",
    "sort_column": "expense_account",
    "sort_order": "D"
  }
}

List recurring expense history

GET  /recurringexpenses/:recurring_expense_id/comments

Get history and comments of a recurring expense.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "comments": [
    {
      "comment_id": "982000000567258",
      "recurring_expense_id": "982000000567240",
      "description": "Expense created from recurring profile - Monthly Rental ",
      "commented_by_id": "982000000554041",
      "commented_by": "John David",
      "date": "2013-11-18",
      "date_description": "2 hours ago",
      "time": "2:41 AM",
      "operation_type": "Added",
      "transaction_id": "982000000567250",
      "transaction_type": "expense"
    },
    {
      "comment_id": "982000000567248",
      "recurring_expense_id": "982000000567240",
      "description": "Recurring expense created",
      "commented_by_id": "982000000554041",
      "commented_by": "John David",
      "date": "2013-11-18",
      "date_description": "2 hours ago",
      "time": "2:41 AM",
      "operation_type": "Added",
      "transaction_id": "",
      "transaction_type": "recurring_expense"
    }
  ]
}