POST api/vouchers/createorder

Create an order

Request Information

URI Parameters

None.

Body Parameters

Productcode, name and email address for this order

vouchercreateorderarguments
NameDescriptionTypeAdditional information
productcode

The product code for which the vouchers have to be generated

string

None.

name

The name of the customer

string

None.

email

The email address of the customer

string

None.

street

The street of the customer

string

None.

housenumber

The housenumber of the customer

string

None.

postalcode

The postalcode of the customer

string

None.

city

The city of the customer

string

None.

Request Formats

application/json, text/json

Sample:
{
  "productcode": "sample string 1",
  "name": "sample string 2",
  "email": "sample string 3",
  "street": "sample string 4",
  "housenumber": "sample string 5",
  "postalcode": "sample string 6",
  "city": "sample string 7"
}

application/xml, text/xml

Sample:
<vouchercreateorderarguments xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechnoDataSystems.Enterprise.TotalWash.Web.API">
  <city>sample string 7</city>
  <email>sample string 3</email>
  <housenumber>sample string 5</housenumber>
  <name>sample string 2</name>
  <postalcode>sample string 6</postalcode>
  <productcode>sample string 1</productcode>
  <street>sample string 4</street>
</vouchercreateorderarguments>

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 'vouchercreateorderarguments'.

Response Information

Resource Description

A token for futher processing

vouchercreateorderresult
NameDescriptionTypeAdditional information
success

Indicates if the action was successfull

boolean

None.

remark

A description regarding the result

string

None.

token

The unique token for the order

string

None.

price

The price for this order

decimal number

None.

quantity

The number of vouchers

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "success": true,
  "remark": "sample string 2",
  "token": "sample string 3",
  "price": 4.0,
  "quantity": 5
}

application/xml, text/xml

Sample:
<vouchercreateorderresult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechnoDataSystems.Enterprise.TotalWash.Web.API">
  <price>4</price>
  <quantity>5</quantity>
  <remark>sample string 2</remark>
  <success>true</success>
  <token>sample string 3</token>
</vouchercreateorderresult>