Top

Expense Category

List expense categories
GET /expensecategories
List expense categories along with pagination
Get an expense category
GET /expensecategories/:category_id
Gets the details of an expense category.
Create an expense category
POST /expensecategories
Create an expense category.
Update an expense category
PUT /expensecategories/:category_id
Update an existing expense category.
Delete an expense category
DELETE /expensecategories/:category_id
Delete an existing expense category. Category which is associated with expense cannot be deleted.
Mark an expense category as active
POST /expensecategories/:categoryid/active
Update an expense category status as active.
Mark an expense category as inactive
POST /expensecategories/:categoryid/inactive
Update an expense category status as inactive.

List expense categories

GET  /expensecategories

List expense categories along with pagination

Parameters

filter_by string Filter expense categories by status.
Allowed Values: ExpenseCategories.Active, ExpenseCategories.Inactive and ExpenseCategories.All
sort_column string Sort expense categories by account name.
Allowed Values: account_name

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "expense_accounts": [
    {
      "account_id": "982000000561057",
      "account_name": "Marketing",
      "description": "",
      "status": "active"
    },
    {
      "account_id": "982000000561055",
      "account_name": "Meals & Lodging",
      "description": "",
      "status": "active"
    },
    {
      "account_id": "982000000561059",
      "account_name": "Other",
      "description": "",
      "status": "active"
    },
    {
      "account_id": "982000000561061",
      "account_name": "Rent",
      "description": "Monthly rental expense",
      "status": "active"
    },
    {
      "account_id": "982000000561053",
      "account_name": "Telephone",
      "description": "",
      "status": "active"
    },
    {
      "account_id": "982000000561051",
      "account_name": "Travel",
      "description": "",
      "status": "active"
    },
    {
      "account_id": "982000000567264",
      "account_name": "Wages",
      "description": "",
      "status": "active"
    }
  ],
  "page_context": {
    "page": 1,
    "per_page": 200,
    "has_more_page": false,
    "report_name": "Expense Category",
    "applied_filter": "ExpenseCategories.Active",
    "sort_column": "account_name",
    "sort_order": "A"
  }
}

Get an expense category

GET  /expensecategories/:category_id

Gets the details of an expense category.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "expense_category": {
    "account_id": "982000000561057",
    "account_name": "Marketing",
    "description": "",
    "status": "active",
    "created_time": "",
    "last_modified_time": ""
  }
}

Create an expense category

POST  /expensecategories

Create an expense category.

Request attributes

account_name* string
[100]
Name of the expense category.
description string
[500]
Description of the expense category.

Sample Request

{
  "account_name": "Marketing",
  "description": ""
}

Sample Response

Status: 201 Created
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The expense category has been created.",
  "expense_category": {
    "account_id": "982000000561057",
    "account_name": "Marketing",
    "description": "",
    "status": "active",
    "created_time": "",
    "last_modified_time": ""
  }
}

Update an expense category

PUT  /expensecategories/:category_id

Update an existing expense category.

Request attributes

account_name* string
[100]
Name of the expense category.
description string
[500]
Description of the expense category.

Sample Request

{
  "account_name": "Marketing",
  "description": ""
}

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Category information has been updated.",
  "expense_category": {
    "account_id": "982000000561057",
    "account_name": "Marketing",
    "description": "",
    "status": "active",
    "created_time": "",
    "last_modified_time": ""
  }
}

Delete an expense category

DELETE  /expensecategories/:category_id

Delete an existing expense category. Category which is associated with expense cannot be deleted.

Sample Response

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

Mark an expense category as active

POST  /expensecategories/:categoryid/active

Update an expense category status as active.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The selected categories have been marked as active."
}

Mark an expense category as inactive

POST  /expensecategories/:categoryid/inactive

Update an expense category status as inactive.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The selected categories have been marked as inactive."
}