POST api/Winning/CreateWinning

Request Information

URI Parameters

None.

Body Parameters

WinningBindingModel
NameDescriptionTypeAdditional information
customerId

integer

None.

CouponId

integer

None.

WorkerId

integer

None.

startDate

decimal number

None.

endDate

decimal number

None.

isFromSpin

boolean

None.

NumDaysToExpiryDate

integer

None.

NumberOfDiners

integer

None.

PaymentAmount

decimal number

None.

Request Formats

application/json, text/json

Sample:
{
  "customerId": 1,
  "CouponId": 2,
  "WorkerId": 3,
  "startDate": 4.1,
  "endDate": 5.1,
  "isFromSpin": true,
  "NumDaysToExpiryDate": 7,
  "NumberOfDiners": 1,
  "PaymentAmount": 1.1
}

application/xml, text/xml

Sample:
<WinningBindingModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SpinToWin.Models.BindingModel">
  <CouponId>2</CouponId>
  <NumDaysToExpiryDate>7</NumDaysToExpiryDate>
  <NumberOfDiners>1</NumberOfDiners>
  <PaymentAmount>1.1</PaymentAmount>
  <WorkerId>3</WorkerId>
  <customerId>1</customerId>
  <endDate>5.1</endDate>
  <isFromSpin>true</isFromSpin>
  <startDate>4.1</startDate>
</WinningBindingModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

WinningViewModel
NameDescriptionTypeAdditional information
Id

integer

None.

Code

string

None.

CustomerId

integer

None.

CouponId

integer

None.

WinningDate

decimal number

None.

DateUsed

date

None.

ExpiryDate

decimal number

None.

IsFromSpin

boolean

None.

IconUrl

string

None.

BusinessName

string

None.

BusinessLogo

string

None.

NameCoupon

string

None.

NumDaysToExpiryDate

integer

None.

NumberOfDiners

integer

None.

PaymentAmount

decimal number

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Code": "sample string 2",
  "CustomerId": 3,
  "CouponId": 4,
  "WinningDate": 5.1,
  "DateUsed": "2019-05-22T17:47:14.7458736+00:00",
  "ExpiryDate": 6.1,
  "IsFromSpin": true,
  "IconUrl": "sample string 7",
  "BusinessName": "sample string 8",
  "BusinessLogo": "sample string 9",
  "NameCoupon": "sample string 10",
  "NumDaysToExpiryDate": 11,
  "NumberOfDiners": 1,
  "PaymentAmount": 1.1
}

application/xml, text/xml

Sample:
<WinningViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SpinToWin.Models.ViewModel">
  <BusinessLogo>sample string 9</BusinessLogo>
  <BusinessName>sample string 8</BusinessName>
  <Code>sample string 2</Code>
  <CouponId>4</CouponId>
  <CustomerId>3</CustomerId>
  <DateUsed>2019-05-22T17:47:14.7458736+00:00</DateUsed>
  <ExpiryDate>6.1</ExpiryDate>
  <IconUrl>sample string 7</IconUrl>
  <Id>1</Id>
  <IsFromSpin>true</IsFromSpin>
  <NameCoupon>sample string 10</NameCoupon>
  <NumDaysToExpiryDate>11</NumDaysToExpiryDate>
  <NumberOfDiners>1</NumberOfDiners>
  <PaymentAmount>1.1</PaymentAmount>
  <WinningDate>5.1</WinningDate>
</WinningViewModel>