0

Is there any way to get the "default organization" contact id through the API?

4

The default organization contact id is stored in civicrm_domain table. You can use domain api to retrieve the contact id i.e

  $result = civicrm_api3('Domain', 'getvalue', array(
      'sequential' => 1,
      'return' => "contact_id",
      'id' => 1,
    ));

HTH

Pradeep

  • If you run multi-domain, you'll need to specify which domain you want instead of the 'id' => 1 above – Aidan Jun 6 '18 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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