Skip to Main Content
Status Already exists
Created by Wayne Klapwyk
Created on Mar 22, 2021

API Method to retrieve ALL Subscriptions for a given User

There is no method in the TMS API v2.0 that retrieves the full list of Subscriptions given the UserID or UserExternalID. This would more effectively tie the Users and Subscriptions (ClubMemberships) API methods together. This would be helpful for reporting and for updating Subscription Memberships via API calls.

Currently you can SearchClubs to retrieve the Subscription Profile details. You can also GetClubMembership to retrieve the details of a specific User Subscription. However, There is no method that retrieves the full list of Subscriptions given the User ID or User External ID.

Alternatively you can SearchCourseAssignments for a UserId or UserExternalId which will provide a list of all Courses that the User has assigned. This will include the ClubMembershipId (AKA Subscription ID) for that course for that user. However, if the user does not have an assignment for a Course in a specific Subscription then that Subscription will not be found even though it is valid for that user.

A simple API could be set up similar to the following TMS URL https://xxxxxx.learnondemand.net/ClubMembership/Search?UserId=######


API Method: SearchUserSubscriptions

This proposed API Method could include the following definitions.

Parameters

Name

Type

Required

Note

userId

Int

Yes

The Id of the related user

userExternalId

String

No

An optional parameter used to filter for course assignments for a particular user using an external identifier.

pageIndex

Int

No

A 0-based index of the paged results you wish to receive. In general, you should start with a value of zero and increment it as you need to retrieve additional results. If not supplied, a value of 0 is used (the first page of results).

pageSize

Int

No

Indicates how many results you want per page. if not supplied, a default value of 100 is used.

sort

String

No

The value you want to sort by. If not supplied, a default value of "SubscriptionProfile" will be used. You can append " DESC" after the sort value to sort descending. For example, "SubscriptionProfile DESC" would sort by Subscripton Profile in descending order. Possible values:

  • SubscrptionId

  • SubscriptionProfile

  • StudentOrganization

  • Company

  • Starts

  • Expires

  • Created

  • LastModified


Response

Property

Type

Nullable

Note

Status

Integer

No

Indicates the status of the API request

  • 0 = Success

  • 10 = Error

  • 20 = Not found

  • 30 = Invalid integration key

Error

String

Yes

Error details. This will only have a value if an error was encountered. The status property will also be set to Error (10).

TotalCount

Integer

No

The total number of results that match the search conditions, not all of which may be in the current result set.

TotalPages

Integer

No

The total number of result pages that match the search conditions.

SearchSubscriptionResults

Array of SearchSubscriptionResults

No

See SearchClubResults type below.


SearchClubResult

Property

Type

Nullable

Note

SubscriptionId

Int

No

The user subscription's unique identifier

SubscriptionProfile

String

No

The subscription profile's name

OrganizationName

String

No

The subscription profile's organization name

Company

String

Yes

The student's company name

Starts

Date

No

The subscription effective start date

Expires

Date

Yes

The subscription effective end date

Created

DateTime

Yes

When the subscription profile was created.

LastModified

DateTime

Yes

When the subscription profile was last modified.


Who would most benefit from this idea? API Developers or LTI Implementers
  • ADMIN RESPONSE
    May 24, 2022

    Thanks for taking a minute to send along this suggestion! Our Product Group has given this an initial review and assigned this a status of "Future Consideration." This status mean this Idea is not yet on our roadmap, but will be part of our normal prioritization processes.


    If you have additional context or would like to generate more demand, feel free to edit your original post, add a comment, and/or invite your peers to upvote your Idea.

  • Attach files
  • Wayne Klapwyk
    Reply
    |
    Apr 17, 2023

    Changed status to "Already Exists". See previous comment.

  • Wayne Klapwyk
    Reply
    |
    Apr 30, 2021

    This Feature Request is now covered sufficiently by the new TMS API updates for SearchClubMemberships and SearchSubscriptions.