1

I am trying to find a way to bulk update participants' status via the REST api. I could only think of using the API chaining method. I tried to do a for loop to update individually but I got random number of successful updates.

Would like to know if there is a better way to do it ? I am calling from an android app using Retrofit2.

thanks, j.

1 Answer 1

1

The right place to experiment with possibilities of the API is API Explorer that you can find at Support -> Developer - API Explorer in your local CivCRM instance or on the Demo site.

All the participants of an event can be selected with:

http://dmaster.demo.civicrm.org/sites/all/modules/civicrm/extern/rest.php?entity=Participant&action=get&api_key=userkey&key=sitekey&json={"sequential":1,"event_id":3}

The update of status can be accomplished with the create action in combination with an already existing participant_id. For example:

http://dmaster.demo.civicrm.org/sites/all/modules/civicrm/extern/rest.php?entity=Participant&action=create&api_key=userkey&key=sitekey&json={"sequential":1,"id":3,"status_id":"Cancelled"}

moves the status to Cancelled.

Success with your app.

1
  • thanks for your reply. I managed continue using the Chain API calls to make it happened. It works great. Commented Jan 3, 2017 at 12:47

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.