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 method | POST |
| Pagination | NA |
| Rate limit | NA |
| Batch support | NA |
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: |
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: |
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: |
Response parameters
| Parameter | Data Type | Description |
|---|---|---|
| entity | Long | Unique ID of the newly created card series. |
| warnings | Array | List of warnings, if any, generated during processing. Empty if none. |
Sample response
{
"entity": 182,
"warnings": []
}Error codes
| Code | Description |
|---|---|
| 3001 | Series code empty |
| 3002 | Series already exists |
| 3003 | Series type empty |
| 3005 | Card length invalid |
| 3006 | Card configuration already exists with the same prefix, suffix and cardlength |
| 3007 | Card generation config not passed |
| 3022 | Card prefix is not a standard string |
| 3023 | Card suffix is not a standard string |
| 3024 | Card number total length should not be more than 150 |
| 3026 | Card count exceeds 100000 |
| 3028 | Card length should not be less than |
