younifyd
Menu

Get Loyalty Program Profile Transactions

List customer's loyalty transactions

GET/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactions

Use it in a workflow

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

Request

Path parameters

loyaltyProgramIdinteger (int64)required

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

integrationIdstringrequired

The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.

Query parameters

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.

subledgerIdstring

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

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

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 {{getLoyaltyProgramProfileTransactions.response.data.<field>}}.

hasMoreboolean
dataarray<object>
transactionUUIDstringrequired

Unique identifier of the transaction in the UUID format.

createdstring (date-time)required

Date and time the loyalty transaction occurred.

programIdinteger (int64)required

ID of the loyalty program.

customerSessionIdstring

ID of the customer session where the transaction occurred.

typestringrequired

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

One ofadditionsubtraction

namestringrequired

Name or reason of 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

Date when points expire. Possible values are: - `unlimited`: Points have no expiration date. - `timestamp value`: Points expire on the given date.

subledgerIdstringrequired

ID of the subledger.

amountnumberrequired

Amount of loyalty points added or deducted in the transaction.

idinteger (int64)required

ID of the loyalty ledger transaction.

rulesetIdinteger (int64)

The ID of the ruleset containing the rule that triggered this effect.

ruleNamestring

The name of the rule that triggered this effect.

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,
      "created": {},
      "flags": {
        "createsNegativeBalance": true
      },
      "customerSessionId": "05c2da0d-48fa-4aa1-b629-898f58f1584d",
      "type": "addition",
      "expiryDate": "2022-08-02T15:04:05Z07:00",
      "transactionUUID": "ce59f12a-f53b-4014-a745-636d93f2bd3f",
      "subledgerId": "sub-123",
      "name": "Reward 10% points of a purchase's current total",
      "validityDuration": "30D",
      "ruleName": "Add 2 points",
      "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.