Pesatime - API
  • Getting started
  • Authorization
  • Example requests
  • Expenses
    • Expense categories
    • Expenses
  • INCOME
    • Income categories
    • Income
Powered by GitBook
On this page
  • CREATE
  • UPDATE
  • RETRIEVE
  • DELETE

Was this helpful?

  1. INCOME

Income categories

Shows you how to manage income categories

CREATE

POST https://api.pesatime.com/v1/income_categories

Create a new category

Request Body

Name
Type
Description

name

string

The name of the category

{
  "status": 1,
  "message": "Saved",
  "data": {
    "_id": "5dce4b8a4d44af36f693cd2b"
  }
}
{
  "status": 0,
  "message": "Error description here"
}

UPDATE

PUT https://api.pesatime.com/v1/income_categories/:categoryId

Update category

Path Parameters

Name
Type
Description

categoryId

string

The ID of the category to update

Request Body

Name
Type
Description

name

string

The new name

{
  "status": 1,
  "message": "Category updated successfully"
}
{
  "status": 0,
  "message": "Error description here"
}

RETRIEVE

GET https://api.pesatime.com/v1/income_categories/:categoryId

Get category details

Path Parameters

Name
Type
Description

categoryId

string

The ID of the category to get details for

{
  "status": 1,
  "data": {
    "active": true,
    "_id": "5dcc0fc3a9e5e668a62c72e1",
    "organization": "5db5a64a6cb3e2060a7b864c",
    "user": "5cded7f553ea376e8bba6bfd",
    "name": "Grocerries sale",
    "dateCreated": "2019-11-13T14:14:27.095Z",
    "__v": 0
  }
}
{
  "status": 0,
  "message": "Category not found"
}

DELETE

DELETE https://api.pesatime.com/v1/expense_categories/:categoryId

Delete category

Path Parameters

Name
Type
Description

categoryId

string

The ID of the category to delete

{
  "status": 1,
  "message": "Category deleted successfully"
}
{
  "status": 0,
  "message": "Error description here"
}
PreviousExpensesNextIncome

Last updated 5 years ago

Was this helpful?