User identifiers deletion

This document import allows you to mark user identifiers for deletion. Each line in the document represents a different object to remove from the platform.

This is only supported for datamarts using a user point system version of v201901 or later.

It only deletes the user identifier but not the associated user point.

How-to

  1. Use the bulk import endpoints to create a document import with theUSER_IDENTIFIERS_DELETIONdocument type and APPLICATION_X_NDJSON mime type. Only ndjson data is supported for user activities.

  2. Create an execution with your commands formatted in ndjson. Each command can either be a user account deletion, a user email deletion or a user agent deletion.

Example

# Create the document import
curl -X POST \
  https://api.mediarithmics.com/v1/datamarts/<DATAMART_ID>/document_imports \
  -H 'Authorization: <YOUR_API_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{
	"document_type": "USER_IDENTIFIERS_DELETION",
	"mime_type": "APPLICATION_X_NDJSON",
	"encoding": "utf-8",
	"name": "<YOUR_DOCUMENT_IMPORT_NAME>"
}'
# Create the execution
curl -X POST \
  https://api.mediarithmics.com/v1/datamarts/1162/document_imports/<DOCUMENT_IMPORT_ID>/executions \
  -H 'Authorization: <API_TOKEN>' \
  -H 'Content-Type: application/x-ndjson' \
  -d '
    {
      "type": "USER_ACCOUNT",
      "compartment_id": "1000",
      "user_account_id": "8541254132"
    }
    {
      "type": "USER_EMAIL",
      "hash": "982f50d88d437d13bdbd541edfv4fe5176cc8d862f8cbe7ca4f0dc8ea"
    }
    { "type": "USER_AGENT", "user_agent_id": "vec:89998434" }
  '

You can, of course, remove different identifier types at the same time. Please note that the uploaded data is in ndjson and not json. That means the different deletions are not separated by commas, but by a line separator \n

User Account deletion command

field

type

description

type

String

USER_ACCOUNT

user_account_id

String

The User Account Id.

compartment_id

Number (Optional)

The Compartment Id associated with the User Account Id.

Example:

{
  "type": "USER_ACCOUNT",
  "compartment_id": "1000",
  "user_account_id": "8541254132"
}

User Email deletion command

field

type

description

type

String

USER_EMAIL

hash

String

Hash of the Email address.

Example:

{
  "type": "USER_EMAIL",
  "hash": "982f50d88d437d13bdbd541edfv4fe5176cc8d862f8cbe7ca4f0dc8ea"
}

User Agent deletion command

field

type

description

type

String

USER_AGENT

user_agent_id

String

User device point ids ("udp:123456") are not supported by this document import job and will cause the job to be rejected.

Use the Device points deletionjob type if you want to delete device points along with all their associated technical ids.

Example:

{ "type": "USER_AGENT", "user_agent_id": "vec:89998434" }

Last updated