Skip to main content

Get Member Aggregations

GET 

/client/users/:correlation_id/aggregations

This API is to retrieve aggregations for a particular member corresponding their periods, if it's enabled in AGGREGATION config.

Request

Query Parameters

AttributeDescriptionFormatNotes
periodscurrent period + x-1 past periods (years) to be included to show member's aggregationsNumberIf not passed then it will take default value of periods that is mentioned in AGGREGATION config under DisplaySettings.

Body

This request does not have a body.

Response

An object of arrays. In which, the first key would be their corresponding aggregation name.

AttributeDefinitionFormatNote
[key]Corresponding Aggregation NameArray containing objectse.g. SPEND_YEAR, SPEND_QUARTER, SPEND_MONTH, SPEND_LIFETIME, REWARDS_YEAR, REDEEM_YEAR, dependent on configuration; the following attributes are in separate objects for each specified period in the [key] array (only one value is shown for SPEND_LIFETIME)
periodStartDateCorresponding aggregation's start dateStringIn UTC time.
periodEndDateCorresponding aggregation's end dateStringIn UTC time.
valueCorresponding aggregation's valueNumberValue in points for specified period and key

Error Responses

See examples for possible error states.

statusCodeerrorMessageerrorCodeNotes
400 - Bad RequestPeriods is required to be positive numeric value.INVALID_REQUESTThe number of periods must be a positive number.
400 - Bad RequestExceeded the maximum number of periods allowed: 3.INVALID_REQUESTThe number of periods specified in the query parameters exceed the maximum allowable value.

Request

Responses

200 - Get Member Aggregations