Answers.Body: <p>I think you have a typo. Please try <code>$api-&gt;Participant-&gt;Create($params))</code> and let us know the result.</p>
  
  <p>You can see an example here: <a href="https://github.com/civicrm/civicrm-core/blob/master/api/v3/examples/Participant/Create.php" rel="nofollow">https://github.com/civicrm/civicrm-core/blob/master/api/v3/examples/Participant/Create.php</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-27T07:31:13.230Z
Answers.Text: Yup I found that too 2 days ago. But anyway thanks @Nicholai
Answers.UserDisplayName: Parth Vora
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-24T15:19:06.970Z
Answers.LastActivityDate: 2015-07-24T15:19:06.970Z
Answers.UserDisplayName: Nicholai
Body: <p>There are 2 different sites in Drupal. In one of them there is CiviCRM is installed. Now I want to create event participate from first site which will use CiviCRM of second site. I have successfully get the list of events from second site to first site using:</p>
  
  <pre><code>$api = new civicrm_api3 (array ('server' =&gt; 'http://localhost/civicrm', 'api_key'=&gt;'xxx', 'key'=&gt;'xxx'));
  
  if ($api-&gt;Event-&gt;Get()) {
      print_r($api);
  } else {
      echo $api-&gt;errorMsg();
  }
  </code></pre>
  
  <p>Now I want to create event participate using OOP API in CiviCRM. So I have create code something like that:</p>
  
  <pre><code>$params = array(
          'contact_id'    =&gt; 1,
          'event_id'      =&gt; 2,
          'status_id'     =&gt; 1,
          'role_id'       =&gt; 1,
          'register_date' =&gt; '2007-07-21',
          'source'        =&gt; 'Online Event Registration: API Testing',
          'event_level'   =&gt; 'Tenor'
  );
  
  if ($api-&gt;Participate-&gt;Create($params)) {
      print_r($api);
  } else {
      echo $api-&gt;errorMsg();
  }
  </code></pre>
  
  <p>But in response I'm getting:
  <strong>API (Participate, create) does not exist (join the API team and implement it!)</strong></p>
  
  <p>So is it still in development? any other way to do that?</p>
  
Tags: <drupal><civicrm-entity>
Title: Create event participate using OOP API in CiviCRM
ThreadText: # Create event participate using OOP API in CiviCRM
  
  (Asked by: username_0 on 2015-07-24)
  
  There are 2 different sites in Drupal. In one of them there is CiviCRM is installed. Now I want to create event participate from first site which will use CiviCRM of second site. I have successfully get the list of events from second site to first site using:
  
  ```
  $api = new civicrm_api3 (array ('server' => 'http://localhost/civicrm', 'api_key'=>'xxx', 'key'=>'xxx'));
  
  if ($api->Event->Get()) {
      print_r($api);
  } else {
      echo $api->errorMsg();
  }
  
  ```
  
  Now I want to create event participate using OOP API in CiviCRM. So I have create code something like that:
  
  ```
  $params = array(
          'contact_id'    => 1,
          'event_id'      => 2,
          'status_id'     => 1,
          'role_id'       => 1,
          'register_date' => '2007-07-21',
          'source'        => 'Online Event Registration: API Testing',
          'event_level'   => 'Tenor'
  );
  
  if ($api->Participate->Create($params)) {
      print_r($api);
  } else {
      echo $api->errorMsg();
  }
  
  ```
  
  But in response I'm getting:
  **API (Participate, create) does not exist (join the API team and implement it!)**
  
  So is it still in development? any other way to do that?
  
  **Tags:** drupal, civicrm-entity
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-07-24. Score: 2 | Accepted answer
  
  I think you have a typo. Please try `$api->Participant->Create($params))` and let us know the result.
  
  You can see an example here: <https://github.com/civicrm/civicrm-core/blob/master/api/v3/examples/Participant/Create.php>
  
  > **Comments:**
  > **username_0**: Yup I found that too 2 days ago. But anyway thanks @username_1  
  
  ---
  
  