younifyd
Menu

Activate Loyalty Points

Activate loyalty points

POST/v1/loyalty_programs/{loyaltyProgramId}/activate_points

Use it in a workflow

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

Request

Path parameters

loyaltyProgramIdinteger (int64)required

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

Request body

Enter the body as JSON in the step's Body field.

transactionUUIDsarray<string (uuid)>

An array of transaction UUIDs used to activate specific pending point transactions. If provided, do not include the `sessionId` parameter.

sessionIdstring

The ID of the session containing the pending point transactions to activate. If provided, do not include the `transactionUUIDs` parameter.

json
{
  "transactionUUIDs": [
    "8f1a8d7c-9c3e-4a5e-9f0d-2c5f7a3b1cde"
  ],
  "sessionId": "ac08cc3c43470426591ad75b2d685ec04_v2"
}

Response

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

ledgerEntriesarray<object>

Updated ledger entries after activation.

createdstring (date-time)required
programIDinteger (int64)required
customerProfileIDstring
cardIDinteger (int64)
customerSessionIDstring
eventIDinteger (int64)
typestringrequired

The type of the ledger transaction. Possible values are: - `addition` - `subtraction` - `expire` - `expiring` (for expiring points ledgers)

amountnumberrequired
startDatestring (date-time)
expiryDatestring (date-time)
namestringrequired

A name referencing the condition or effect that added this entry, or the specific name provided in an API call.

subLedgerIDstringrequired

This specifies if we are adding loyalty points to the main ledger or a subledger.

userIDinteger (int64)

This is the ID of the user who created this entry, if the addition or subtraction was done manually.

archivedboolean

Indicates if the entry belongs to the archived 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
{
  "ledgerEntries": [
    {
      "eventID": 5,
      "amount": 100,
      "created": {},
      "flags": {
        "createsNegativeBalance": true
      },
      "subLedgerID": "mysubledger",
      "customerSessionID": "t2gy5s-47274",
      "type": "addition",
      "userID": 499,
      "expiryDate": {},
      "archived": false,
      "customerProfileID": "URNGV8294NV",
      "cardID": 241,
      "name": "Add points on purchase",
      "validityDuration": "30D",
      "programID": 5,
      "startDate": {}
    }
  ]
}

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