Get details about a specific member's transactions
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Practical Example
In order to give you an example of how the Transactions API can be used, take a look at the case below.
To get a member's recent Points transactions, they would use the following request:
https://[[app:Instance URL]]/services/apexrest/FieloPLT/v1/[member_ID]/transactions?fields=Id,FieloPLT__Points__c,FieloPLT__Type__c&limit=50&offset=10&orderby=CreatedDate+DESC&fromdate=01/01/2023&todate=12/31/2023
The response would be formatted as follows:
{ "tran":
{ "Id": "xxxxxxxxxxxxx",
"FieloPLT__Points__c": "10",
"FieloPLT__Type__c": "Challenge Reward"
}
}
If your program includes other currencies, you'll want to add those currency fields to the field query param.
Example fields to use in fields query param
The following table describes some (but not all) fields you can pass in the field query parameter.
| Value | Description | Data type |
|---|---|---|
| name | Auto-assigned name of the redemption transaction. | String |
| FieloPLT__Points__c | Total of points of the transaction. | Integer |
| FieloPLT__Type__c | Type of transaction. | String |
In the example, we used the query parameter fields to retrieve more information, such as the name, the number of points and the type of the transaction. Feel free to add your own fields in this param.
Response definitions
The following table describes each item in the response.
| Response item | Description | Data type |
|---|---|---|
| Name | Auto-assigned name of the redemption transaction. | String |
| FieloPLT__Points__c | Total of points of the transaction. | Integer |
| FieloPLT__Type__c | Type of transaction. | String |
| Id | Unique identifier of the generated object. | String |
