DELETE v4/codes/:code - Delete/Cancel/Refund

Use this API to cancel/refund a specific code. There are a variety of reasons a code can and cannot be cancelled which can be reviewed at the bottom of the page. Error messaging is returned depending on current codes' refund eligibility requirements.

 Verb/URI

DELETE https://api.vitalsource.com/v4/codes/{code}

Data Definitions

Name
Usage
Description
Data Type
Example
Required
  URL param The code created at v3/codes - Create N/A

v4/codes/ABCDE1234567890

Yes 

 

Request Headers

X-VitalSource-API-Key: ALLCAPSANDNUMBERS

Response

Response body - success

HTTP: 200 OK

Response body - failure example

<error-response>
<error-code>1009</error-code>
<error-text>Not eligible for refund because a refund was previously processed for this purchase.</error-text>
</error-response>

Error Codes

HTTP & Error messages 
Message
Notes
200

 

Success. Errors provided simultaneously
403

 

 
404

Invalid Code

 
469

The Redemption Code is already canceled and is not eligible for a return.

 
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.

 
1006

Unassigned Code cannot be canceled. Please deactivate instead.

 
1007 Timeout when attempting call to eResource provider  
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.  
1008 Not eligible for refund  
1008 Error canceling eResource  
1009 Not eligible for refund because a refund was previously processed for this purchase.  
1014 Not eligible for refund because the user has exceeded the percentage of pages accessed.  
1015 Not eligible for refund because a refund was previously processed for this purchase.  

 

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

Comments

0 comments

Please sign in to leave a comment.