Personal Data Erasure

A package which deletes or exports commercetools personal data in JSON format from the commercetools platform.

List of personal data

Configuration

The constructor accepts two arguments:

  • A required object containing the following values:

    • apiConfig (Object): AuthMiddleware options for authentication on the commercetools platform. (Required. See here)

    • accessToken (String): [Access token] to be used to authenticate requests to API. Requires scope of [view_products, manage_products, view_orders, manage_orders, view_payments, manage_payments, view_shopping_lists, manage_shopping_lists, view_customers, manage_customers]. More info on how to get the access token here

  • An optional logger object having four functions (info, warn, error and debug)

Usage

npm install @commercetools/personal-data-erasure --global

CLI

Info on flags

  • The --deleteAll flag deletes all information related to the customer and can not be undone.

  • The --output flag specifies where to output/save the exported customer data. Several notes on this flag:

    • If the file specified already exists, it will be overwritten.

    • The default location for status report logging is the standard output.

    • If no output path is specified, the exported data will be logged to the standard output as a result, status reports will be logged to a personal-data-erasure.log file in the current directory.

JS

For more direct usage, it is possible to use this module directly:

Last updated