Skip to content

Can't update boolean attributes with import_contacts API #95

Description

@norbert-novi

I create a boolean attribute 'BOOLEAN_ATTRIBUTE' in brevo. I can update it with update_contact API but not with import_contacts API and jsonBody.

Example :
email = 'john@example.com'
update_contact = sib_api_v3_sdk.UpdateContact(attributes={'NOM': 'DoeUpdate', 'PRENOM': 'John','BOOLEAN_ATTRIBUTE':True})
api_instance.update_contact(email, update_contact)

-> In Brevo I have : NOM attribute is set to doeUpdate, BOOLEAN_ATTRIBUTE is set to True. Everything is as expected.

lstJsonContacts = [{"email":"john@example.com","attributes":{'NOM': 'DoeFromJson', 'PRENOM': 'John','BOOLEAN_ATTRIBUTE':False}},]
request_contact_import = sib_api_v3_sdk.RequestContactImport()
request_contact_import.json_body = lstJsonContacts
request_contact_import.list_ids = [2]
api_response = contact_api_instance.import_contacts(request_contact_import)

-> In Brevo I have : NOM attribute is set as expected to DoeFromJson, but BOOLEAN_ATTRIBUTE stays True and is not updated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions