Update high sensitive data using batch operation

I have a high sensitive property in deals named dm_ssn that I want to update using batch:

def send_to_hubspot(hubspot_deals):
client = hubspot.Client.create(access_token=HUBSPOT_API_TOKEN)

 inputs = []

 for hubspot_deal in hubspot_deals:

 input = {
 "idProperty": "dm_ccid",
 "id": hubspot_deal.pop('dm_ccid'),
 "properties": hubspot_deal
 }
 inputs.append(input)

 batch_input_simple_public_object_batch_input_upsert = 
 BatchInputSimplePublicObjectBatchInputUpsert(inputs=inputs)

 api_response = 
 client.crm.deals.batch_api.upsert(batch_input_simple_public_object_batch_input_upsert=batch_input_simple_public_object_batch_input_upsert)

 results = api_response.to_dict().get('results', [])

return results

However I get an error:

High sensitivity properties should be encrypted, with the `isEncrypted` field set, but the field was missing.

But the simple patch operatorion works:

properties = {
"dm_ssn": hubspot_deal['dm_ssn'],
}

simple_public_object_input = SimplePublicObjectInput(properties=properties)

try:
 api_response = client.crm.deals.basic_api.update(deal_id=result['id'], simple_public_object_input=simple_public_object_input)

except ApiException as e:
 print("Exception when calling basic_api->update: %s\n" % e)

Is that a limitation on batch update?

Am I missing something? How to pass the isEncrypted flag?

Hey, @marcelogr :waving_hand: Thanks for your post. I’m going to set up a quick test using my test portal and Postman. I’ll follow up here with any additional questions or requests. Thanks! — Jaycee