All endpoints
Pivot Table Generator
POST
/api/v1/tools/pivot-table-generatorSummarize an Excel or CSV file into a pivot table — pick row, column and value fields and an aggregation.
Authentication
Requires an API key in the X-API-Key header.
Try it
POST
/api/v1/tools/pivot-table-generatorParameters
rowsstringrequiredRows as an array of objects.
rowFieldstringrequiredColumn used to group rows.
colFieldstringrequiredColumn used to group columns.
valueFieldstringrequiredColumn whose values are aggregated.
aggregationstringoptionalAggregation function. Default sum.
sumcountavgminmaxRequest body
{
"rows": [
{
"region": "West",
"product": "A",
"amount": 100
},
{
"region": "West",
"product": "B",
"amount": 50
},
{
"region": "East",
"product": "A",
"amount": 75
}
],
"rowField": "region",
"colField": "product",
"valueField": "amount",
"aggregation": "sum"
}Response codes
200Success.400Invalid request — check your body or parameters.401Missing or invalid API key.403The API key is not scoped to this endpoint.429Rate limit exceeded — retry after a short wait.
Language
cURL
Request
curl -X POST https://utilerio.com/api/v1/tools/pivot-table-generator \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"rows":[{"region":"West","product":"A","amount":100},{"region":"West","product":"B","amount":50},{"region":"East","product":"A","amount":75}],"rowField":"region","colField":"product","valueField":"amount","aggregation":"sum"}'Response
{ "rowKeys": ["East", "West"], "colKeys": ["A", "B"], "cells": { "East": { "A": 75, "B": 0 }, "West": { "A": 100, "B": 50 } }, "rowTotals": { "East": 75, "West": 150 }, "colTotals": { "A": 175, "B": 50 }, "grandTotal": 225 }
