function getBlocks(
        $fromDate = null,
        $toDate = null,
        $contactIds = null,
        $contactEmails = null,
        $contactExternalIds = null,
        $reasons = null,
        $oldStatus = null,
        $newStatus = null,
        $excludeAnonymousBlocks = false,
        $standardFields = null,
        $customFields = null,
        $pageIndex = 1,
        $pageSize = 100)
    {

        $params = $this->createQueryParameters($pageIndex, $pageSize, $fromDate, $toDate, $contactIds, $contactEmails, $contactExternalIds, null, null, null);

        $params = $this->appendArrayFields($params, "standard_field", $standardFields);
        $params = $this->appendArrayFields($params, "custom_field", $customFields);
        if (isset($embedEmailClientInfos)) $params['embed_email_client_infos'] = ($embedEmailClientInfos == true) ? "true" : "false";
        if (isset($excludeAnonymousBlocks)) $params['exclude_anonymous_blocks'] = ($excludeAnonymousBlocks == true) ? "true" : "false";

        $params = $this->appendArrayFields($params, "reasons", $reasons);
        if (isset($oldStatus)) $params['old_status'] = $oldStatus;
        if (isset($newStatus)) $params['new_status'] = $newStatus;

        return $this->get('reports/blocks', $params);
    }