CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • How to get pledge API to return results for multiple contacts
Pages: [1]

Author Topic: How to get pledge API to return results for multiple contacts  (Read 383 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
How to get pledge API to return results for multiple contacts
February 13, 2014, 04:42:18 pm
I am running CiviCRM version 4.3.8 and am attempting to use the "pledge" API to get pledges for more than one contact at a time ( in this situation pledges for contact id 1 and contact ID 1969). But my code below fails:

Code: [Select]
$params = array(
  'version' => 3,
  'sequential' => 1,
  'contact_id' => '1969,1',
);
$result = civicrm_api('Pledge', 'get', $params);

What should I be passing in the parameter list to get the pledges for both contacts? (In other cases, I may have 5 contact IDs, not just 2)
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • How to get pledge API to return results for multiple contacts

This forum was archived on 2017-11-26.