ASP.NET VETtrak API web services
ContentsIndexHome
PreviousUpNext
VT_API.AddAward Method

Create an award for an enrolment.

C#
[WebMethod(Description = "Creates a new award for a client's enrolment")]
public TAuthAddAwardResult AddAward(string token, int enrolmentId, string awardTypeName, string parchmentNumber, DateTime? recordedDate, DateTime? dateCompleted, DateTime? expiryDate, bool? issued, string licenceNumber, string description, string referenceLink, DateTime? issuedDate, bool? completionStatement);
Parameters 
Description 
string token 
String containing an authentication token. 
int enrolmentId 
Integer ID of enrolment to create the award for. Mandatory. 
string awardTypeName 
Name of the award type to create. Refer to GetAwardTypes for a list. Mandatory. Maximum length 100 characters. 
string parchmentNumber 
Parchment number for the award, maximum length 25 characters. Leave empty to auto-generate one. 
DateTime? recordedDate 
Date the award was recorded. If null, defaults to today's date. 
DateTime? dateCompleted 
Date the learning was completed, no more than 10 years ago. Mandatory for a reportable award. Must be on or before the recordedDate. 
DateTime? expiryDate 
Date the award expires. If null, attempts to calculate it. 
bool? issued 
Whether the award has been issued to the client. True for yes, or false for no. If null, defaults to false (no). 
string licenceNumber 
Optional licence number to record on the award, maximum length 20 characters. 
string description 
Optional description to record on the award. 
string referenceLink 
Optional document reference on the award, maximum length 255 characters. 
DateTime? issuedDate 
Optional date the award was issued to the client. If null, and "issued" is true, either today's date or the date completed will be used, whichever is later. Cannot be before the dateCompleted. 
bool? completionStatement 
Whether the award is for a full completion. Only applicable if recording a statement award type. If recording an "other"-type award, or an award with no qualification, this is ignored and will be false. If recording a certificate award, this is ignored and will be true. If false, the award cannot be reported. If null (when adding a statement award), defaults to false. 

TAuthAddAwardResult containing the result of the creation and, if successful, the ParchmentNumber and ExpiryDate of the new award.

Specify the ID of the enrolment to create the award for, and the name of the type of award to create. 

The enrolmentId must be the ID of a normal client enrolment (contract or non-contract), client occurrence enrolment, or employee occurrence enrolment. 

The awardTypeName must be the name of an active award type (call GetAwardTypes for a list). If the specified award type requires a qualification, an error will occur if the specified enrolment does not have a qualification/course assigned. 

The dateCompleted is mandatory when recording a certificate or statement-type award for a reportable enrolment. 

All other fields are optional:

  • If a parchmentNumber is not specified or is empty, a new parchment number will be generated automatically.
  • If recordedDate is null, it will default to today's date.
  • If expiryDate is null, it will calculate an expiry date from the recordedDate plus the configured "Expiry months" for the qualification of the enrolment (if any) and the state of the enrolment's location. If the enrolment has no qualification or the "Expiry months" is 0, the expiry date will not be set. An error will occur if the award type is set to require an expiry date, no expiry date was specified, and an expiry date could not be calculated.
  • If issued is null, it defaults to false (not issued).
  • If issuedDate is null, and issued is true, it defaults to either today's date or the date completed, whichever is later.
  • If completionStatement is null, it defaults based on the rules outlined in the parameter's description.
 

The organisation, location, qualification/course and reportability option on the new award will be copied from the enrolment. If the enrolment does not have a qualification, or the type of the specified award type is "Other", or the award is not for a full completion, the new award will not be reportable. The new award will be linked to the enrolment, and all the enrolment's units. 

If recording a reportable certificate or statement award for a reportable enrolment that has a qualification, the client must not already have a reportable award for the same qualification in the same year. 

A token is passed for authentication. If the authentication fails, or other errors occur, the award is not created. The result of the authentication is represented by a TAuthenticate object. 

This function has security level "Protected", and can only be accessed by users that have explicitly been granted permission to the API.

Copyright (c) VETtrak 2022. All rights reserved.