POST api/voucher/generate

Request Information

URI Parameters

None.

Body Parameters

VoucherGenerateRequest
NameDescriptionTypeAdditional information
UniqueReferenceNo

string

None.

VoucherValidFrom

date

None.

VoucherValidTill

date

None.

BookingId

string

None.

VoucherValue

decimal number

None.

DescriptionIfany

string

None.

Request Formats

application/json, text/json

Sample:
{
  "UniqueReferenceNo": "sample string 1",
  "VoucherValidFrom": "2026-02-12T19:53:43.2346063+05:30",
  "VoucherValidTill": "2026-02-12T19:53:43.2346063+05:30",
  "BookingId": "sample string 4",
  "VoucherValue": 5.0,
  "DescriptionIfany": "sample string 6"
}

application/xml, text/xml

Sample:
<VoucherGenerateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketalayAPI.Models">
  <BookingId>sample string 4</BookingId>
  <DescriptionIfany>sample string 6</DescriptionIfany>
  <UniqueReferenceNo>sample string 1</UniqueReferenceNo>
  <VoucherValidFrom>2026-02-12T19:53:43.2346063+05:30</VoucherValidFrom>
  <VoucherValidTill>2026-02-12T19:53:43.2346063+05:30</VoucherValidTill>
  <VoucherValue>5</VoucherValue>
</VoucherGenerateRequest>

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

Response Information

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.