curl --request GET \
--url https://api.trieve.ai/api/stripe/estimate_bill/{plan_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"gt": "2021-01-01 00:00:00.000",
"gte": "2021-01-01 00:00:00.000",
"lt": "2021-01-01 00:00:00.000",
"lte": "2021-01-01 00:00:00.000"
}'
{
"items": [
{
"amount": 123,
"clean_name": "<string>",
"name": "<string>",
"usage_amount": 1
}
],
"total": 123
}
Return the amount you will be billed from a date range if you were on usage based pricing
curl --request GET \
--url https://api.trieve.ai/api/stripe/estimate_bill/{plan_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"gt": "2021-01-01 00:00:00.000",
"gte": "2021-01-01 00:00:00.000",
"lt": "2021-01-01 00:00:00.000",
"lte": "2021-01-01 00:00:00.000"
}'
{
"items": [
{
"amount": 123,
"clean_name": "<string>",
"name": "<string>",
"usage_amount": 1
}
],
"total": 123
}
DateRange is a JSON object which can be used to filter chunks by a range of dates. This leverages the time_stamp field on chunks in your dataset. You can specify this if you want values in a certain range. You must provide ISO 8601 combined date and time without timezone.
Billing estimate
The response is of type object
.
Was this page helpful?