Cost API
Finout Cost API enables you to query and analyze costs using user-defined Finout Views. You can easily get a list of your views and retrieve the costs for a specified view. You can query the costs for any date range of up to 90 days specified in UTC timestamps. The results are returned in JSON format for easy processing.
Note: Only cost data is returned when querying a view via the Cost API.
GET
/Views
GET
/Views
Description
Gets a list of all your account views. For more information on views, see Finout Views.
Prerequisites
Generate a Client ID and Secret Key from Finout to add in Headers.
You must create a view in the MegaBill before querying the GET view. There is currently no 'Create View' API option.
Request
https://app.finout.io/v1/view
Response
Returns a JSON object with the following properties:
name: The names of your account's views.
id: The unique identifier of your account's views.
POST
/Query by view
POST
/Query by view
Description
Return all costs for a specified view and date range for up to 90 days. For more information on views, see Finout Views.
Prerequisites
Generate a Client ID and Secret Key from Finout to add in Headers.
You must first GET the view you want to query
Add the GET view ID to the body of the POST query. Example:
{
"viewId": "6244e453-e8b8-4f1f-9a96-4ba1ae5d48f7"
}
You must either specify dates or delete them completely. The query won't work when blank dates are still present. Example:
{
"viewId": "6244e453-e8b8-4f1f-9a96-4ba1ae5d48f7",
"date": {
"unixTimeMillSecondsStart": 1719824738,
"unixTimeMillSecondsEnd": 1719911138
},
"costType": "netAmortizedCost"
}
Request
https://app.finout.io/v1/cost/query-by-view
Body of Request
viewId
string
Name of the user
date
number
Age of the user
unixTimeMillSecondsStart
Numeric
Start Date represented in Unix Epoch time
unixTimeMillSecondsEnd
Numeric
End Date represented in Unix Epoch time
costType
String
Response
Last updated