function synchronizeContacts($contacts, $permission = null, $syncMode = null, $useExternalId = false, $ignoreInvalidContacts = false, $reimportUnsubscribedContacts = true, $overridePermission = true, $updateOnly = false, $preferMaileonId = false)
    {
        $queryParameters = array(
            'permission' => ($permission == null) ? 1 : $permission->getCode(),
            'sync_mode' => ($syncMode == null) ? 2 : $syncMode->getCode(),
            'use_external_id' => ($useExternalId == TRUE) ? "true" : "false",
            'ignore_invalid_contacts' => ($ignoreInvalidContacts == TRUE) ? "true" : "false",
            'reimport_unsubscribed_contacts' => ($reimportUnsubscribedContacts == TRUE) ? "true" : "false",
            'override_permission' => ($overridePermission == TRUE) ? "true" : "false",
            'update_only' => ($updateOnly == TRUE) ? "true" : "false",
            'prefer_maileon_id' => ($preferMaileonId == TRUE) ? "true" : "false"
        );

        $cleanedContacts = new Contacts();
        foreach ($contacts as $contact) {
            $cleanedContact = new Contact($contact->id, $contact->email, null, $contact->external_id, null, $contact->standard_fields, $contact->custom_fields);
            $cleanedContacts->addContact($cleanedContact);
        }

        return $this->post("contacts", $cleanedContacts->toXMLString(), $queryParameters);
    }