Aggregations

postAggregations

POST
/aggregations

Create an Aggregation resource that uses the search to query for records on a given resource and applies the desired calculations (count, sum, min, and/or max) to the field in question.

Authorization

APIKEY<token>

In: header

Header Parameters

token?string

A single-use, limited authentication layer in addition to an API Key or Session Key to authorize sensitive operations. Auth Tokens add security by requiring one-time approval for specific actions.

request-token?string

A custom, one-time identifier for any API request (GET, PUT, POST, or DELETE). Blocks future requests with the same token for 48 hours, ensuring only the first request is processed. Valid values can contain 1-100 alphanumeric and special characters. See Request Tokens for more information.

Request Body

application/json

Create Aggregation Request

Create Aggregation Request

login*string

The identifier of the Login that owns this Aggregation.

entity?string

The identifier of the Entity that this Aggregation applies to.

forlogin?string

The identifier of the Login that this Aggregation applies to.

org?string

The identifier of the Org that this Aggregation applies to.

team?string

The identifier of the Team that this Aggregation applies to.

division?string

The identifier of the Division that this Aggregation applies to.

partition?string

The identifier of the Partition that this Aggregation applies to.

type?aggregationType

The type of aggregation. This will automatically set the search and total values.

  • entityEntryEventMerchant - A merchant entry.
  • merchantTxnApprovedAll - All merchant transactions approved.
  • merchantTxnCapturedAll - All merchant transactions captured.
  • merchantTxnFailedAll - All merchant transactions failed.

Value in

  • "entityEntryEventMerchant"
  • "merchantTxnApprovedAll"
  • "merchantTxnCapturedAll"
  • "merchantTxnFailedAll"
level?aggregationsLevel

The level of user that this aggregation will run for.

  • admin - Admin User.
  • division - Division-level User.
  • merchant - Merchant-level User.
  • partition - Partition-level User.

Value in

  • "admin"
  • "division"
  • "merchant"
  • "partition"
name?string

The name of this Aggregation. This field is stored as a text string and must be between 0 and 100 characters long.

description?string

A description of this Aggregation. This field is stored as a text string and must be between 0 and 100 characters long.

