POST api/Coupons/Set?couponType={couponType}

Request Information

URI Parameters

NameDescriptionTypeAdditional information
couponType

integer

Default value is 1

Body Parameters

CouponBindingModel
NameDescriptionTypeAdditional information
BusinessId

integer

Required

CouponArray

Collection of CouponModel

None.

Request Formats

application/json, text/json

Sample:
{
  "BusinessId": 1,
  "CouponArray": [
    {
      "CouponId": 1,
      "Text": "sample string 2",
      "IconUrl": "sample string 3",
      "BusinessId": 1
    },
    {
      "CouponId": 1,
      "Text": "sample string 2",
      "IconUrl": "sample string 3",
      "BusinessId": 1
    }
  ]
}

application/xml, text/xml

Sample:
<CouponBindingModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SpinToWin.Models.BindingModel">
  <BusinessId>1</BusinessId>
  <CouponArray>
    <CouponModel>
      <BusinessId>1</BusinessId>
      <CouponId>1</CouponId>
      <IconUrl>sample string 3</IconUrl>
      <Text>sample string 2</Text>
    </CouponModel>
    <CouponModel>
      <BusinessId>1</BusinessId>
      <CouponId>1</CouponId>
      <IconUrl>sample string 3</IconUrl>
      <Text>sample string 2</Text>
    </CouponModel>
  </CouponArray>
</CouponBindingModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

CouponViewModel
NameDescriptionTypeAdditional information
Coupons

Collection of CouponDetails

None.

Response Formats

application/json, text/json

Sample:
{
  "Coupons": [
    {
      "CouponId": 1,
      "Text": "sample string 2",
      "IconId": 3,
      "IconUrl": "sample string 4"
    },
    {
      "CouponId": 1,
      "Text": "sample string 2",
      "IconId": 3,
      "IconUrl": "sample string 4"
    }
  ]
}

application/xml, text/xml

Sample:
<CouponViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SpinToWin.Models.ViewModel">
  <Coupons>
    <CouponDetails>
      <CouponId>1</CouponId>
      <IconId>3</IconId>
      <IconUrl>sample string 4</IconUrl>
      <Text>sample string 2</Text>
    </CouponDetails>
    <CouponDetails>
      <CouponId>1</CouponId>
      <IconId>3</IconId>
      <IconUrl>sample string 4</IconUrl>
      <Text>sample string 2</Text>
    </CouponDetails>
  </Coupons>
</CouponViewModel>