---
updatedAt: 2025-11-12T22:14:54.000Z
agentTools:
  projectIndex: https://docs.nmp.arianee.com/llms.txt
---

# Create Digital Passport Batch using CSV

Introducing the Bulk Upload API, a powerful feature designed to streamline the creation of multiple digital product passports. By simply uploading a CSV file containing the necessary data, you can efficiently mint numerous digital passports in one go. 



The bulk upload process is straightforward and consists of three steps: 
1.  Prepare a CSV file in the required format. 
2. Upload the CSV file to trigger the creation of digital product passports. 
3. Regularly check the status of the lines in your uploaded file by fetching the file.
 

This feature significantly enhances efficiency and simplifies the creation of digital product passports.

> ⚠️
>
> * Before uploading the CSV file, it's essential to [create the digital passports group](https://docs.nmp.arianee.com/docs/create-digital-passports-group) to which your digital passports will be assigned. *Each digital passport costs 1 credit.* Recovery time is automatically 5 years. *Valid rows are successfully minted when processing a CSV even if some rows fail and produce errors.* When you upload your CSV, the NFT Management Platform will check digital passports information line by line. When an error is detected, it is added in the CSV. Fetch your CSV after uploading to see potential errors.

## 1. Prepare a CSV file

### File name

To retrieve your CSV following the file upload, the name must comply with our standards.

The naming must not include any special characters or spaces: `csvOriginalName` : \[a-zA-Z0-9].\*.csv\*

### CSV format

The provided CSV file must respect the following format:

