CreateEnrolment

Creates a program enrolment

This method creates a program enrolment.

You can include up to 1000 contact IDs per request.

An enrolment ID (GUID) is returned for the enrolment, and this can be used to retrieve details of the enrolment in other operations.

The possible status types are:

  • 'Processing' - The enrolment is currently processing and has yet to finish
  • 'Finished' - The enrolment has finished processing
  • 'NotAvailableInThisVersion' - This feature is not available in the version of the API you're using

SOAP action: http://apiconnector.com/v2/ApiService/CreateEnrolment

📘

Input and output parameters

The input and output parameters for this method are:

Input parameters

  • ProgramEnrolment
    • Program ID - required; integer
    • Contacts - array of integer
      • integer
    • AddressBooks - array of integer
      • integer

Output parameters

  • CreateEnrolmentResult
    • EnrolmentID - GUID
    • Program ID - integer
    • Status - string ('Processing', 'Finished')
    • DateCreated - dateTime
    • Contacts - array of integer
      • integer
    • AddressBooks - array of integer
      • integer

Example

using (var client = new ApiServiceClient())
{
	client.ClientCredentials.UserName.UserName = "username";
	client.ClientCredentials.UserName.Password = "password";

	var programId = 1;
	var programEnrolment = new ApiProgramEnrolment
	                {
	                    AddressBooks = new [] { 1, 2, 3 },
	                    Contacts = new [] { 1, 2, 3 },
	                    ProgramId = programId
	                };
	
	var createdProgramEnrolment = client.CreateEnrolment(programEnrolment);
}