cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/analytics/reports/{key}/query \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"range": "2026-09-01..2026-10-01",
"currency": "<string>",
"dimensions": [
"<string>"
],
"filters": [
{
"field": "<string>",
"value": [
"<string>"
]
}
],
"limit": 123,
"sort": [
{
"field": "<string>"
}
]
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.analytics.run_analytics_report(key="<key>", range="2026-09-01..2026-10-01", shape="breakdown")
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.analytics.runAnalyticsReport("<key>", {
range: "2026-09-01..2026-10-01",
shape: "breakdown",
});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Analytics.RunAnalyticsReport(ctx, "<key>", types.ReportQueryRequest{
Range: "2026-09-01..2026-10-01",
Shape: types.ReportQueryRequestShapeBreakdown,
})
if err != nil {
log.Fatal(err)
}
if res.AnalyticsQueryResult != nil {
// handle response
}
}{
"columns": [
{
"currency": "<string>",
"name": "<string>",
"role": "dimension",
"type": "string"
}
],
"meta": {
"from": "<string>",
"prev_from": "<string>",
"prev_to": "<string>",
"query_source": "<string>",
"to": "<string>"
},
"rows": [
[
"<string>"
]
]
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Analytics
Run a financial report
Runs the report identified by key. range is an absolute YYYY-MM-DD..YYYY-MM-DD (end exclusive) or last_N_days. compare is previous_period or previous_year.
POST
/
analytics
/
reports
/
{key}
/
query
cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/analytics/reports/{key}/query \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"range": "2026-09-01..2026-10-01",
"currency": "<string>",
"dimensions": [
"<string>"
],
"filters": [
{
"field": "<string>",
"value": [
"<string>"
]
}
],
"limit": 123,
"sort": [
{
"field": "<string>"
}
]
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.analytics.run_analytics_report(key="<key>", range="2026-09-01..2026-10-01", shape="breakdown")
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.analytics.runAnalyticsReport("<key>", {
range: "2026-09-01..2026-10-01",
shape: "breakdown",
});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Analytics.RunAnalyticsReport(ctx, "<key>", types.ReportQueryRequest{
Range: "2026-09-01..2026-10-01",
Shape: types.ReportQueryRequestShapeBreakdown,
})
if err != nil {
log.Fatal(err)
}
if res.AnalyticsQueryResult != nil {
// handle response
}
}{
"columns": [
{
"currency": "<string>",
"name": "<string>",
"role": "dimension",
"type": "string"
}
],
"meta": {
"from": "<string>",
"prev_from": "<string>",
"prev_to": "<string>",
"query_source": "<string>",
"to": "<string>"
},
"rows": [
[
"<string>"
]
]
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Authorizations
Enter your API key in the format x-api-key <api-key>*
Path Parameters
Report key
Body
application/json
Report query request
Example:
"2026-09-01..2026-10-01"
Available options:
timeseries, breakdown, scalar Available options:
previous_period, previous_year Show child attributes
Show child attributes
Available options:
day, week, month Show child attributes
Show child attributes

