GET/v1/analytics/costs

Cost 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.read

Query parameters

fromdate
todate
daysintegermin 1max 366
postflowIdstringmax length 40
postbatchIdstringmax length 40
intervalenum
dayweekmonth
modeenum
livetest
postflowIdsany
postbatchIdsany
channelenum
POSTFLOWPOSTBATCH
originenum
portalapiintegration
integrationIdsany
templateIdsany
templateVersionIdsany
productIdsany
categoriesany
destinationsany

Returns

7 fields of the 200 answer
rangeobjectrequired
3 fields
fromdaterequired
todaterequired
intervalenumrequired
dayweekmonth
filterobjectrequired
13 fields
postflowIdstring
postbatchIdstring
modeenum
livetest
postflowIdsarray of string
postbatchIdsarray of string
channelenum
POSTFLOWPOSTBATCH
originenum
portalapiintegration
integrationIdsarray of string
templateIdsarray of string
templateVersionIdsarray of string
productIdsarray of string
categoriesarray of string
destinationsarray of string
currencystringrequired
seriesarray of objectsrequired
3 fields
bucketdaterequired
spendCentsintegerrequired
cardsintegerrequired
totalsobjectrequired
5 fields
spendCentsintegerrequired
refundsCentsintegerrequired
refundedCardsintegerrequired
cardsintegerrequired
averageCentsinteger or nullrequired
byProductarray of objectsrequired
4 fields
productIdstringrequired
namestringrequired
spendCentsintegerrequired
cardsintegerrequired
bySourcearray of objectsrequired
5 fields
channelstringrequired
idstring or nullrequired
namestring or nullrequired
spendCentsintegerrequired
cardsintegerrequired

Responses

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)