Participants/Auto-generate (Bulk Create Participants with System-generated Participant IDs)

Modified on Tue, 21 Jul at 9:04 AM

Use the Participants/Auto-generate endpoint to create multiple participants for a site when the study is configured to use System-generated Participant IDs. Unlike the Participants/Bulk endpoint, you do not need to provide Participant IDs or upload a comma-separated values (CSV) file — OpenClinica generates Participant IDs automatically, using the same algorithm the application uses when creating participants through the user interface (UI).


ℹ️ Note: If you already have a predefined list of Participant IDs to import, use the Participants/Bulk endpoint instead. Refer to Participants/Bulk (Add or Update Bulk List of Participants) for more information.

 

Functionality

  • Create a specified number of new participants in bulk for a given site without providing Participant IDs.
  • Returns the newly created Participant IDs in the response.




Prerequisite

This endpoint is available only for studies configured to use System-generated Participant IDs.

 

Access Control

  • User roles authorized to call this endpoint and perform the specified operations:
    • Data Managers
    • Clinical Research Coordinators
    • Investigators
  • Site level roles can perform this operation only on their site’s participants.
  • User roles NOT authorized to call this endpoint:
    • Monitors (study level and site level)
    • Viewers (study level and site level)

 

Before calling the API, you will need to be authenticated and you will need to get access based on your user roles permissions.

 

Study-level participants can’t be created in bulk via API. (Participants will need to be assigned to a site).


 

URL

 

POST

{customerName}/pages/auth/api/clinicaldata/studies/{studyOID}/sites/{siteOID}/participants/auto-generate 

where {customerName} is your customer URL. For example: https://customerxyz.openclinica.io/OpenClinica



 

Sample cURL Request

 

curl "{{SR_HOST}}/pages/auth/api/clinicaldata/studies/S_UBAIDSTU(PROD)/sites/S_43249(PROD)/participants/auto-generate?count=5" \
  -X POST \
  -H "Authorization: Bearer eyJh..." \
  -H "accept: */*"



 

Request Parameters

 

ParameterRequiredDescription
studyOIDYesThe study OID specified in the URL.
siteOIDYesThe site OID specified in the URL.
countYesThe number of participants to create. Specify an integer between 1 and 1,000.



Response

 

On success, the endpoint returns the Participant IDs generated for the newly created participants.


 

Error Codes:

  • errorCode.autoGenerateNotAllowedManualSetting: This API call is not allowed for studies using manually entered Participant IDs.
  • errorCode.participantCountInvalidLimit: The participant count specified by the ‘count’ parameter must be an integer between 1 and 1,000.
  • otherProcessInProgressAn auto-generate request is already in progress for this study. Please wait and retry
  • errorCode.studyNotExist: The study OID specified in the request is not found.
  • errorCode.invalidSiteIdentifier: The site OID specified in the request is not found.
  • errorCode.noRoleSetUp: The user has no role assigned for the given study/site.
  • errorCode.noSufficientPrivileges: The user does not have sufficient privileges to perform this operation.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article