---
title: "API: getCredential"
slug: "api-getcredential"
updated: 2022-08-23T16:37:06Z
published: 2022-08-23T16:37:06Z
canonical: "support.smarteru.com/api-getcredential"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://support.smarteru.com/llms.txt
> Use this file to discover all available pages before exploring further.
# API: getCredential
- SmarterU requires 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 getCredential method retrieves an [action's](/v1/docs/actions) details.
[Actions](/v1/docs/actions) were previously referred to *credentials*.
## **Who Has Access**
The following users have access to the getCredential method:
- Users with the [Manage Learning Plans, Certifications, and Requirements](/v1/docs/account-permission-manage-learning-plans-certifications-and-requirements) account permission.
- [Administrators and owners](/v1/docs/user-profile-information#access-level).
## **API Call XML Package**
```markup
getCredential
- OR -
```
## **Credential Tag Group**
The Credential tag group is a container for the action filters.
```markup
- OR -
```
The Credential tag contains one of the following.
### **Name**
The [action's name](/v1/docs/action-main#name). This tag is mutually exclusive with the [ID](https://help.smarteru.com/api-getcredential$credential_Id) tag.
### **ID**
The action's system-generated identifier. This tag is mutually exclusive with the [](https://help.smarteru.com/api-getcredential$credential_Name)[Name tag](/v1/docs/api-getcredential#name).
This is not yet an ID that you can access through the SmarterU system. Please contact our [Success Desk](mailto:success@neovation.com) to request your IDs.
## **API Response XML Package**
The [API response XML package](/v1/docs/api-response-xml-package) will always include a Result, Info, and [Errors](/v1/docs/api-getcredential#error-codes) tag.
```markup
```
The action is contained in a Credential tag and may contain the following.
### **Name**
The [action's name](/v1/docs/action-main#name).
### **CredentialID**
The action's system-generated identifier.
### **CreatedDate**
The date the action was added.
### **ModifiedDate**
The date the action was last edited.
### Description
The [description of the action](/v1/docs/action-main#description).
### AllowsAttachments
This is only returned when the [VisibleToLearners tag](/v1/docs/api-getcredential#visibletolearners) 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
Indicates whether the [action expires](https://support.smarteru.com/v1/docs/action-expiration#expires). Acceptable values are:
- *0* - The action doesn't expire.
- *1* - The action expires.
### ExpirationType
This is only returned when the [Expires tag](/v1/docs/api-getcredential#expires) is set to *1*.
Indicates how the action expires. Possible values are:
- *ByDays* - The action expires after the days specified in the [DaysGood tag](/v1/docs/api-getcredential#daysgood).
- *ByDate* - The action expires on the date specified in the [ExpirationDate tag](/v1/docs/api-getcredential#expirationdate).
### **DaysGood**
This tag is only returned when the [Expires tag](https://help.smarteru.com/api-getcredential$response_Expires) returns *1* and the [ExpirationType tag](https://help.smarteru.com/api-getcredential$response_ExpirationType) returns *ByDays*. The [number of days the action is valid](https://help.smarteru.com/action-expiration$setting_action_valid_for).
### **ExpirationDate**
This tag is only returned when the [Expires tag](/v1/docs/api-getcredential#expires) returns *1* and the [ExpirationType tag](/v1/docs/api-getcredential#expirationtype) returns *ByDate*. The date the action expires.
### **RecallDays**
This tag is only returned when the [Expires tag](/v1/docs/api-getcredential#expires) returns 1. The [number of days prior to the action's expiration when the status will change to *Warning*](/v1/docs/action-expiration#warning-period-should-start).
### **VisibleToLearners**
Indicates whether the [action is visible to learners](/v1/docs/action-main#visible-to-learners).
### **RequiresConfirmation**
Indicates [whether a user other than the learner must confirm the action](https://support.smarteru.com/v1/docs/action-confirmation#requires-confirmation) before its status can be set to Accepted. Acceptable values are:
- *0* - The action doesn't require confirmation.
- *1* - The action requires confirmation.
### ConfirmationAttachments
This tag is only returned if the [RequiresConfirmation tag](/v1/docs/api-getcredential#requiresconfirmation) returns *1*.
Indicates whether the user confirming the action must [upload an attachment with the action in order for it to be confirmed](/v1/docs/action-confirmation#allow-confirmation-attachments). 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
This tag is only returned if the [RequiresConfirmation tag](/v1/docs/api-getcredential#requiresconfirmation) returns *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.
### Prerequisites
The Prerequisites tag is a container for the [action's prerequisites](/v1/docs/action-prerequisites). Each prerequisite is contained in a Prerequisite tag and contains the following.
| Tag | Description |
| --- | --- |
| **Name** | The name of the prerequisite course or action. |
| **Type** | Indicates whether the prerequisite is a course or action. |
| **CredentialID** | This tag is only returned if the Type returns *Action*. The prerequisite action's system-generated identifier. |
| **LearningModuleID** | This tag is only returned if the Type returns *Course*. The prerequisite course's system-generated identifier. |
| **LearningModuleType** | This tag is only returned if the Type returns *Course*. The type of prerequisite course (i.e., Online, SCORM, ILT). |
### **Requirements**
The Requirements tag is a container for the requirements that include the action. Each requirement is contained in a Requirement tag and contains the following.
| Tag | Description |
| --- | --- |
| **ID** | The requirement's system-generated identifier. |
| **Name** | The requirement's name. |
### **Status**
The action's status (i.e., Active, Inactive).
### Tags2
A container for the [action's tags](/v1/docs/action-tags). Each tag is contained in a Tag2 tag and contains the following.
| Tag | Description |
| --- | --- |
| **TagID** | The tag's system-generated identifier. |
| **TagName** | The tag's name. |
| **TagValues** | A comma-separated list of tag values associated with the action. |
### TrainingCost
The TrainingCost tag is a container for the [action's training cost](/v1/docs/action-training-cost).
| Tag | Description |
| --- | --- |
| **Trainer** | A container for the action's trainer. The Trainer tag contains the following: - TrainerID - The trainer's system-generated identifier. - TrainerEmail - The trainer's email address. - TrainerEmployeeID - The trainer's employee ID. - TrainerGivenName - The trainer's given name, also known as their first name. - TrainerSurname - The trainer's surname, also known as their last name. |
| **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. |
### Example API Response XML Package
Below is an example of an API response XML package.
```markup
Success
2018-03-21 21:40:47.58
2019-09-23 18:16:21.97
Required
1
ByDays
365
90
1
1
0
6682
104878
14672
Forklift Operator
Active
7
50970
1
1
10
```
## **Error Codes**
| Error Code | Message |
| --- | --- |
| GC:01 | The name provided is invalid. |
| GC:02 | The ID provided is invalid. |
| GC:03 | The required permissions are not met to call the getCredential method. |
| GC:04 | The requested Credential does not exist. |
| GR:05 | Credential Name and ID not provided. You must provide a Name or ID. |
## Related
- [Actions](/actions.md)
- [API: createCredential](/api-createcredential.md)
- [API: listCredentials](/api-listcredentials.md)
- [API: updateCredential](/api-updatecredential.md)