# Bulk card issuance

You can place a request for issuing a bulk of non-personalized physical cards. For this you need to provide the card product, the number of cards to be created in the bulk request and the shipping address to deliver the bulk cards. \
The bulk can be delivered to a centralized location (e.g. a branch or a retail outlet). Amount can optionally be provided when creating the bulk card request which will serve as the preloaded amount for the non-personalized cards. \
A walk-in customer can be enrolled as a user and a non-personalized card taken from the bulk can be assigned to the newly registered user.

### Create bulk card request

You can order non-personalized physical cards in bulk by sending **POST** request to **/bulkissuances** endpoint as given below.

<details>

<summary><a href="https://nymcard.com/docs/api#tag/Card-Bulk-Issuances/operation/createBulkIssuance">POST /bulkissuances</a></summary>

**`{`**\
`    `**`"card_product_id": "f4947edd-0dc1-4d60-af5a-f0dcb01d141c",`**\
`    `**`"number_of_cards":  50,`**\
`    `**`"amount": 100,`**\
`    `**`"currency": "USD",`**\
`    `**`"name_on_card": "Gift Card",`**\
`    `**`"dry_run": false`**

**`}`**

</details>

{% hint style="info" %}
Please note that the create bulk card request API supports maximum 5000 cards creation per call. It is advisable to create ≤ 5000 cards in one call.
{% endhint %}

### Retrieve bulk card requests

nCore offers two bulk card request retrieval options.

* **Retrieve existing bulk card requests**

You can retrieve all existing bulk card requests by sending a **GET** request to **/bulkissuances** endpoint shown below.

> [**GET /bulkissuances**](https://nymcard.com/docs/api#tag/Card-Bulk-Issuances/operation/listBulkIssuances)

* **Retrieve a specific bulk card request**

You can retrieve a specific bulk card request by sending a **GET** request to **/bulkissuances/{id}** endpoint, where id is the bulk id.

> [**GET /bulkissuances/{id}**](https://nymcard.com/docs/api#tag/Card-Bulk-Issuances/operation/getBulkIssuance)

### Update a bulk issuance request

You can update an existing bulk issuance request by sending a **PUT** request to **/bulkissuances/{id}** endpoint as shown below. In the below sample let's suppose you want to update the status of an existing request from “draft” to “submitted”.

<details>

<summary><a href="https://nymcard.com/docs/api#tag/Card-Bulk-Issuances/operation/updateBulkIssuance">PUT /bulkissuances/{id}</a></summary>

**`{`**

&#x20;   **`"currency": "USD",`**\
`    `**`"status": "SUBMITTED"`**

**`}`**

</details>

### Link a bulk card to a user

A non-personalized card created using bulk issuance needs to be linked to a user before it can be used to perform transactions. nCore supports secure card linking and activation to link a bulk card with a user. You can link a bulk card to an existing user or a newly created user. Please refer to section **Users** for further info on how to create and manage users.

To link a bulk card to a user, send a **POST** request to **/cards:link** endpoint as shown below. The API endpoint requires an activation\_token which can be created by performing a SHA-512 hash on the card information.

<details>

<summary><a href="https://nymcard.com/docs/api#tag/Cards/operation/linkCard">POST /cards:link</a></summary>

**`{`**

&#x20;   **`“activation_token”: “4E8AACE317CBF21390FA7F9DB3F772E724DB1A50609F5592F3007E3AD54A463F9BD0B45A8EC1BC204C32655E8AE`**\
\&#xNAN;**`1B3964B67C2DAADFA0DA95B49C1CE83F86946”,`**\
`    `**`“user_id”: “8009ace0-c16e-4d03-8a89-36010cf30b87”`**

**`}`**

</details>

{% hint style="info" %}
You can re-link bulk-issued cards and pre-linked accounts from a business user to an individual user by using this [API](https://portal.stg.platform.ae-1.nymcard.com/default/documentation/02_api_specs#tag/Users/operation/relinkCardAccount). It allows individual users to gain ownership of their cards and perform transactions independently.
{% endhint %}

**Steps to calculate activation token**

1\. To calculate an activation token for a particular card, you need card information as given below.

* Card PAN (Primary Account Number)
* Card Expiry Date (YYMM)
* CVV2

&#x20;     Example:

* Card PAN: 4122432442321234
* Card Expiry Date: 2112
* CVV2: 453

Concatenate the card information in the following sequence:

String format: \<Card PAN>\<Card Expiry Date>\<CVV2>

String result: 41224324423212342112453

2\. Apply SHA-512 hash algorithm to the above string. SHA-512 is a hashing algorithm that performs a hashing function on the data given to it. Hashing algorithms are used in many things such as internet security, digital certificates, and etc.

Result in hash format: 4E8AACE317CBF21390FA7F9DB3F772E724DB1A50609F5592F3007E3AD54A463F9BD0B45A8EC1BC204C32655E8AE\
1B3964B67C2DAADFA0DA95B49C1CE83F86946

{% hint style="warning" %}
Please ensure that the SHA-512 hash result passed to the API in activation\_token has the hexadecimal letters (A-F) in uppercase.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nymcard.com/get-started/issuing-physical-cards/bulk-card-issuance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
