const response = await fetch('https://api.opsnow.io/cost/v3/billing/analytics/daily-portion', {
method: 'POST',
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"companyId": "1",
"costDate": "2019-08-12",
"detailFilters": {},
"endDate": "2024-02-12",
"filters": {},
"isMonthly": false,
"itemViewId": "216093335544",
"selectedVendor": "AWS",
"siteCode": "BESPIN",
"startDate": "2023-02-01",
"viewBy": "account",
"viewByItem": "216093335544",
"visibleFields": [
"vendor",
"linkedAccountId",
"productName",
"region",
"usage",
"cost",
"usageType"
]
}),
});
const data = await response.json();