post
https://{host}/v2/card
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Example request
curl --location 'https://eu.api.capillarytech.com/v2/card' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <BASE64_CREDENTIALS>' \
--header 'Cookie: <COOKIE>' \
--data '{
"seriesId": 224,
"cardNumber": "ghost0000800001180930",
"cardExternalId": "CardExternal6993",
"statusLabel": "NOT_ISSUED",
"statusInfo": {
"reason": "Card is generated but not issued"
}
}'Prerequisites
| Requirement | Details |
|---|---|
| Authentication details | Authorization header with Basic Auth (Base64-encoded username:password) |
| Access permission | WRITE access to the Card resource. See Access Group configuration. |
Resource information
| Pagination support | No |
| Batch support | No |
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
| seriesId | Number | Yes | Unique identifier of the card series to which the card number will be added. Must correspond to an existing series in the system. |
| cardNumber | String | Yes | Unique card number to be added to the series. Must not already exist in the system. |
| statusLabel | String | Yes | Status of the card at the time of creation. Must be a valid label configured for the Supported values: Default value: |
| cardExternalId | String | No | External identifier for the card. Must be unique if provided. |
| statusInfo | Object | No | Additional metadata associated with the card status. |
| statusInfo.reason | String | No | Description of the reason for the current card status. Example: "Card is generated but not issued". |
| seriesCode | String | No | Unique code of the card series. Can be used as an alternative to seriesId if seriesId is not provided. |
| customerId | Number | No | Unique identifier of the customer to associate with the card at the time of creation. |
| extendedFields | Object | No | Key-value pairs representing extended field values for the card. Keys must match the configured extended fields for the organization. |
| customFields | Object | No | Key-value pairs representing custom field values for the card. |
| mappedEntity | Object | No | Mapping details to associate the card with an entity such as a store, location, or till. |
Example response
{
"entity": 966091,
"warnings": []
}Response parameters
| Field | Type | Description |
|---|---|---|
| entity | Number | The unique ID of the newly created card. |
| warnings | Array | List of warning objects generated during the request. Empty array if no warnings. |
Error codes
| Code | Type | Description |
|---|---|---|
| 400 | Error | Invalid request. Check that all required fields (seriesId, cardNumber, statusLabel) are present and valid. |
| 401 | Error | Unauthorised. Invalid or missing Authorization header. |
| 403 | Error | Forbidden. The authenticated user does not have WRITE access to the Card resource. |
| 404 | Error | Resource not found. The specified seriesId or seriesCode does not exist. |
| 409 | Error | Conflict. The provided cardNumber or cardExternalId already exists in the system. |
