younifyd
Menu

Get Loyalty Program Transactions

List loyalty program transactions

GET/v1/loyalty_programs/{loyaltyProgramId}/transactions

Use it in a workflow

  1. Add a step and choose the Talon.One connector.
  2. Pick the Get Loyalty Program Transactions action (under management).
  3. Fill in the fields below, then reference the result from later steps as {{getLoyaltyProgramTransactions.response.data}}.

Request

Path parameters

loyaltyProgramIdinteger (int64)required

Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.

Query parameters

loyaltyTransactionTypestring

Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file.

One ofmanualsessionimport

subledgerIdstring

The ID of the subledger by which we filter the data.

customerSessionIDsarray<string>

Filter the results by a list of customer session IDs. To include multiple IDs, repeat the parameter for each one, for example, `?customerSessionIDs=id1&customerSessionIDs=id2`. The response contains only data associated with the specified sessions.

transactionUUIDsarray<string>

Filter the results by a list of transaction UUIDs. To include multiple IDs, repeat the parameter for each one, for example, `?transactionUUIDs=uuid1&transactionUUIDs=uuid2`. The response contains only data associated with the specified transactions.

startDatestring (date-time)

Date and time from which results are returned. Results are filtered by transaction creation date. > [!note] **Note** > - This must be an RFC3339 timestamp string. > - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting > considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.

endDatestring (date-time)

Date and time by which results are returned. Results are filtered by transaction creation date. > [!note] **Note** > - This must be an RFC3339 timestamp string. > - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting > considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.

pageSizeinteger (int64)

The number of items in the response.

Default 50

skipinteger (int64)

The number of items to skip when paging through large result sets.

awaitsActivationboolean

If `true`: Filters results to include only point transactions that have action-based activation and have not expired. If `false`: Returns a `400` response.

Response

Returns 200 with an object. Read it in later steps with {{getLoyaltyProgramTransactions.response.data.<field>}}.

hasMoreboolean
dataarray<object>
idinteger (int64)required

ID of the loyalty ledger transaction.

transactionUUIDstringrequired

Unique identifier of the transaction in the UUID format.

programIdinteger (int64)required

ID of the loyalty program.

campaignIdinteger (int64)

ID of the campaign.

createdstring (date-time)required

Date and time the loyalty transaction occurred.

typestringrequired

Type of transaction. Possible values: - `addition`: Signifies added points. - `subtraction`: Signifies deducted points.

One ofadditionsubtraction

amountnumberrequired

Amount of loyalty points added or deducted in the transaction.

namestringrequired

Name or reason for the loyalty ledger transaction.

startDatestringrequired

When points become active. Possible values: - `immediate`: Points are immediately active. - `on_action`: Points become active based on the customer's action. - a timestamp value: Points become active at a given date and time.

expiryDatestringrequired

When points expire. Possible values: - `unlimited`: Points have no expiration date. - a timestamp value: Points expire at a given date and time.

customerProfileIdstring

Customer profile integration ID used in the loyalty program.

cardIdentifierstring

The identifier of the loyalty card, which must match the regular expression `^[A-Za-z0-9._%+@-]+$`.

subledgerIdstringrequired

ID of the subledger.

customerSessionIdstring

ID of the customer session where the transaction occurred.

importIdinteger (int64)

ID of the import where the transaction occurred.

userIdinteger (int64)

ID of the user who manually added or deducted points. Applies only to manual transactions.

userEmailstring

The email of the Campaign Manager account that manually added or deducted points. Applies only to manual transactions.

rulesetIdinteger (int64)

ID of the ruleset containing the rule that triggered the effect. Applies only for transactions that resulted from a customer session.

ruleNamestring

Name of the rule that triggered the effect. Applies only for transactions that resulted from a customer session.

flagsobject1 fields

A map of flags providing additional details about the entry.

validityDurationstring

The duration for which the points remain active, relative to the activation date. **Note**: This only applies to points for which `awaitsActivation` is `true` and `expiryDate` is not set.

json
{
  "hasMore": true,
  "data": [
    {
      "rulesetId": 11,
      "amount": 10.25,
      "campaignId": 324,
      "created": {},
      "flags": {
        "createsNegativeBalance": true
      },
      "customerSessionId": "05c2da0d-48fa-4aa1-b629-898f58f1584d",
      "type": "addition",
      "userId": 5,
      "cardIdentifier": "summer-loyalty-card-0543",
      "expiryDate": "2022-01-02T15:04:05Z07:00",
      "transactionUUID": "ce59f12a-f53b-4014-a745-636d93f2bd3f",
      "importId": 4,
      "customerProfileId": "kda0fajs0-fad9f-fd9dfsa9-fd9dasjf9",
      "subledgerId": "sub-123",
      "name": "Reward 50 points for each $500 purchase",
      "validityDuration": "30D",
      "ruleName": "10 points for every $100 spent",
      "userEmail": "john.doe@example.com",
      "id": 123,
      "programId": 324,
      "startDate": "2022-01-02T15:04:05Z07:00"
    }
  ]
}

Need more? See the Talon.One guide for connection setup and behaviour shared by every action.