POST API/UserAPI/PostBuyVoucher

Request Information

URI Parameters

None.

Body Parameters

BuyVoucherRequestModel
NameDescriptionTypeAdditional information
Id

integer

None.

LoginId

integer

None.

VoucherNo

string

None.

VoucherName

string

None.

Amount

decimal number

None.

imageUrl

string

None.

Description

string

None.

ExpiryDate

date

None.

isActive

boolean

None.

createdDate

date

None.

updatedDate

date

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "LoginId": 2,
  "VoucherNo": "sample string 3",
  "VoucherName": "sample string 4",
  "Amount": 5.0,
  "imageUrl": "sample string 6",
  "Description": "sample string 7",
  "ExpiryDate": "2026-03-01T17:30:10.5341982+00:00",
  "isActive": true,
  "createdDate": "2026-03-01T17:30:10.5341982+00:00",
  "updatedDate": "2026-03-01T17:30:10.5341982+00:00"
}

application/xml, text/xml

Sample:
<BuyVoucherRequestModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WalkandEarnModels">
  <Amount>5</Amount>
  <Description>sample string 7</Description>
  <ExpiryDate>2026-03-01T17:30:10.5341982+00:00</ExpiryDate>
  <Id>1</Id>
  <LoginId>2</LoginId>
  <VoucherName>sample string 4</VoucherName>
  <VoucherNo>sample string 3</VoucherNo>
  <createdDate>2026-03-01T17:30:10.5341982+00:00</createdDate>
  <imageUrl>sample string 6</imageUrl>
  <isActive>true</isActive>
  <updatedDate>2026-03-01T17:30:10.5341982+00:00</updatedDate>
</BuyVoucherRequestModel>

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

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.