resource*resource
  • 1 - apiKeys

  • 2 - contacts

  • 3 - customers

  • 4 - alertTriggers

  • 5 - iplists

  • 6 - items

  • 7 - alerts

  • 8 - logins

  • 9 - merchants

  • 10 - orgs

  • 12 - permissions

  • 13 - decisions

  • 14 - parameters

  • 15 - sessions

  • 16 - alertActions

  • 17 - tokens

  • 18 - txns

  • 19 - teamLogins

  • 20 - credentials

  • 21 - members

  • 22 - accounts

  • 23 - plans

  • 24 - subscriptions

  • 25 - subscriptionTokens

  • 26 - disbursements

  • 27 - entries

  • 28 - fees

  • 29 - funds

  • 30 - orgEntities

  • 31 - payouts

  • 32 - feeRules

  • 33 - entityRefs

  • 34 - chargebacks

  • 35 - decisionRules

  • 36 - entities

  • 37 - facilitators

  • 38 - partitions

  • 39 - merchantResults

  • 40 - mccs

  • 41 - mappings

  • 42 - refunds

  • 43 - batches

  • 44 - txnResults

  • 45 - confirmCodes

  • 46 - accountVerifications

  • 47 - disbursementResults

  • 48 - reserveEntries

  • 49 - chargebackMessages

  • 50 - hosts

  • 53 - txnRefs

  • 54 - verifications

  • 55 - verificationResults

  • 56 - chargebackMessageResults

  • 57 - assessments

  • 58 - entryOrigins

  • 59 - adjustments

  • 60 - txnDatas

  • 61 - revenueBoosts

  • 62 - orgFlows

  • 63 - orgFlowActions

  • 64 - accountVerificationResults

  • 65 - disbursementRefs

  • 66 - reserves

  • 67 - entityReserves

  • 68 - txnReports

  • 69 - payoutFlows

  • 70 - vendors

  • 71 - fundOrigins

  • 72 - entityRoutes

  • 73 - pendingEntries

  • 74 - terminals

  • 75 - terminalRefs

  • 76 - holds

  • 77 - holdNotes

  • 78 - files

  • 79 - messageThreads

  • 80 - messages

  • 81 - bins

  • 82 - feeModifiers

  • 83 - versions

  • 84 - chargebackDocuments

  • 85 - divisions

  • 86 - entityReturns

  • 87 - chargebackStatuses

  • 88 - profitShares

  • 89 - profitShareResults

  • 90 - aggregations

  • 91 - aggregationResultGroups

  • 92 - aggregationResults

  • 93 - auditLogs

  • 94 - invoiceParameters

  • 95 - invoices

  • 96 - secrets

  • 97 - watchlists

  • 98 - watchlistItems

  • 99 - txnMetadatas

  • 100 - invoiceResults

  • 101 - invoiceItems

  • 102 - invoiceLineItems

  • 103 - profitShareRules

  • 104 - configurations

  • 105 - currencyRates

  • 106 - terminalTxns

  • 107 - terminalTxnDatas

  • 108 - terminalTxnRefs

  • 109 - terminalTxnResults

  • 110 - configurationStages

  • 111 - disbursementEntries

  • 112 - decisionActions

  • 113 - notes

  • 114 - noteDocuments

  • 115 - paymentUpdates

  • 117 - paymentUpdateGroups

  • 118 - authTokens

  • 119 - reportResults

  • 120 - reports

  • 121 - reportItems

  • 122 - entityDebts

  • 123 - billings

  • 124 - billingModifiers

  • 125 - statements

  • 126 - statementEntries

  • 127 - billingEvents

  • 128 - fundingParameters

  • 129 - requestTokens

  • 130 - accountRefs

  • 131 - settlements

  • 132 - entityDatas

  • 133 - terminalTxnMetadatas

  • 134 - batchRefs

  • 135 - verificationRefs

  • 136 - externalFees

  • 137 - saferPayments

  • 138 - mfaRecoveryCodes

  • 139 - debtorEntities

  • 140 - omniTokens

  • 141 - changeRequests

  • 142 - txnSession

  • 143 - revShareSchedules

  • 144 - revShareStatements

  • 145 - loginsHelpers

  • 146 - entityCustomFields

  • `147' - DisbursementEntriesLog

  • 148 - merchantPlatformStatuses

  • 149 - DisbursementEntitiesLog

  • 150 - orgsVASSaferPayments

  • 151 - orgsVASOmniTokens

  • 152 - orgsVASRevenueBoosts

  • 153 - tokenResults

  • 154 - PlaidConsumerAccounts

  • 155 - appleDomains

  • 156 - PlaidConsumerPayments

  • 157 - saferPaymentsCompliance

  • 158 - orgFlowRules

  • 159 - TaxFormRequests

  • 160 - HostThemes

  • 161 - IntegrationResults

  • 162 - VasEfeOffers

  • 163 - VasEfeOfferUpdates

  • 165 - EmbeddedFinance

  • 166 - OrgsVASEfeProducts

  • 167 - EntityTerms

  • 168 - PinlessDebitConversions

  • 169 - OrgsVASPinlessDebitConversions

  • 170 - FraudSightEnablements

  • 171 - FraudSightResults

  • 172 - OrgsVASFraudSightEnablements

Value in

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
search?string

The search query used to find records and apply the desired calculation. This field is stored as a text string and must be between 0 and 1000 characters long.

totals*string

The specification of the desired aggregation functions including count, sum, min and max. This field is stored as a text string and must be between 1 and 100 characters long.

degrouping?string

Degrouping is the reverse process of grouping, where progressively smaller groups are removed to provide aggregated results at higher levels. This is useful when you want to see overall totals without the detailed breakdowns. For example, degrouping can be used to sum up all transactions across all merchants and payment methods, providing a total approval count without needing to look at individual merchant or payment method details.

status?aggregationStatus

The current status of the aggregation process.

  • notReady - Aggregation is not ready.
  • ready - Aggregation is ready.
  • processing - Aggregation is processing.
  • processed - Aggregation has been processed.

Value in

  • "notReady"
  • "ready"
  • "processing"
  • "processed"
schedule*aggregationSchedule

The schedule that determines when the aggregation function will be processed.

  • hours - Hourly schedule.
  • days - Daily schedule.
  • weeks - Weekly schedule.
  • months - Monthly schedule.
  • years - Annual schedule.

Value in

  • "hours"
  • "days"
  • "weeks"
  • "months"
  • "years"
scheduleFactor?integer

A multiplier that you can use to adjust the schedule set in the 'schedule' field, such as daily, weekly, monthly, or annually. In This field is specified as an integer and its value determines how the interval is multiplied.

Default1
start*integer

The date on which the aggregation processing should start. The date is specified as a twelve digit string in YYYYMMDDHHII format, for example, '201601201528' for January 20, 2016 at 15:28 (3:28 pm). The value of this field must represent a date in the future, or the present date. When the schedule is set to HOURLY (1) the minute part of the time must be divisible by 10 (15:10, 15:20, 15:30, etc...).

default?aggregationDefault

Indicates whether this aggregation was automatically created.

  • 0 - Manually created.
  • 1 - Automatically created.

Value in

  • 0
  • 1
inactive?inactive

Whether this resource is marked as inactive.

  • 0 - Active
  • 1 - Inactive

Value in

  • 0
  • 1
frozen?frozen

Whether this resource is marked as frozen.

  • 0 - Not Frozen
  • 1 - Frozen

Value in

  • 0
  • 1

Response Body

application/json

application/json

curl -X POST "https://example.com/aggregations" \  -H "Content-Type: application/json" \  -d '{    "login": "t1_log_67b5002a5de3b716ad97e07",    "name": "Default merchantTxnFailedAll",    "description": "Automatically created aggregation",    "resource": 18,    "search": "status[equals]=2&created[like]={{\\"expand\\": [{\\"type\\": \\"date\\",\\"value\\": \\"-1 days\\",\\"format\\": \\"Y-m-d\\",\\"relativeTimestamp\\":\\":effective:\\"}]}}%",    "totals": "sum[0]=total&count[0]=id&groups[0]=merchant&groups[1]=type&groups[2][payment][0]=method",    "status": "ready",    "schedule": "days",    "scheduleFactor": 1,    "start": 202502200000,    "inactive": 0,    "frozen": 0,    "entity": "t1_ent_676057654c1b7452e4884f0",    "forlogin": "t1_log_67b5002a5de3b716ad97e07",    "org": "t1_org_67b736ad7d05922343246cf",    "team": "teamBoarding",    "division": "t1_div_67b51635da21f7399ce2af1",    "partition": "t1_ptn_666834d4d504f11234578f5",    "type": "merchantTxnFailedAll",    "level": "merchant",    "default": 1,    "degrouping": "groups[0]=merchant&groups[1][payment][0]=method"  }'
{  "response": {    "data": [      {        "id": "t1_agg_67b339d00940f0d12b000b7",        "created": "2025-02-17 08:30:00.5718",        "modified": "2025-02-17 08:30:00.5718",        "creator": "t1_log_6279a44f109090941bbc4c0",        "modifier": "t1_log_6279a44f109090941bbc4c0",        "login": "t1_log_67b339d2dc878984b96b225",        "name": "Default merchantTxnFailedAll",        "description": "Automatically created aggregation",        "resource": 18,        "search": "status[equals]=2",        "totals": "sum[0]=total&count[0]=id&groups[0]=merchant&groups[1]=type&groups[2][payment][0]=method",        "status": "ready",        "schedule": "days",        "scheduleFactor": 1,        "start": 202502180000,        "inactive": 0,        "frozen": 0,        "entity": "t1_ent_676057654c1b7452e4884f0",        "forlogin": "t1_log_67b339d2dc878984b96b225",        "org": "t1_org_67b736ad7d05922343246cf",        "team": "teamBoarding",        "division": "t1_div_67b51635da21f7399ce2af1",        "partition": "t1_ptn_666834d4d504f11234578f5",        "type": "merchantTxnFailedAll",        "level": "merchant",        "default": 1,        "degrouping": "groups[0]=merchant&groups[1][payment][0]=method"      }    ],    "details": {      "requestId": 1,      "totals": [],      "page": {        "current": 1,        "last": 1,        "hasMore": false      }    },    "errors": []  }}