The Metrics Query Aggregate Endpoint is returning 500 error code when making paginated requests for “Placed Order” metric
Please find the API request details below:
URL:
https://a.klaviyo.com/api/metric-aggregates/?page%5Bcursor%5D=eyJyb3ciOiB7ImF0dHJpYnV0ZWRfZW50aXR5X21lc3NhZ2VfaWQiOiAiVlp1Y3g3IiwgInZhbHVlX2dhcGZpbGxlZCI6IFswLjAsIDAuMCwgMC4wLCAwLjAsIDAuMCwgNDg4LjI4LCAxNDE5LjUyMDAwMDAwMDAwMDIsIDU1MC40NSwgNTgzLjMyOTk5OTk5OTk5OTksIDU5My4yMSwgMC4wLCAwLjAsIDAuMF19LCAicXVlcnlfaGFzaCI6IDk2MzUwNTg1NH0%3D
Headers:
{
"Date":"Tue, 13 May 2025 09:30:40 GMT",
"Content-Type":"application/vnd.api+json",
"Content-Length":"220",
"Connection":"keep-alive",
"Allow":"POST, OPTIONS",
"CID":"LBBarU",
"Content-Language":"en-us",
"Content-Security-Policy":"base-uri 'none'; frame-ancestors 'self' login.bigcommerce.com *.mybigcommerce.com admin.shopify.com klaviyo.file.force.com klaviyo.lightning.force.com klaviyo.my.salesforce.com; script-src 'report-sample' 'strict-dynamic' 'unsafe-eval'; object-src 'none'; report-uri /csp/",
"RateLimit-Limit":"3, 3;w=1, 60;w=60",
"RateLimit-Remaining":"2",
"RateLimit-Reset":"0",
"Vary":"Accept, Accept-Language, Cookie",
"X-Klaviyo-API-Revision":"2025-04-15",
"X-Robots-Tag":"noindex, nofollow",
"cf-cache-status":"DYNAMIC",
"Strict-Transport-Security":"max-age=31536000; includeSubDomains; preload",
"X-Content-Type-Options":"nosniff",
"Server":"cloudflare",
"CF-RAY":"93f1236e2aee79e4-HYD"
}
Response Status Code: 500
Response JSON:
{'errors': <{'code': 'error', 'detail': 'internal', 'id': '56b80411-511d-4f5c-be06-7b1cbc3f592f', 'links': {}, 'meta': {'code': 13, 'status': 'INTERNAL'}, 'source': {'pointer': '/data'}, 'status': 500, 'title': 'A server error occurred.'}]}
Response text:
'{"errors":}{"id":"56b80411-511d-4f5c-be06-7b1cbc3f592f","status":500,"code":"error","title":"A server error occurred.","detail":"internal","source":{"pointer":"/data"},"links":{},"meta":{"status":"INTERNAL","code":13}}]}'