Search Expense service
Search Expense Service
This endpoint allows users to search for expenses based on a query parameter. The query parameter q is used to specify the type of expense being searched for.
Request
-
Method: GET
-
URL:
{{host}}/apis/external/search/searchExpenseService?q=Food
Query Parameters
Response
The response will return a JSON object containing an array of items that match the search criteria. Each item in the array represents an expense and includes the following fields:
-
id: A unique identifier for the expense. -
name: The name of the expense.
Example Response
This example response shows two expense items related to the search term “Food”. Each item includes an id and a name representing the expense.
This endpoint allows users to search for expense items based on a query parameter. It is particularly useful for retrieving specific expense categories or items.
Request
-
Method: GET
-
URL:
{{host}}/apis/external/search/searchExpenseService -
Query Parameters:
q(string): The search term to filter expense items. For example, usingq=Foodwill return expense items related to food.
Response
The response will return a JSON object containing an array of items that match the search criteria.
-
Response Structure:
-
items(array): An array of expense items.-
Each item in the array contains:
-
id(integer): A unique identifier for the expense item. -
name(string): The name of the expense item.
-
-
-
Notes
-
Ensure that the query parameter
qis properly encoded to handle special characters. -
The response may contain multiple items or none, depending on the search term provided.
Headers
Query parameters
Searches expense services using the q parameter with a case-insensitive partial match on the service name. Returns an empty response if q is blank or not provided.
