Understand Bulk Exporting And Importing

To perform an export or an import, the REST APIs consist of two endpoints that create or read a data file.

The exportProcess exports data, while the importProcess imports data. These endpoints allow you to generate or read data files in two modes:

Archived mode

When you initiate an export or import in archived mode, you work with a single archive file that can contain more than one data file, allowing you to manipulate several data files at a time. This is the default mode for performing exports and imports.

The data file in archived mode is in ZIP format and must include the content.json file, which contains information about the other files in the data ZIP file. The following is an example of a content.json file:
[
  {
    "fileName": "Profiles.json",
    "format": "json",
    "id": "Profiles"
  },
  {
    "fileName": "Accounts.json",
    "format": "json",
    "id": "Accounts"
  }
]
Each JSON in the JSON array corresponds to the data file with the following parameters:
  • fileName - The name of the data file.
  • id - The operation ID.

Note that each data file inside the ZIP must be less than 100MB. The ZIP file will be rejected if any data file size, after extraction, is greater than 100MB.

For example, the following export request is in archived mode. It generates two different files that are combined into a single archive file:

POST /ccadmin/v1/exportProcess
        {
          "fileName": "profile.zip",
          "items": [
            {
              "id": "Profiles",
              "format": "json"
            },
            {
              "id": "Accounts",
              "format": "json"
            }
          ]
        }

As displayed in the above example, the request contains the fileName parameter, which represents the name of the archive file. It also contains the items, id and format parameters.

Standalone mode

When you initiate an export or import in standalone mode, you work with a single data file. To transfer data in the standalone mode, use the mode parameter to identify the process mode type as standalone.

The following is an export request in standalone mode, which creates a single file:

POST /ccadmin/v1/exportProcess
{
  "fileName" : "product.json",
  "mode" : "standalone",
  "id" : "Products",
  "format" : "json"
}

As displayed in the above example, the request contains the fileName parameter, which represents the name of the data file, as well as the id and format parameter.

Status Files

When you receive either export or import results, the payload provides you with links that you can use to download the export and/or status files. For example, when exporting, the export fileLink URL provides information on how many accounts were in the exported file. The metaLink URL identifies successful and unsuccessful counts. If there are any failures during export or import, they will be displayed in the metaLink file.

Note: Uploaded import files, as well as generated export files, are stored for a period of time before they are automatically removed from the system.