---
title: "API: enrollSubscriptionVariants"
slug: "api-enrollsubscriptionvariants"
tags: ["variants", "subscriptions"]
updated: 2022-08-24T19:28:56Z
published: 2022-08-24T19:28:56Z
canonical: "support.smarteru.com/api-enrollsubscriptionvariants"
---
> ## 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: enrollSubscriptionVariants
- 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 enrollSubscriptionVariants method [enrolls users in subscription variants](/v1/docs/enrolling-users) that you have available.
## Who Has Access
The following users have access to the enrollSubscriptionVariants method:
- Users with the [Group Manager](/v1/docs/group-permission-group-manager-gm) or [Manage Group Users](/v1/docs/group-permission-manage-group-users-mgu) group permission.
- [Administrators or owners](/v1/docs/user-profile-information#access-level).
## API Call XML Package
```markup
enrollSubscriptionVariants
- OR -
```
##
## SubscriptionVariantEnrollment Tag Group
The SubscriptionVariantEnrollment tag group is a container for the subscription enrollments.
```markup
- OR -
```
The SubscriptionVariantEnrollment tag may contain the following.
### Enrollment
A container for the subscription enrollment. Refer to [Enrollment Tag Group](/v1/docs/api-enrollsubscriptionvariants#enrollment-tag-group).
## Enrollment Tag Group
The Enrollment tag group is a container for a subscription enrollment.
```markup
- OR -
```
Each subscription enrollment is contained in an Enrollment tag and may contain the following.
The enrollSubscriptionVariants method supports up to enrollments per call.
### User
The user to enroll in a subscription variant. The User tag contains one of the following.
| Tag | Description |
| --- | --- |
| **Email** | The [user's mail address](/v1/docs/user-login-information#primary-email-required-if-employee-id-not-specified). This tag is mutually exclusive with the EmployeeID tag. This is the Email returned by the [getUser](/v1/docs/api-getuser) and [listUsers](/v1/docs/api-listusers) methods. |
| **EmployeeID** | The [user's employee ID](/v1/docs/user-login-information#employee-id-required-if-primary-email-not-specified). This tag is mutually exclusive with the Email tag. This is the EmployeeID returned by the [getUser](/v1/docs/api-getuser) and [listUsers](/v1/docs/api-listusers) methods. |
### GroupName
The enrollment group's name. This is the Name returned by the [getGroup](/v1/docs/api-getgroup) and [listGroups](/v1/docs/api-listgroups) methods.
- The user you are trying to enroll in a subscription variant must already be assigned to this group.
- The subscription must already be assigned to this group.
### SubscriptionVariantID
The subscription variant's system-generated identifier. This is the VariantID returned by the [listVariants](/v1/docs/api-listvariants) method.
### EnrollmentTag (optional)
The [enrollment tag](https://support.smarteru.com/docs/enrolling-users-specifying-additional-options#enrollment-tag).
## API Response XML Package
The [API response XML package](http://response) will always include a Result, Info, and [Errors](/v1/docs/api-enrollsubscriptionvariants#error-codes) tag.
```markup
```
The Enrollments tag is a container for the subscription enrollments processed by the enrollSubscriptionVariants method. Each subscription enrollment is contained in an Enrollment tag and may contain the following.
### User
The user's identifier. This returns the [same value that was provided in the Enrollment tag group](/v1/docs/api-enrollsubscriptionvariants#user)[](https://help.smarteru.com/api-enrollsubscriptionvariants$enrollment_tag_group).
### **SubscriptionVariantID**
The subscription variant's system-generated identifier. This returns the [same value that was provided in the Enrollment tag group](/v1/docs/api-enrollsubscriptionvariants#subscriptionvariantid)[](https://help.smarteru.com/api-enrollsubscriptionvariants$enrollment_tag_group).
Because this method can be used to perform multiple enrollments, be sure to check the [Errors tag for error codes](/v1/docs/api-enrollsubscriptionvariants#error-codes). It's possible for the Result tag to return *Success* even when errors are returned.
### Example API Response XML Package
Below is an example of an API response XML package.
```markup
Success
16
```
## **Error Codes**
| Error Code | Message |
| --- | --- |
| ESV:01 | The E-mail address provided is not valid. |
| ESV:02 | The Employee ID provided is not valid. |
| ESV:03 | The Group Name provided is not valid. |
| ESV:04 | The Subscription Variant ID provided is not valid. |
| ESV:05 | The Enrollment Tag provided is not valid. |
| ESV:06 | The required permissions are not met to call the enrollSubscriptionVariants method. |
| ESV:07 | Enrollment %blocknum% - The email address '%emailaddress%' is not a valid user. |
| ESV:08 | Enrollment %blocknum% - The employee id '%employeeid%' is not a valid user. |
| ESV:09 | Enrollment %blocknum% - No user identifier was provided. |
| ESV:10 | Enrollment %blocknum% - The Subscription Variant ID provided is not valid. |
| ESV:11 | Enrollment %blocknum% - The group name '%groupname%' is not valid. |
| ESV:12 | Enrollment %blocknum% - You cannot assign the subscription variant under the group selected. |
| ESV:13 | Enrollment %blocknum% - You do not have permissions to assign a user a subscription variant under the group selected. |
| ESV:14 | Enrollment %blocknum% - %enrollmenterror% This is a dynamic error in the enrollment process. Reasons may include: - Insufficient credits if credits are required for enrollment - User already has an unlimited enrollment in the subscription - The subscription variant has expired |
## Related
- [API: getGroup](/api-getgroup.md)
- [API: getUser](/api-getuser.md)
- [API: listGroups](/api-listgroups.md)
- [API: listSubscriptions](/api-listsubscriptions.md)
- [API: listUsers](/api-listusers.md)
- [API: listVariants](/api-listvariants.md)
- [Enrolling Users](/enrolling-users.md)
- [Subscriptions](/subscriptions.md)
- [Variants](/variants.md)