- 2 Minutes to read
- Print
- DarkLight
API: listSubscriptions
- 2 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 listSubscriptions method retrieves subscriptions that meet the specified filter.
Who Has Access
Administrators and owners have access to the listSubscriptions method.
API Call XML Package
<SmarterU>
<AccountAPI><![CDATA[]]></AccountAPI>
<UserAPI><![CDATA[]]></UserAPI>
<Method>listSubscriptions</Method>
<Parameters>
<SubscriptionVariant>
<Filters>
<Status><![CDATA[]]></Status>
</Filters>
</SubscriptionVariant>
</Parameters>
</SmarterU>
SubscriptionVariant Tag Group
The SubscriptionVariant tag group is a container for the subscription filter.
<SubscriptionVariant>
<Filters>
<Status><![CDATA[]]></Status>
</Filters>
</SubscriptionVariant>
The SubscriptionVariant tag may contain the following.
Filters
A container for the subscription status filter. This tag contains the following.
Tag | Description |
---|---|
Status (optional) | The subscription's status. Acceptable values are Active or Inactive. |
API Response XML Package
The API response XML package will always include a Result, Info, and Errors tag.
<SmarterU>
<Result></Result>
<Info>
<Subscriptions>
<Subscription>
<Name>![CDATA[]]</Name>
<SubscriptionID>![CDATA[]]</SubscriptionID>
<Description>![CDATA[]]</Description>
<Status>![CDATA[]]</Status>
</Subscription>
</Subscriptions>
</Info>
<Errors>
<Error>
<ErrorID></ErrorID>
<ErrorMessage></ErrorMessage>
</Error>
</Errors>
</SmarterU>
The Subscriptions tag is a container for the subscriptions returned by the listSubscriptions method. Each subscription is contained in a Subscription tag and may contain the following.
Name
The subscription's name.
SubscriptionID
The subscription's system-generated identifier. This is an internal identifier that is not accessible via the SmarterU interface.
Description
The subscription's description. Only the text of the description will be returned; HTML and formatting will not be included.
Status
The subscription's status (i.e., Active or Inactive).
Example API Response XML Package
Below is an example of an API response XML package.
<SmarterU>
<Result>Success</Result>
<Info>
<Subscriptions>
<Subscription>
<Name><![CDATA[Fina Shoes Advanced]]></Name>
<SubscriptionID>15</SubscriptionID>
<Description><![CDATA[The Fina Shoes Advanced subscription contains courses for learners who are familiar with Fina Shoes' offerings and would like to learn more about the company's design principles.]]></Description>
<Status>Active</Status>
</Subscription>
<Subscription>
<Name><![CDATA[Fina Shoes Basics]]></Name>
<SubscriptionID>14</SubscriptionID>
<Description>
<![CDATA[The Fina Shoes Basics subscription contains courses for learners who are new to the Fina Shoes family.]]>
</Description>
<Status>Active</Status>
</Subscription>
<Subscription>
<Name><![CDATA[Fina Shoes Trial]]></Name>
<SubscriptionID>576</SubscriptionID>
<Description>
<![CDATA[The Fina Shoes Trial subscription contains a sampling of basic courses for learners who are interested in joining the Fina Shoes family.]]>
</Description>
<Status>Active</Status>
</Subscription>
</Subscriptions>
</Info>
<Errors>
</Errors>
</SmarterU>
Error Codes
Error Code | Message |
---|---|
LSS:02 | The required permissions are not met to call the listSubscriptions method. |
LSS:03 | The Status provided is not valid. The allowed values are Active and Inactive. |