GET api/Spend?categoryID={categoryID}
Retrieves Spends based on the provided category ID.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
categoryID |
The ID of the category to filter the spend Items. |
integer |
Required |
Body Parameters
None.
Response Information
Resource Description
A list of spend items matching the provided category ID.
Collection of SpendName | Description | Type | Additional information |
---|---|---|---|
id |
The unique identifier of the Spend. |
integer |
None. |
description |
The description of the Spend. |
string |
None. |
amount |
The amount of the Spend. |
decimal number |
None. |
date |
The date of the Spend. |
date |
None. |
categoryID |
The category of the Spend. |
integer |
None. |
Response Formats
application/json, text/json
Sample:
[ { "id": 1, "description": "sample string 2", "amount": 3.0, "date": "2025-04-29T15:58:05.7772714+00:00", "categoryID": 5 }, { "id": 1, "description": "sample string 2", "amount": 3.0, "date": "2025-04-29T15:58:05.7772714+00:00", "categoryID": 5 } ]
application/xml, text/xml
Sample:
<ArrayOfSpend xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OTJServices.Models"> <Spend> <amount>3</amount> <categoryID>5</categoryID> <date>2025-04-29T15:58:05.7772714+00:00</date> <description>sample string 2</description> <id>1</id> </Spend> <Spend> <amount>3</amount> <categoryID>5</categoryID> <date>2025-04-29T15:58:05.7772714+00:00</date> <description>sample string 2</description> <id>1</id> </Spend> </ArrayOfSpend>