SaaSFlow
DevelopersAPIReferencedata

Batch

Run several analytics slices in one round trip. Each entry in `slices` is a descriptor `{ type, _id?, ...params }` where `type` names the slice and the rest are its parameters, the same ones the dedicated `/data/{slice}` endpoint takes. Pass `_id` to correlate each result back to its request. This is the endpoint a dashboard uses to fill many widgets at once; for a single aggregation the dedicated slice endpoint is simpler and typed. `timeZone` (IANA name, default UTC) decides where day and month boundaries fall, which changes what lands in a period. Invalid params in any slice fail the whole batch with 400, and a slice the caller lacks permission for fails it with 403.

Authentication

You're not signed in. Either sign in at app.saasflow.com and reload (then pick sessionCookie), or paste a SaaSFlow sf_… API key in the bearerAuth field below.
POST
/companies/{companyId}/data/batch

Authorization

Authorization<token>

A SaaSFlow API key (format sf_…) or an OAuth bearer token. Paste only the key — the proxy adds the Bearer prefix. Create an API key in Settings → Company settings → API keys — see API keys.

In: header

Path Parameters

companyId*string
Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/companies/string/data/batch" \  -H "Content-Type: application/json" \  -d '{    "slices": [      null    ]  }'
null