Class RegistrationsController
- Namespace
- InSite.Api.Controllers
- Assembly
- InSite.UI.dll
public class RegistrationsController : ApiBaseController, IHttpController, IDisposable
- Inheritance
-
RegistrationsController
- Implements
- Inherited Members
Constructors
RegistrationsController()
public RegistrationsController()
Methods
Count(AttendanceCriteria)
Count registrations
[Route("api/registrations/count")]
[HttpPost]
public HttpResponseMessage Count(AttendanceCriteria criteria)
Parameters
criteriaAttendanceCriteria
Returns
Remarks
Count the number of event registration attendance records that match your search criteria.
Please note the date and time parameter assumes the ISO 8601 standard format. For example, "2002-09-01T23:10:50+00:00" means "Sep 1, 2002 at 11:10:50 PM UTC"
DeleteRegistration(Guid)
Delete a registration
[Route("api/registrations/{registration}")]
[HttpDelete]
public HttpResponseMessage DeleteRegistration(Guid registration)
Parameters
registrationGuid
Returns
Remarks
The registration identifier must be provided as part of the request URL.
GetRegistration(Guid)
Retrieve a registration
[Route("api/registrations/{registration}")]
[HttpGet]
public HttpResponseMessage GetRegistration(Guid registration)
Parameters
registrationGuid
Returns
PostRegistration(Guid, AddRegistrationLax)
Create a registration
[Route("api/registrations/{registration}/commands/register-lax")]
[HttpPost]
public HttpResponseMessage PostRegistration(Guid registration, AddRegistrationLax add)
Parameters
registrationGuidaddAddRegistrationLax
Returns
Remarks
Add a new registration based on a lookup of the event using its venue and start date/time rather than its identifier, and based on a lookup of the assessment form based on its code rather than its identifier.
This method for adding a new registration is lax (as opposed to strict) in that it does not specify a unique identifier for the event or the assessment. Instead, it allows the caller to assume a matching event may or may not exist.If no matching event is found then a new event is created automatically. Similarly, it allows the caller to assume at least one published, non-bilingual assessment form exists with a matching assessment form code. If no matching assessment is found, then it returns 400 Bad Request with an error message to indicate the failed match.
The registration ID is provided as part of the request URL.
The following parameters must be provided in the request body:
- EventVenue: The venue ID.
- EventStart: The date when the event starts.
- EventExamType: The exam type, it is required if the exam does not exist and a new one should be created.
- EventExamFormat: The exam format, it is required if the exam does not exist and a new one should be created
- EventBillingCode: the exam billing code, it is required if the exam does not exist and a new one should be created.
- Learner: ID of the learner that will be registered.
- Assessment: Assessment form code identifying the assessment to be assigned to the registration
- Accommodations: (Optional) An array of accommodations for the new registration
The date and time parameter uses ISO 8601 standard to specify format. For example "2002-09-01T23:10:50+00:00" means "Sep 1, 2002 at 11:10:50 PM UTC"
Potential Error Messages:
Here are some of the errors that can be returned by this method when there is a problem with your request:
- Accommodation type cannot be empty.
- Learner not found.
- Assessment form not found.
- Registration already exists. You cannot add a new registration with the same identifier.**
- EventExamType not specified.
- Invalid EventExamType value.
- EventBillingCode not specified.
- Invalid EventBillingCode value.
- EventExamFormat not specified.
- Invalid EventExamFormat value.
- Invalid EventStartTime value.
- Venue not found.
PostRegistration(Guid, CancelRegistration)
Cancel a registration
[Route("api/registrations/{registration}/commands/cancel")]
[HttpPost]
public HttpResponseMessage PostRegistration(Guid registration, CancelRegistration cancel)
Parameters
registrationGuidcancelCancelRegistration
Returns
Remarks
The registration ID is provided as part of the request URL. The following parameters must be provided in the request body:
Reason - Short description of the reason for the cancellation.
Potential Error Messages:
Here are some of the errors that can be returned by this method when there is a problem with your request:
- Registration not found.
PostRegistration(Guid, ChangeAssessment)
Assign an assessment to a registration
[Route("api/registrations/{registration}/commands/change-assessment")]
[HttpPost]
public HttpResponseMessage PostRegistration(Guid registration, ChangeAssessment change)
Parameters
registrationGuidchangeChangeAssessment
Returns
Remarks
Change the assessment form assigned to an existing event registration. If the registration does not exist, then return a 404 Not Found error. Allow the caller to assume at least one published, non-bilingual match for the assessment form code in the request.If no matching assessment is found, then return 400 Bad Request with an error message to indicate the failed match. The registration ID is provided as part of the request URL. The following parameters must be provided in the request body:
Assessment - Form code identifying the assessment to be assigned to the registration.
Potential Error Messages:
Here are some of the errors that can be returned by this method when there is a problem with your request:
- Registration not found.
- Assessment form not found.
- Assessment already assigned to registration.
PostRegistration(Guid, GrantRegistrationAccommodation)
Add an accommodation to a registration
[Route("api/registrations/{registration}/commands/grant-accommodation")]
[HttpPost]
public HttpResponseMessage PostRegistration(Guid registration, GrantRegistrationAccommodation grant)
Parameters
registrationGuidgrantGrantRegistrationAccommodation
Returns
Remarks
Grant an accommodation to an existing event registration. If the registration does not exist, then return a 404 Not Found error. The registration ID is provided as part of the request URL. The following parameters must be provided in the request body:
Type - Uniquly identifies the type of accommodation
Name - (optional) Short clarifying description
TimeExtension - (optional) Time extension in minutes
Potential Error Messages:
Here are some of the errors that can be returned by this method when there is a problem with your request:
- Registration not found.
PostRegistration(Guid, RevokeRegistrationAccommodation)
Remove an accommodation from a registration
[Route("api/registrations/{registration}/commands/revoke-accommodation")]
[HttpPost]
public HttpResponseMessage PostRegistration(Guid registration, RevokeRegistrationAccommodation revoke)
Parameters
registrationGuidrevokeRevokeRegistrationAccommodation
Returns
Remarks
Revoke an existing accommodation from an existing event registration. If the registration does not exist, then return a 404 Not Found error. The registration ID is provided as part of the request URL. The request body MUST include the Type parameter, which identifies the type of accommodation.
Potential Error Messages:
Here are some of the errors that can be returned by this method when there is a problem with your request:
- Registration not found.
PostRegistration(Guid, TransferRegistrationLax)
Transfer a registration
[Route("api/registrations/{registration}/commands/transfer-lax")]
[HttpPost]
public HttpResponseMessage PostRegistration(Guid registration, TransferRegistrationLax transfer)
Parameters
registrationGuidtransferTransferRegistrationLax
Returns
Remarks
Transfer an existing registration from one event to another event based on a lookup of the event using its venue and start date/time rather than its identifier. This method for transferring a registration is lax(as opposed to strict) in that it does not specify a unique identifier for the event. Instead, it allows the caller to assume a matching event may or may not exist.If no match is found then a new event is created automatically. Note the assessment form can NOT be modified in a transfer. The registration ID is provided as part of the request URL.The following parameters must be provided in the request body:
EventVenue. The venue ID.
EventStart. The date when the event starts.
EventExamType.The exam type, it is required if the exam does not exist and a new one should be created.
Learner.ID of the learner that will be registered.
Reason.The reason for the transfer.
The date and time parameter uses ISO 8601 standard to specify format. For example "2002-09-01T23:10:50+00:00" means "Sep 1, 2002 at 11:10:50 PM UTC"Potential Error Messages:
Here are some of the errors that can be returned by this method when there is a problem with your request:
- Registration not found.
- Registration has no assessment form.
- Learner does not belong to registration.
- Registration already assigned to event.
- Learner not found.
Search(AttendanceCriteria)
Search registrations
[Route("api/registrations/search")]
[HttpPost]
public HttpResponseMessage Search(AttendanceCriteria criteria)
Parameters
criteriaAttendanceCriteria
Returns
Remarks
Find registration attendance information that matches your search criteria.