GET
/v1/analytics/costsCost statistics
Charges minus refunds of cards (without VAT) per bucket, the average per card, per product and per Postflow or Postbatch. Needs billing.read. The same filters as the production statistics.
Scope
billing.readQuery parameters
fromdatetodatedaysintegermin 1max 366postflowIdstringmax length 40postbatchIdstringmax length 40intervalenumdayweekmonthmodeenumlivetestpostflowIdsanypostbatchIdsanychannelenumPOSTFLOWPOSTBATCHoriginenumportalapiintegrationintegrationIdsanytemplateIdsanytemplateVersionIdsanyproductIdsanycategoriesanydestinationsanyReturns
7 fields of the 200 answer
rangeobjectrequired3 fields
fromdaterequiredtodaterequiredintervalenumrequireddayweekmonthfilterobjectrequired13 fields
postflowIdstringpostbatchIdstringmodeenumlivetestpostflowIdsarray of stringpostbatchIdsarray of stringchannelenumPOSTFLOWPOSTBATCHoriginenumportalapiintegrationintegrationIdsarray of stringtemplateIdsarray of stringtemplateVersionIdsarray of stringproductIdsarray of stringcategoriesarray of stringdestinationsarray of stringcurrencystringrequiredseriesarray of objectsrequired3 fields
bucketdaterequiredspendCentsintegerrequiredcardsintegerrequiredtotalsobjectrequired5 fields
spendCentsintegerrequiredrefundsCentsintegerrequiredrefundedCardsintegerrequiredcardsintegerrequiredaverageCentsinteger or nullrequiredbyProductarray of objectsrequired4 fields
productIdstringrequirednamestringrequiredspendCentsintegerrequiredcardsintegerrequiredbySourcearray of objectsrequired5 fields
channelstringrequiredidstring or nullrequirednamestring or nullrequiredspendCentsintegerrequiredcardsintegerrequiredResponses
200Success
401Authentication required or API key invalid
403Permission or scope missing, organisation suspended
422Validation failed
429Rate limited for this API key and class; wait Retry-After seconds
otherError (RFC 9457 problem details)