Add Card Series

Lets you create a new card series for the org. With this API, you can do the following:

  • Create auto-generated physical/digital cards for a series.
  • Create physical/digital card series with auto card generation disabled.

Prerequisites

  • Authentication: Basic or OAuth authentication details
  • Access group resource - NA

Resource information

URI/v2/card/series/
HTTP methodPOST
PaginationNA
Rate limitNA
Batch supportNA

Sample API cURL

curl --location 'https://eu.api.capillarytech.com/v2/card/series/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YTYyZTZm' \
--header 'Cookie: _cfuvid=Y0f3VfLqD8GzrSkhY4oAJF2sdcs4f0RvoHYzuwlgCKM-1751618877635-0.0.1.1-604800000' \
--data '{
  "code":"TestCardSeries123",
  "name":"TestCardSeries123",
  "type":"DIGITAL",
  "expiryDays":1000,
  "maxActiveCardsPerCustomer":1,
  "cardGenerationConfiguration":{
    "prefix":"M2",
    "suffix":"C0",
    "offset":1,
    "length":10,
    "method": "RANDOM_MOD7"
  },
  "cardGenerationEnabled":true,
  "isActive":true,
  "trigger":"SERIES_ID"
}'

Request body parameters

Parameter (Parameters marked with * are mandatory)

Data Type

Description

code*

String

Unique identifier for the card series.

name

String

Display name for the card series.

type*

String

Type of card. Supported values: DIGITAL, PHYSICAL.

expiryDays

Integer

Number of days after issuance when the card expires.

maxActiveCardsPerCustomer

Integer

Maximum number of active cards allowed per customer.

cardGenerationConfiguration

Object

Configuration for generating card numbers.

-prefix

String

Starting characters of the card number. Maximum 50 characters are allowed Special characters are not allowed.

-suffix

String

Ending characters of the card number. Maximum 50 characters are allowed. Special characters are not allowed.

-offset

Integer

Starting index or position for card number generation.

-length

Integer

Total length of the card number including prefix and suffix.

Minimum 5 characters are required. Maximum 150 characters are allowed.

-method

Enum

Algorithm used for card number generation. Supported values: DEFAULT, LUHNALGO, MOD7_ALGO, RANDOM, RANDOM_LUHN, RANDOM_MOD7.
Default value: DEFAULT

cardGenerationEnabled

Boolean

If true, card generation is enabled for this series.

isActive

Boolean

If true, the card series is active.

trigger

Enum

Specifies the event that triggers card generation. Supported values: SERIES_ID, OU_ID, REGISTRATION.


Response parameters

ParameterData TypeDescription
entityLongUnique ID of the newly created card series.
warningsArrayList of warnings, if any, generated during processing. Empty if none.

Sample response

{
    "entity": 182,
    "warnings": []
}

Error codes

CodeDescription
3001Series code empty
3002Series already exists
3003Series type empty
3005Card length invalid
3006Card configuration already exists with the same prefix, suffix and cardlength
3007Card generation config not passed
3022Card prefix is not a standard string
3023Card suffix is not a standard string
3024Card number total length should not be more than 150
3026Card count exceeds 100000
3028Card length should not be less than
Language
URL
Click Try It! to start a request and see the response here!