- 7 Minutes to read
- Print
- DarkLight
API: updateCredential
- 7 Minutes to read
- Print
- DarkLight
- Starting June 1, 2022, SmarterU will require all API calls to POST to HTTPS. Any POST to HTTP will result in the SU:01 error (i.e., No POST data detected.).
- If you are viewing the help in a language other than English, please change your language to English before copying and pasting any code. All API attributes and functions are in English.
- Tags are required unless specified.
Description
The updateCredential method edits an action.
Who Has Access
The following users have access to the updateCredential method:
- Users with the Manage Learning Plans, Certifications, and Requirements account permission.
- Administrators and owners.
API Call XML Package
<SmarterU>
<AccountAPI><![CDATA[]]></AccountAPI>
<UserAPI><![CDATA[]]></UserAPI>
<Method>updateCredential</Method>
<Parameters>
<Credential>
<Identifier>
<Name></Name>
- OR -
<ID></ID>
</Identifier>
<Name></Name>
<Status></Status>
<Description></Description>
<AllowsAttachments></AllowsAttachments>
<Expires></Expires>
<DaysGood></DaysGood>
<ExpirationDate></ExpirationDate>
<RecallDays></RecallDays>
<VisibleToLearners></VisibleToLearners>
<AddedPrerequisites>
<LearningModules></LearningModules>
<Credentials></Credentials>
</AddedPrerequisites>
<RemovedPrerequisites>
<LearningModules></LearningModules>
<Credentials></Credentials>
</RemovedPrerequisites>
<RequiresConfirmation></RequiresConfirmation>
<ConfirmationAttachments></ConfirmationAttachments>
<ConfirmationNotification></ConfirmationNotification>
<Permissions>
<Types>
<Type></Type>
</Types>
</Permissions>
<Tags2>
<Tag2>
<TagID><![CDATA[]]></TagID>
- OR -
<TagName><![CDATA[]]></TagName>
<TagValues><![CDATA[]]></TagValues>
</Tag2>
</Tags2>
<TrainingCost>
<Trainer>
<TrainerID></TrainerID>
- OR -
<TrainerEmail><![CDATA[]]></TrainerEmail>
- OR -
<TrainerEmployeeID><![CDATA[]]></TrainerEmployeeID>
</Trainer>
<LearnerHours></LearnerHours>
<TrainerHours></TrainerHours>
<ExtraCostAmount></ExtraCostAmount>
<ExtraCostDescription><![CDATA[]]></ExtraCostDescription>
</TrainingCost>
</Credential>
</Parameters>
</SmarterU>
Credential Tag Group
The Credential tag group is a container for the action's details.
<Credential>
<Identifier>
<Name></Name>
- OR -
<ID></ID>
</Identifier>
<Name></Name>
<Status></Status>
<Description></Description>
<AllowsAttachments></AllowsAttachments>
<Expires></Expires>
<DaysGood></DaysGood>
<ExpirationDate></ExpirationDate>
<RecallDays></RecallDays>
<VisibleToLearners></VisibleToLearners>
<AddedPrerequisites>
<LearningModules></LearningModules>
<Credentials></Credentials>
</AddedPrerequisites>
<RemovedPrerequisites>
<LearningModules></LearningModules>
<Credentials></Credentials>
</RemovedPrerequisites>
<RequiresConfirmation></RequiresConfirmation>
<ConfirmationAttachments></ConfirmationAttachments>
<ConfirmationNotification></ConfirmationNotification>
<Permissions>
<Types>
<Type></Type>
</Types>
</Permissions>
<Tags2>
<Tag2>
<TagID><![CDATA[]]></TagID>
- OR -
<TagName><![CDATA[]]></TagName>
<TagValues><![CDATA[]]></TagValues>
</Tag2>
</Tags2>
<TrainingCost>
<Trainer>
<TrainerID></TrainerID>
- OR -
<TrainerEmail><![CDATA[]]></TrainerEmail>
- OR -
<TrainerEmployeeID><![CDATA[]]></TrainerEmployeeID>
</Trainer>
<LearnerHours></LearnerHours>
<TrainerHours></TrainerHours>
<ExtraCostAmount></ExtraCostAmount>
<ExtraCostDescription><![CDATA[]]></ExtraCostDescription>
</TrainingCost>
</Credential>
The Credential tag may contain the following.
Identifier
The identifier of the action you want to update. This tag contains the following.
Tag | Description |
---|---|
The action's name. This tag is mutually exclusive with the ID tag. | |
The action's system-generated identifier. This tag is mutually exclusive with the Name tag. This is the CredentialID returned by the getCredential method. |
Name (optional)
The action's name.
Status (optional)
The action's status. Acceptable values are Active and Inactive.
Description (optional)
The description of the action.
AllowsAttachments (optional)
This is tag only required when the VisibleToLearners tag is set to 1.
Indicates whether learners must upload an attachment with the action in order for it to be accepted. Acceptable values are:
- Yes - Learners may upload a file with the action.
- No - Learner do not have to upload a file in order for the action to be confirmed.
- Required - Learners must upload a file with the action in order for the action to be confirmed.
Expires (optional)
Indicates whether the action expires. Acceptable values are:
- 0 - The action doesn't expire.
- 1 - The action expires.
DaysGood (optional)
This tag is only used when the Expires tag is set to 1 and you want the action to expire after the specified number of days. The number of days the action is valid.
ExpirationDate (optional)
This tag is only used when the Expires tag is set to 1 and you want the action to expire on a specific date. The date the action will expire in D-MMM format.
RecallDays (optional)
This tag is only used when the Expires tag is set to 1. The number of days prior to the action's expiration when the status will change to Warning.
VisibleToLearners (optional)
Indicates whether the action is visible to learners. Acceptable values are:
- 0 - The action isn't visible to learners.
- 1 - The action is visible to learners.
AddedPrerequisites (optional)
A container for the prerequisites that you want to add to the action. The tag may contain the following:
Tag | Description |
---|---|
LearningModules | The prerequisite course's system-generated identifier. To specify multiple courses, separate each with a comma. |
Credentials | The prerequisite action's system-generated identifier. To specify multiple actions, separate each with a comma. |
RemovedPrerequisites (optional)
A container for the prerequisites that you want to remove from the action. The tag may contain the following:
Tag | Description |
---|---|
LearningModules | The prerequisite course's system-generated identifier. To specify multiple courses, separate each with a comma. |
Credentials | The prerequisite action's system-generated identifier. To specify multiple actions, separate each with a comma. |
RequiresConfirmation (optional)
Indicates whether a user other than the learner must confirm the action before its status can be set to Accepted. Acceptable values are:
- 0 - The action doesn't require confirmation.
- 1 - The action requires confirmation.
ConfirmationAttachments (optional)
This tag is only used when the RequiresConfirmation tag is set to 1.
Indicates whether the user confirming the action must upload an attachment with the action in order for it to be confirmed. Acceptable values are:
- Yes - The user confirming the action may upload a file with the action.
- No - The user confirming the action does not have to upload a file in order for the action to be confirmed.
- Required - The user confirming the action must upload a file with the action in order for the action to be confirmed.
ConfirmationNotification (optional)
This tag is only used when the RequiresConfirmation tag is set to 1.
Indicates whether the Action Confirmation Notification email will be sent to the selected users. Acceptable values are:
- 0 - The email isn't sent.
- 1 - The email is sent.
Permissions
The Permissions tag is a container for the user types who are able to confirm the action. Each user type is contained in a Types tag and may contain the following.
Tag | Description |
---|---|
Type | The type of user who is able to confirm the action. Acceptable values are:
|
Tags2 (optional)
A container for the action's tags. Refer to Tags2 Tag Group.
TrainingCost (optional)
A container for the action's training cost. Refer to TrainingCost Tag Group.
Tags2 Tag Group
The Tags2 tag group is a container for the action's tags. The tags specified will replace any tags already assigned to the action.
<Tags2>
<Tag2>
<TagID><![CDATA[]]></TagID>
- OR -
<TagName><![CDATA[]]></TagName>
<TagValues><![CDATA[]]></TagValues>
</Tag2>
</Tags2>
Each tag is contained in a Tag2 tag and may contain the following.
TagID
To obtain a tag's ID:
- Navigate to the Tag Management Dashboard.
- Right click on a tag.
- Click Inspect (or Inspect Element, in some browsers). This displays the Developer Tools in your browser. The tag's ID will be located within the code.
TagName
The tag's name. The tag must already exist within your SmarterU account. This tag is mutually exclusive with the TagID tag.
TagValues
A comma-separated list of values for the tag. The allowed values are controlled by the tag's settings.
TrainingCost Tag Group
The TrainingCost tag group is a container for the action's training cost. The training cost information specified will replace any training cost information already assigned to the action.
<TrainingCost>
<Trainer>
<TrainerID></TrainerID>
- OR -
<TrainerEmail><![CDATA[]]></TrainerEmail>
- OR -
<TrainerEmployeeID><![CDATA[]]></TrainerEmployeeID>
</Trainer>
<LearnerHours></LearnerHours>
<TrainerHours></TrainerHours>
<ExtraCostAmount></ExtraCostAmount>
<ExtraCostDescription><![CDATA[]]></ExtraCostDescription>
</TrainingCost>
The TrainingCost tag may contain the following.
Trainer
A container for specifying the action's trainer. The trainer must already exist in SmarterU. The Trainer tag must contain one of the following:
Tag | Description |
---|---|
TrainerID | The trainer's system-generated identifier. |
TrainerEmail | The trainer's email address. |
TrainerEmployeeID | The trainer's employee ID. |
LearnerHours
The number of hours the learner spends completing this action.
TrainerHours
The number of hours the selected trainer spends on this action.
ExtraCostAmount
The amount of any additional cost associated with this action.
ExtraCostDescription
A description for any additional cost associated with this action.
API Response XML Package
The API response XML package will always include a Result, Info, and Errors tag.
<SmarterU>
<Result></Result>
<Info>
<Credential><![CDATA[]]></Credential>
<CredentialID><![CDATA[]]></CredentialID>
</Info>
<Errors>
<Error>
<ErrorID></ErrorID>
<ErrorMessage></ErrorMessage>
</Error>
</Errors>
</SmarterU>
The response may also contain the following.
Credential
The action's name.
CredentialID
The action's system-generated identifier.
Example API Response XML Package
Below is an example of an API response XML package.
<SmarterU>
<Result>Success</Result>
<Info>
<Credential><![CDATA[In-person Interview]]></Credential>
<CredentialID><![CDATA[10122]]></CredentialID>
</Info>
<Errors>
</Errors>
</SmarterU>
Error Codes
Error Code | Message |
---|---|
UC:01 | The identifier provided is invalid. |
UC:02 | The name provided is invalid. |
UC:03 | The ID provided is invalid. |
UC:04 | The status provided is invalid. |
UC:05 | the description provided is invalid. |
UC:06 | The allow attachments is invalid. |
UC:07 | The expires provided is invalid. |
UC:08 | The days good is invalid. |
UC:09 | The visible to learner provided is invalid. |
UC:10 | The learning modules provided is invalid. |
UC:11 | The credentials provided is invalid. |
UC:12 | The added prerequisites provided is invalid. |
UC:13 | The remove prerequisites provided is invalid. |
UC:14 | the learning modules provided is invalid. |
UC:15 | The credentials provided is invalid. |
UC:16 | The requires confirmation provided is invalid. |
UC:17 | The confirmation attachments provided is invalid. |
UC:18 | The confirmation notification provided is invalid. |
UC:19 | The permissions provided is invalid. |
UC:20 | One or more Learning Modules provided are not valid. |
UC:21 | One or more Credentials provided are not valid. |
UC:22 | One or more Learning Modules provided are not valid. |
UC:23 | One or more Credentials provided are not valid. |
UC:24 | Type not specified. |
UC:25 | One or more permission types provided are not valid. Only GM, MGU, and SUP are allowed values. |
UC:26 | Credential name cannot be used. |
UC:27 | Credential ID cannot be used. |
UC:28 | The required permissions are not met to call the createCredential method. |
UC:29 | Days good should not be greater than recall days. |
UC:30 | The allows attachments provided is not valid. Only NO, YES or REQUIRED are allowed values. |
UC:31 | The confirmation attachments provided is not valid. Only NO, YES or REQUIRED are allowed values. |
UC:32 | The recall days is invalid. |
UC:33 | It was not possible to inactivate this action as it is prerequisite of another action. |
UC:34 | Permissions are required when requires confirmation is 1. |
UC:35 | The required permissions are not met to call the createCredential method. |
UC:36 | The requested credential does not exist. |
UC:37 | The status provided is not valid. Only ACTIVE or INACTIVE are allowed values. |
UC:38 | Either DaysGood or ExpirationDate can be provided. |
UC:40 | One or more tags do not exist in the provided account. |
UC:41 | All tags provided must have at least one value. |
UC:42 | Values must be from the pre-defined list specified for the tag. |
UC:43 | The training cost provided is invalid. |
UC:44 | The trainer provided is invalid. |
UC:45 | The trainer ID provided is invalid. |
UC:46 | The trainer email provided is invalid. |
UC:47 | The trainer employee ID provided is invalid. |
UC:48 | The learner hours provided is invalid. |
UC:49 | The trainer hours provided is invalid. |
UC:50 | The extra cost amount provided is invalid. |
UC:51 | The extra cost description provided is invalid. |
UC:52 | The trainer does not exist. |