Encoding

Batch Encode

Encode multiple data items in a single request. All items share one continuationId for efficient batch processing.

Request body: A JSON array of encode items (not an object with an items property).

SDK Usage:

const result = await client.encodeBatch({
  items: [
    { data: 'Alice Smith, alice@email.com', sourceContainer: 'users' },
    { data: 'Bob Jones, 555-123-4567', sourceContainer: 'users' }
  ]
});
post/api/scanner/encode/batch

Request body

datastring required

Input text containing potential PII

sourceContainerstring
sourceElementstring
scoreThresholdnumber double
languagestring

Example request

[
  {
    "metadata": {
      "rowId": "1001",
      "source": "crm_system"
    }
  }
]

Response

Batch encoded successfully

successboolean
continuationIdstring

Shared continuation ID for all batch items

Example response

{
  "results": [
    {
      "transformations": [
        {
          "components": [
            {
              "original": "John",
              "twin": "Maria",
              "type": "FIRST_NAME"
            }
          ]
        }
      ]
    }
  ]
}

Changes