> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/classic-tokenization/use-cases/synchronize-tokens-using-batch-files.md).

# Synchronize tokens using batch files

Thales **TIG** lets the **Issuer** synchronize tokens that were not created through the TIG platform. This is useful when e-commerce Tokenization was enabled before the Issuer connected to TIG.

This service does not require new APIs in the issuer backend. It uses synchronization campaigns with the **TSP** to recover existing token data. Only Mastercard and Visa are supported.

To trigger a campaign, the Issuer uploads an input batch file (with card details to synchronize) to the Tokenization Service over a dedicated SFTP connection.

After processing completes, TIG generates an output results file in JSON format.

The Issuer can then download the results. TIG generates one output file per input file.

This is depicted, at a high level, in the picture below:

<figure><img src="/files/u45AJoOzcsE8J4ekdCKc" alt=""><figcaption><p>High-level token synchronization flow using batch files.</p></figcaption></figure>

{% hint style="info" %}
For help creating and managing an SFTP account with Thales, contact your **Thales delivery team**.
{% endhint %}

### Batch file naming convention <a href="#batch-file-naming-convention" id="batch-file-naming-convention"></a>

Use this format for input batch file names:

`"BatchId"-"SeqNumber"-"UNIX_UTC_Timestamp".json`

Use this format for output batch file names:

`"BatchId"-"SeqNumber"-"UNIX_UTC_Timestamp"_OUT.json`

Where:

| NAME                 | DESCRIPTION                                                                            |
| -------------------- | -------------------------------------------------------------------------------------- |
| BatchId              | The unique identifier of the batch file.                                               |
| SeqNumber            | This is used when the batch contains a lot of records and is split into several files. |
| UNIX\_UTC\_Timestamp | A UNIX Epoch timestamp in seconds.                                                     |

Example:

* BatchId = 87889898
* SeqNumber = 001
* Input file: 87889898-001-1563188489.json
* Output file: 87889898-001-1563188615\_OUT.json

### Supported operations <a href="#operations-supported" id="operations-supported"></a>

There is only one operation type supported by the batch file:

* VIRTUAL\_CARD\_REGISTRATION

#### Virtual card registration <a href="#virtual-card-registration" id="virtual-card-registration"></a>

This operation queries the TSP for each card in the batch file. It then recovers the data TIG needs to manage those tokens.

You cannot manage tokens created outside TIG through TIG until you synchronize them.

#### Token data included <a href="#token-data-included" id="token-data-included"></a>

The token data registered in TIG depends on what the TSP provides. In most cases, TIG synchronizes:

* Token ID
* Token requestor ID (TRID)
* PAN reference ID
* Token PAN suffix
* Token status
* Token type
* Token provisioning time (if available)
* Token last status change time (if available)
* Token requestor name (if available)
* Device ID (if available)
* Device name (if available)

{% hint style="info" %}
Token synchronization does **not** mean TIG acts as a token vault.

The token vault role remains with the payment network TSP.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.payments.thalescloud.io/classic-tokenization/use-cases/synchronize-tokens-using-batch-files.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.
