POST api/codes/codeRedeemAppEx
Extended Method that is used to get a book by using code ONLY FOR IOS (because code is always null)
Request Information
URI Parameters
None.
Body Parameters
redeemCodeDTOName | Description | Type | Additional information |
---|---|---|---|
Code | string |
None. |
|
ProductId | integer |
None. |
|
AccountCodeId | integer |
None. |
Request Formats
application/json, text/json
Sample:
{ "Code": "sample string 1", "ProductId": 2, "AccountCodeId": 1 }
application/xml, text/xml
Sample:
<redeemCodeDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CSAeReader.Common.API.Objects"> <AccountCodeId>1</AccountCodeId> <Code>sample string 1</Code> <ProductId>2</ProductId> </redeemCodeDTO>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
ApiResult[int] containing the bookID of the redeemed book
ApiResultOfDownloadBookModelName | Description | Type | Additional information |
---|---|---|---|
Errors | ErrorModel |
None. |
|
Result | DownloadBookModel |
None. |
|
IsSuccess | boolean |
None. |
|
StatusCode | HttpStatusCode |
None. |
Response Formats
application/json, text/json
Sample:
{ "Errors": { "ErrorsNumber": 1, "Messages": [ "sample string 1", "sample string 2" ], "MessagesString": "sample string 2" }, "Result": { "BookID": 1, "ProductID": 2, "AccountCodes": [ { "Id": 1, "AccountId": 2, "ProductId": 3, "BookId": 4, "Date": "2024-12-15T13:35:26.7395968-05:00", "StartDate": "2024-12-15T13:35:26.7395968-05:00", "EndDate": "2024-12-15T13:35:26.7395968-05:00" }, { "Id": 1, "AccountId": 2, "ProductId": 3, "BookId": 4, "Date": "2024-12-15T13:35:26.7395968-05:00", "StartDate": "2024-12-15T13:35:26.7395968-05:00", "EndDate": "2024-12-15T13:35:26.7395968-05:00" } ], "DatePurchased": "2024-12-15T13:35:26.7395968-05:00", "StartDate": "2024-12-15T13:35:26.7395968-05:00", "EndDate": "2024-12-15T13:35:26.7395968-05:00" }, "IsSuccess": false, "StatusCode": 100 }
application/xml, text/xml
Sample:
<ApiResultOfDownloadBookModel5MESSB3T xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CSAeReader.Common.API"> <Errors> <ErrorsNumber>1</ErrorsNumber> <Messages xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:string>sample string 1</d3p1:string> <d3p1:string>sample string 2</d3p1:string> </Messages> <MessagesString>sample string 2</MessagesString> </Errors> <Result xmlns:d2p1="http://schemas.datacontract.org/2004/07/CSAeReader.Common.Models"> <d2p1:AccountCodes xmlns:d3p1="http://schemas.datacontract.org/2004/07/CSAeReader.Core.Common.Models"> <d3p1:AccountCodeDto> <d3p1:AccountId>2</d3p1:AccountId> <d3p1:BookId>4</d3p1:BookId> <d3p1:Date>2024-12-15T13:35:26.7395968-05:00</d3p1:Date> <d3p1:EndDate>2024-12-15T13:35:26.7395968-05:00</d3p1:EndDate> <d3p1:Id>1</d3p1:Id> <d3p1:ProductId>3</d3p1:ProductId> <d3p1:StartDate>2024-12-15T13:35:26.7395968-05:00</d3p1:StartDate> </d3p1:AccountCodeDto> <d3p1:AccountCodeDto> <d3p1:AccountId>2</d3p1:AccountId> <d3p1:BookId>4</d3p1:BookId> <d3p1:Date>2024-12-15T13:35:26.7395968-05:00</d3p1:Date> <d3p1:EndDate>2024-12-15T13:35:26.7395968-05:00</d3p1:EndDate> <d3p1:Id>1</d3p1:Id> <d3p1:ProductId>3</d3p1:ProductId> <d3p1:StartDate>2024-12-15T13:35:26.7395968-05:00</d3p1:StartDate> </d3p1:AccountCodeDto> </d2p1:AccountCodes> <d2p1:BookID>1</d2p1:BookID> <d2p1:DatePurchased>2024-12-15T13:35:26.7395968-05:00</d2p1:DatePurchased> <d2p1:EndDate>2024-12-15T13:35:26.7395968-05:00</d2p1:EndDate> <d2p1:ProductID>2</d2p1:ProductID> <d2p1:StartDate>2024-12-15T13:35:26.7395968-05:00</d2p1:StartDate> </Result> <StatusCode>Continue</StatusCode> </ApiResultOfDownloadBookModel5MESSB3T>