younifyd
Menu

Create Batch Loyalty Cards

Create loyalty cards

POST/v1/loyalty_programs/{loyaltyProgramId}/cards/batch

Use it in a workflow

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

Request

Path parameters

loyaltyProgramIdinteger (int64)required

Identifier of the card-based loyalty program containing the loyalty card. 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.

numberOfCardsinteger (int64)required

Number of loyalty cards in the batch.

batchIdstring

ID of the loyalty card batch.

statusstring

Status of the loyalty cards in the batch.

One ofactiveinactiveDefault "active"

cardCodeSettingsobject
validCharactersarray<string>required

List of characters used to generate the random parts of a code.

couponPatternstringrequired

The pattern used to generate codes, such as coupon codes, referral codes, and loyalty cards. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set.

json
{
  "numberOfCards": 5000,
  "batchId": "hwernpjz",
  "status": "active",
  "cardCodeSettings": {
    "couponPattern": "SUMMER-####-####",
    "validCharacters": [
      "A",
      "B",
      "C",
      "D",
      "E",
      "F",
      "G",
      "H",
      "I",
      "J",
      "K",
      "L",
      "M",
      "N",
      "O",
      "P",
      "Q",
      "R",
      "S",
      "T",
      "U",
      "V",
      "W",
      "X",
      "Y",
      "Z",
      "0",
      "1",
      "2",
      "3",
      "4",
      "5",
      "6",
      "7",
      "8",
      "9"
    ]
  }
}

Response

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

numberOfCardsGeneratedinteger (int64)

Number of loyalty cards in the batch.

batchIdstring

ID of the loyalty card batch.

json
{
  "numberOfCardsGenerated": 5000,
  "batchId": "hwernpjz"
}

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