Skip to main content

RedeemBalance

Adds the content to the user's purchased courses, updates the user's record to their new balance, and inserts the credit redemption action event. For articles and videos, returns the content URL. For all other content types, returns the learner dashboard URL.

RedeemBalance(
contentType: BalanceContentType!
contentId: UUID!
): AbsoluteOrRelativeURL!

Directives

authAccess

This requires the current user to be in STUDENT role.

Arguments

RedeemBalance.contentType ● BalanceContentType! non-null enum

Currently only available for courses

RedeemBalance.contentId ● UUID! non-null scalar

Type

AbsoluteOrRelativeURL scalar

Examples

Run in Postman

Query:

RedeemBalance(
$contentType: BalanceContentType!,
$contentId: UUID!
) {
RedeemBalance(
contentType: $contentType,
contentId: $contentId
)
}

Variables:

{
"contentType": "courses",
"contentId": "UUID"
}

Response:

{
"data": {
"RedeemBalance": "AbsoluteOrRelativeURL"
}
}