Fetching Rewards Data
Aggregation processes like fetching rewards data cannot be run simultaneously; rather, they must be run in a series.
When running multiple aggregation processes in succession, perform standard aggregation (accounts and transactions) first. This is because any aggregation process will prevent a new standard aggregation for the next three hours. If you run standard aggregation first it does not prevent additional aggregation process so it will have no effect on the fetching rewards information.
For more information on aggregation review details on background and foreground aggregation in our Platform API Reference.
If a member already has a process running and you attempt to run an aggregation-type process on it, you may get one of two status codes:
- If an event of the same type is already running, you'll get a
202 Acceptedstatus;- For example, you called fetch rewards when a rewards job is already running;
- You can tell that a process is already running because the member's
is_being_aggregatedfield will betrue.
- If an event of a different type is running, you'll get a
409 Conflictstatus;- For example, you called fetch rewards when a standard aggregation is already running.
You must have the rewards feature enabled by MX. If the feature is not enabled, a 403 Forbidden error will be returned.
If an institution does not support rewards, a 400 Bad Request error will be returned.