GET v4/codes/:code - Read

Use this API to retrieve the status and metadata for an existing VitalSource redemption code.

  • Only codes created by the company of the API keys will be returned.

Supported Roles and Authentication Protocols

Type Supported Values
Authentication Protocols API Key
Valid for Roles System to System

API Request

Provide an explicit code value and the API will return additional data and details about the code.

HTTP Verbs and URLs

GET /v4/codes/{code}.xml
Parameter Example

Request Headers


Request Response


Three different successful responses will be returned: Unredeemed, Redeemed, and Deactivated.

HTTP Code: 200
<?xml version="1.0" encoding="UTF-8"?>
<product-name>Bookshelf Tutorial</product-name>
<creation-details>(Code created by THENAMEOFYOUR_VST_SYSTEM_USER on 2019-05-22 19:29:06 UTC)</creation-details>
<deactivation-details>Deactivated on 2019-05-22 19:31:35 UTC by DevNetwork Postman LMS WebAPI</deactivation-details>
<download-license-details>Expires 180 days after registration</download-license-details>
<online-license-details>Expires 180 days after registration</online-license-details>
<refundable_reason_text>The Redemption Code is already cancelled and is not eligible for a return.</refundable_reason_text>
Element Value Description
 code id Author of redeemed code/title
  product-name Title of redeemed code
  product-sku Link to the vbid/sku, to be used when forming the single sign-on request/redirect
  product-eisbn eISBN of product
  creation-details When code was created
  creation-user User who created the code; either the user in Connect or API system user
  creation-login Login of user who created code
  deactivation-details When code was canceled or deactivated
  download-license-details License length details for downloadable version
  online-license-details License length details for online version
  refundable  Boolean; returns true or false depending on refund rules
  refundable_reason_code Numeric code returned if code cannot be refunded. If refundable is true, this will be nil. See Refund Messaging table below for all available options.
  refundable_reason_text Text string returned if code cannot be refunded. If refundable is true, this will be nil. See Refund Messaging table below for all available options.


HTTP Code: 404 Not Found
<error-text>Code not found</error-text>

See full list of error codes and messages.

Refund Reason Codes

 Refundable Refund Code Refund Text
 True nil  nil
 False 469 The Redemption Code is already canceled and is not eligible for a return.
 False 1005 The Redemption Code is redeemed for an eTextbook that includes an access code for an online resource. The code to the online resource has been opened by the customer and is no longer returnable. This eTextbook is not eligible for a return.
False 1006 Unassigned Code cannot be canceled. Please deactivate instead.
False 1007 The Redemption Code is redeemed, and the number of days allowed for refund on this eTextbook has expired. This eTextbook is not eligible for a return. This is configurable per client with regards to the number of days for refund eligibility. The default is 14 days.


Was this article helpful?
0 out of 2 found this helpful



Please sign in to leave a comment.