POST api/couponcodes/RedeemCode

Redeem a code

Request Information

URI Parameters

None.

Body Parameters

The code to redeem

redeemcodearguments
NameDescriptionTypeAdditional information
code

The code which has to be marked as redeemed

string

None.

Request Formats

application/json, text/json

Sample:
{
  "code": "sample string 1"
}

application/xml, text/xml

Sample:
<redeemcodearguments xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechnoDataSystems.Enterprise.TotalWash.Web.API">
  <code>sample string 1</code>
</redeemcodearguments>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'redeemcodearguments'.

Response Information

Resource Description

The result of this action

generatecodesresult
NameDescriptionTypeAdditional information
success

Indicates if the action was successfull

boolean

None.

remark

A description regarding the result

string

None.

codes

Returns an array of the generated unique codes

Collection of string

None.

Response Formats

application/json, text/json

Sample:
{
  "success": true,
  "remark": "sample string 2",
  "codes": [
    "sample string 1",
    "sample string 2"
  ]
}

application/xml, text/xml

Sample:
<generatecodesresult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechnoDataSystems.Enterprise.TotalWash.Web.API">
  <codes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </codes>
  <remark>sample string 2</remark>
  <success>true</success>
</generatecodesresult>