Search Expense Category
Endpoint: Search Expense Category
This endpoint allows users to search for expense categories based on a query parameter. It is particularly useful for retrieving specific categories related to expenses, such as allowances, travel costs, and other financial classifications.
HTTP Method
GET
Request Parameters
- q (string, required): The search query for the expense category. In this case, it is used to filter categories based on user input. For example,
q=Daily Allowancewill search for categories related to daily allowances.
Example Request
Response Structure
The response will return a JSON object containing the following structure:
-
categories (array): An array of category objects matching the search query.
-
Each category object includes:
-
id (integer): The unique identifier for the category.
-
name (string): The name of the category.
-
-
Example Response
This response indicates that the search has been executed, returning an array of categories that match the provided query. If no categories are found, the array may be empty.
Headers
Query parameters
Fetches expense categories matching the q parameter using a case-insensitive partial match on the category name. If q is blank, an empty response is returned.
