1

Api call below returns 1078 contributions

$contributions = civicrm_api4('Contribution', 'get', [
  'select' => [
'row_count',
    ],
 'where' => [
['contribution_recur_id', 'IS NOT NULL'], 
['is_test', '=', FALSE],
['contribution_recur_id.start_date', '>=', '2016-01-01'],
   ],
  'checkPermissions' => FALSE,
  ]);

...while Find Contributions search below

Is a Template Contribution = '0' ...AND...
Recurring Contribution Start Date - greater than or equal to "January 1st, 2016 12:00 am" ...AND...
Contribution Status In Completed ...AND...
All recurring contributions regardless of payments

returns only 629 records.

Why?

1 Answer 1

3

Can you also add same filters in api4 as Find Contribution

  1. is_template = 0
  2. contribution_status_id = Completed
1
  • right, contribution status is the key, thanks!
    – yurg
    Aug 30, 2022 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.