SymetryML Documentation
Encoders

Overwrite encoder key values

Overwrite (not accumulate — contrast with [Bulk-create encoder key values](/docs/api-reference/encoders/encoders-encodername-createkeyvalues-post)) the raw value/count/sum rows an Encoder holds for one categorical key (the key itself is the `key` path parameter below, not a DataFrame column). Each row: - **`Value`**: one of the key's observed values. - **`Count`**/**`Sum`**: replace whatever the encoder already holds for that value — this endpoint *overwrites*, it does not accumulate (see [Bulk-create encoder key values](/docs/api-reference/encoders/encoders-encodername-createkeyvalues-post) for an additive bulk insert).

POST
/{user}/encoders/{encodername}/keyvals/{key}/setValues

Overwrite (not accumulate — contrast with Bulk-create encoder key values) the raw value/count/sum rows an Encoder holds for one categorical key (the key itself is the key path parameter below, not a DataFrame column). Each row:

  • Value: one of the key's observed values.
  • Count/Sum: replace whatever the encoder already holds for that value — this endpoint overwrites, it does not accumulate (see Bulk-create encoder key values for an additive bulk insert).

Authorization

SymetryMLAuth
AuthorizationBearer <token>

HMAC-SHA256 signature-based authentication: requests are signed with your secret key and sent with the Customer-ID, Sym-date, Authorization, Content-MD5 and sym-version headers. See SymetryML REST API Security for the signature algorithm and a complete example.

In: header

Path Parameters

user*string

User/Customer identifier

encodername*string
key*string

The categorical attribute (key) name, not one of its values.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/c1/encoders/superenc0/keyvals/device_country/setValues" \  -H "Content-Type: application/json" \  -d '{    "attributeNames": [      "Value",      "Type",      "Count",      "Sum"    ],    "data": [      [        "ca",        "s",        "123",        "45"      ],      [        "us",        "s",        "456",        "7"      ]    ]  }'
{  "statusCode": 200,  "statusString": "OK",  "values": {}}
{  "statusCode": 400,  "statusString": "Cannot Find Encoder[nosuchenc] for Customer[c1].",  "values": {}}