Generate Card External ID

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

This API lets you generate external IDs manually, which you can tag to a customer during registration. Each API call generates a unique external ID. The maximum allowed length is 50 characters.

When you register a customer without an external ID, the system calls this API in the background and automatically tags the generated external ID to the customer. The API does not override an existing external ID.

Important: When you import external IDs, the system validates each value against the organisation-level CONF_CARD_NUMBER_LENGTH configuration. If an imported external ID does not match the configured length, the system rejects the record during import. Rejected records are not processed for event handling or eligibility updates. Ensure that all imported external IDs meet the required length to avoid data loss and processing issues.

👍

For detailed information about our APIs and for hands-on testing, refer documentation in API overview and step-by-step guide on making your first API call in Make your first API call .

Example request

curl --location --request PUT 'https://eu.api.capillarytech.com/v2/card?format=json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic bWFkaU2YQ==' \
--header 'Cookie: _cfuvid=YyYQB5XUwCZmLtgRlu60lc4n5_3PDiTtwCCXj6_8V3g-1762771226384-0.0.1.1-604800000' \
--data '{
    "cardNumber": "Test09000000000105end",
    "cardExternalId": "CardExternal1"
}'

Prerequisites

Navigate to InTouch > Settings > Miscellaneous > Registration Configuration page to:

  • Enable CONF_CARD_NUMBER_GENERATION_ENABLED.
  • Enable CONF_CLIENT_V2_API_ENABLED.
  • Use only for account IDs configured on SOURCE_ACCOUNTS_EXTERNALID_ENABLED.
  • Set CONF_CARD_CHECKSUM_DIGIT_ALGO with one of the following values: LUHN_ALGO, MOD7_ALGO, AUTO_INC, RANDOM, RANDOM_LUHN, RANDOM_MOD7.
  • Set CONF_CARD_NUMBER_LENGTH.

Note: When importing external IDs, the system checks that each external ID matches the length set in CONF_CARD_NUMBER_LENGTH. If the length does not match, the system rejects the record. Rejected records are not processed for event handling or eligibility updates. Always verify that imported external IDs meet the configured length requirement.

For more information and other optional configurations, refer to External ID configuration.

📘

In response, entity is the generated external ID.

Body parameters

FieldTypeRequiredDescription
cardNumberstringYesCard number to update. The specified card must exist.
cardExternalIdstringYesExternal system reference/id to associate with the card.

Example response

{
    "cardId": 920897,
    "customerId": 566135941,
    "cardExternalId": "CardExternal1",
    "cardNumber": "Test09000000000105end",
    "orgId": 100737,
    "entityId": 75197372,
    "transactionNotAllowed": false,
    "activeAndDigital": false,
    "warnings": []
}
{
  "warnings": [],
  "errors": [
    {
      "status": false,
      "code": 500,
      "message": "All requests have failed due to errors"
    }
  ]
}

Response parameters

FieldTypeDescription
cardIdintegerInternal unique identifier of the card.
customerIdintegerIdentifier of the customer linked to the card.
cardExternalIdstringExternal system's/reference id for the card.
cardNumberstringHuman/merchant-facing card number.
orgIdintegerOrganisation/tenant identifier that owns the card.
entityIdintegerEntity/store/account context associated with the card.
transactionNotAllowedbooleanIndicates if transactions on the card are currently blocked.
activeAndDigitalbooleanTrue if the card is active and provisioned digitally.
warningsArray of stringsNon-fatal warnings related to the card or lookup.

Error codes

CodeDescription
500Internal server error.

Body Params
string
required
string
required
Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json