---
title: "API: getUserSubscriptions"
slug: "api-getusersubscriptions"
tags: ["subscriptions"]
updated: 2022-09-20T15:48:49Z
published: 2022-09-20T15:48:49Z
canonical: "support.smarteru.com/api-getusersubscriptions"
---
> ## 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: getUserSubscriptions
- 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 getUserSubscriptions method retrieves a [user's subscriptions](/v1/docs/user-subscription-enrollments).
## Who Has Access
The following users have access to the getUserSubscriptions method:
- Users with the [Group Managers](/v1/docs/group-permission-group-manager-gm), [Manage Group Users](/v1/docs/group-permission-manage-group-users-mgu), or [Manage Users](/v1/docs/group-permission-manage-users-mu) group permission.
- [Administrators and owners](/v1/docs/user-profile-information#access-level).
## API Call XML Package
```markup
getUserSubscriptions
-OR-
-OR-
```
## User Tag Group
The User tag group is a container for the user filter.
```markup
-OR-
-OR-
```
The User tag contains one of the following.
### ID
The user's system-generated identifier. This tag is mutually exclusive with the [Email](/v1/docs/api-getusersubscriptions#email) and [EmployeeID](/v1/docs/api-getusersubscriptions#employeeid) tags. This is the ID returned by the [getUser](/v1/docs/api-getuser) and [listUsers](/v1/docs/api-listusers) methods.
### **Email**
The [user's email address](/v1/docs/user-login-information#primary-email-required-if-employee-id-not-specified). This tag us mutually exclusive with the [ID](/v1/docs/api-getusersubscriptions#id) and [EmployeeID](/v1/docs/api-getusersubscriptions#employeeid) tags. 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 [ID](/v1/docs/api-getusersubscriptions#id) and [Email](/v1/docs/api-getusersubscriptions#email) tags. This is the EmployeeID returned by the [getUser](/v1/docs/api-getuser) and [listUsers](/v1/docs/api-listusers) methods.
## 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-getusersubscriptions#error-codes) tag.
```markup
```
The UserSubscriptions tag is a container for the subscriptions returned by the getUserSubscriptions method. Each subscription is contained in a UserSubscription tag and may contain the following.
### ID
The subscription's system-generated identifier.
### SubscriptionName
The [subscription's name](/v1/docs/subscription-main#name-required).
### VariantName
The [variant's name](/v1/docs/variant-main#name-required).
### Duration
The [variant's duration](/v1/docs/variant-duration#duration).
### StartDate
The date the user's subscription started.
### EndDate
The date the user's subscription ends.
### Expired
Indicates whether the user's subscription is expired:
- *0* - The user's subscription is not expired.
- *1* - The user's subscription is expired.
### Example API Response XML Package
Below is an example of an API response XML package.
```markup
Success
1669
Days
2014-12-10 00:00:00.0
2017-07-07 00:00:00.0
1
25930
Days
2016-03-07 19:48:10.0
2016-03-10 19:48:10.0
1
31880
Days
2016-05-11 19:02:30.0
2016-08-19 00:00:00.0
1
```
## **Error Codes**
| Error Code | Message |
| --- | --- |
| GUS:01 | The email address provided is not valid. |
| GUS:02 | The required permissions are not met to call the getUser method. |
| GUS:03 | The user id provided is not valid. |
| GUS:04 | The user requested does not exist. |
| GUS:05 | The requested user cannot be retrieved via the API. |
## Related
- [API: createUser](/api-createuser.md)
- [API: getUser](/api-getuser.md)
- [API: getUserGroups](/api-getusergroups.md)
- [API: getUserWithRoleDetail](/api-getuserwithroledetail.md)
- [API: listUsers](/api-listusers.md)
- [API: updateUser](/api-updateuser.md)
- [Enrolling Users](/enrolling-users.md)
- [Subscriptions](/subscriptions.md)
- [Users ](/users.md)