| product\_group\_id | product\_id | tags             | content                                                           | smartLinks                           | mint | update |
| ------------------ | ----------- | ---------------- | ----------------------------------------------------------------- | :----------------------------------- | :--- | :----- |
| ProductGroupId1    | product1    | \[“tag1”,“tag2"] | \{}                                                               | \["<https://q.arianee.net/your_id>"] | true | true   |
| ProductGroupId1    | product2    | \[“tag1”,“tag2"] | \{"serialnumber":\[\{"type":"serialnumber","value":"322500001"}]} |                                      | true | false  |

<Callout icon="💡" theme="default">
  ### * Special characters are accepted for the product\_group\_id and product\_id.* If you don't want your digital passport to inherit the content of the digital passport group, add \{}.* Upper and lower case are accepted for booleans: true/TRUE and false/FALSE.
</Callout>

### Parameters

<Table>
  <thead>
    <tr>
      <th>
        Parameter
      </th>

      <th>
        Type
      </th>

      <th>
        Required
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `product_group_id`
      </td>

      <td>
        String
      </td>

      <td>
        ✅
      </td>

      <td>
        Digital passport group identifier of the group previously created.
      </td>
    </tr>

    <tr>
      <td>
        `product_id`
      </td>

      <td>
        String
      </td>

      <td>
        ✅
      </td>

      <td>
        Identifier of the digital passport.
      </td>
    </tr>

    <tr>
      <td>
        `tags`
      </td>

      <td>
        String
      </td>

      <td>
        ❌
      </td>

      <td>
        Tags associated with the digital passport.\
        To add several tags, separate them using a comma.
      </td>
    </tr>

    <tr>
      <td>
        `public_content`
      </td>

      <td>
        Boolean
      </td>

      <td>
        ❌
      </td>

      <td>
        Visibility on platforms like OpenSea. It is false by default.
      </td>
    </tr>

    <tr>
      <td>
        `content`
      </td>

      <td>
        Object
      </td>

      <td>
        ❌
      </td>

      <td>
        Content is optional. It is automatically inherited from the product group created above. It should be a valid JSON.\
        $schema is added automatically if not in content.\
        However, you may want to add or update an element for this particular digital passport (e.g. SKU).\
        ⚠️ This content will overwrite the data if it is defined in the product group.
      </td>
    </tr>

    <tr>
      <td>
        smartLinks
      </td>

      <td>
        Array
      </td>

      <td>
        ❌
      </td>

      <td>
        smartLinks is optional. It is an array of smart link urls.
      </td>
    </tr>

    <tr>
      <td>
        `mint`
      </td>

      <td>
        Boolean
      </td>

      <td>
        ❌
      </td>

      <td>
        Whether to create the digital passport directly on the blockchain.
      </td>
    </tr>

    <tr>
      <td>
        update
      </td>

      <td>
        Boolean
      </td>

      <td>
        ❌
      </td>

      <td>
        Whether to update the digital passport directly on the blockchain.
      </td>
    </tr>
  </tbody>
</Table>

## 2. Upload a CSV file

#### URL

> Required rights: `admin`, `certCreate`

To upload your CSV, use [`/productManagement/product/batch/upload`](https://docs.nmp.arianee.com/reference/createdigitalpassportbatchusingcsv). The Upload of the CSV file triggers the creation of digital product passports.

```Text URL
POST - https://{{nmpUrl}}/productManagement/product/batch/upload
```

#### Parameter

| Parameter | Type           | Required | Description |
| --------- | -------------- | -------- | ----------- |
| `file`    | multipart/form | ✅        | CSV file.   |

#### Return Payload

| Status Code | Success | Error Message |
| ----------- | ------- | ------------- |
| `200`       | `true`  | Success       |

```json 200 Payload Return
{
    "message": "File uploaded successfully."
}
```

#### Errors

| Status Code | Success | Code                                 | Error Message                                   |
| ----------- | ------- | ------------------------------------ | ----------------------------------------------- |
| `400`       | `false` | `npm.productManagement.formatErrror` | The CSV file is not formatted correctly.        |
| `400`       | `false` | `npm.productManagement.formatErrror` | The CSV file already exists.                    |
| `422`       | `false` | `npm.productManagement.formatErrror` | Only one CSV file must be uploaded per request. |
| `500`       | `false` | `npm.productManagement.UnknownError` | An unknown error has occurred.                  |

```json 400 Return Payload
{
    "message": "File with same name file.csv already exists.",
    "code": "npm.productManagement.formatErrror"
}
```

```json 400 Payload Return
{
    "code": "npm.productManagement.formatErrror",
    "message": "Missing required columns: product_id"
}
```

```json 422 Return Payload
{
    "message": "You should send only one file.",
    "code": "npm.productManagement.formatErrror"
}
```

```json 500 Payload Return
{
    "code": "npm.productManagement.UnknownError",
    "message": "An error occurred while parsing the form data."
}
```

## 3. Regularly check the status of the lines in your uploaded file by fetching the file.

#### URL

> Required rights: `admin`, `certRead`

To fetch a specific CSV file uploaded on your NFT Management Platform, use [`/productManagement/product/batch/:csvOriginalName`](https://docs.nmp.arianee.com/reference/productmanagementproductbatchcsvoriginalname-retrievecsvfile).

The fetch function returns status on each line in the CSV file. Please note that if there is an error on one of the lines in the CSV file, no line will be processed.

```Text URL
GET - https://{{nmpUrl}}/productManagement/product/batch/:csvOriginalName
```

#### Parameter

| Path Parameter    | Type   | Required | Description       |
| ----------------- | ------ | -------- | ----------------- |
| `csvOriginalName` | String | ✅        | Name of the file. |

#### Return Payload

| Status Code | Success | Description               |
| :---------- | :------ | :------------------------ |
| `200`       | `true`  | The CSV file is returned. |

<Table>
  <thead>
    <tr>
      <th>
        Field
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `token_id`
      </td>

      <td>
        Identification number of the digital passport on the network.
      </td>
    </tr>

    <tr>
      <td>
        `passphrase`
      </td>

      <td>
        Digital passport passphrase.
      </td>
    </tr>

    <tr>
      <td>
        `error`
      </td>

      <td>
        Boolean returning if an error occurred while minting the digital passport.\
        ⚠️ - When an error occurs, the explanation is returned and the status is not displayed.  

        * When there is no error, the field is empty. 
      </td>
    </tr>

    <tr>
      <td>
        `status`
      </td>

      <td>
        For each line in the CSV file, a minting status of the digital passport is returned:  

        * `draft`:  the draft of the Digital passport was created. It was not minted (mint flag = false in the input file)
        * `waiting`: The transaction is waiting in the queue to be minted.\
          -`pending`: The minting is in progress.
        * `minted`: The digital passport has been minted on the blockchain.\
          ⚠️ - The status is returned empty if an error occurred.
      </td>
    </tr>
  </tbody>
</Table>

```Text 200 Return Payload
group_id,product_id,content,tags,mint,public_content,error,status,tokenId,passphrase
groupTestBatch_CSV-1,productTestBatchCSV_2-20,"{""$schema"":""https://cert.arianee.org/version8/ArianeeProductCertificate-i18n.json"",""name"":""TestBatchCSV3"",""description"":""this is a description"",""sku"":""sku1""}","[""test1"",""test2""]",true,true,,minted,330502713,r2z235gzd7c7
groupTestBatch_CSV-1,productTestBatchCSV_2-21,"{""$schema"":""https://cert.arianee.org/version8/ArianeeProductCertificate-i18n.json"",""name"":""TestBatchCSV3"",""description"":""this is a description"",""sku"":""sku1""}","[""test1"",""testv2""]",true,true,,minted,885483253,su0v8uomwcnt
```

#### Errors

| Status Code | Success | Description                       |
| :---------- | :------ | :-------------------------------- |
| `404`       | `false` | The CSV file name does not exist. |

```json 404 Return Payload
{
    "message": "CSV file wrongCsvFileName not found."
}
```