POST api/cart/freesubscription

Request Information

URI Parameters

None.

Body Parameters

CartModel
NameDescriptionTypeAdditional information
productPlanIds

Collection of integer

None.

promoCode

string

None.

coupon

Coupon

None.

coupons

Collection of Coupon

None.

selectedCardId

string

None.

details

CartDetailsModel

None.

mlsId

string

None.

trialPeriodDays

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "productPlanIds": [
    1,
    2
  ],
  "promoCode": "sample string 1",
  "coupon": {
    "promoCode": "sample string 2",
    "productType": 0,
    "description": "sample string 3",
    "discountPercent": 1,
    "discountAmount": 1.0
  },
  "coupons": [
    {
      "promoCode": "sample string 2",
      "productType": 0,
      "description": "sample string 3",
      "discountPercent": 1,
      "discountAmount": 1.0
    },
    {
      "promoCode": "sample string 2",
      "productType": 0,
      "description": "sample string 3",
      "discountPercent": 1,
      "discountAmount": 1.0
    }
  ],
  "selectedCardId": "sample string 2",
  "details": {
    "productPlans": [
      {
        "id": 1,
        "amount": 2.0,
        "fee": 1.0,
        "description": "sample string 3",
        "feeDescription": "sample string 4",
        "productType": 0,
        "promoCode": "sample string 6",
        "couponDescription": "sample string 7",
        "discountedAmount": 8.0,
        "trialEndDate": "2024-04-24T19:40:25.5832326+00:00",
        "created": true,
        "errorMessage": "sample string 10",
        "subscription": true,
        "productPlanTypeId": 64
      },
      {
        "id": 1,
        "amount": 2.0,
        "fee": 1.0,
        "description": "sample string 3",
        "feeDescription": "sample string 4",
        "productType": 0,
        "promoCode": "sample string 6",
        "couponDescription": "sample string 7",
        "discountedAmount": 8.0,
        "trialEndDate": "2024-04-24T19:40:25.5832326+00:00",
        "created": true,
        "errorMessage": "sample string 10",
        "subscription": true,
        "productPlanTypeId": 64
      }
    ],
    "discount": 1.0,
    "total": 2.0,
    "trial_period_days": 1
  },
  "mlsId": "sample string 3",
  "trialPeriodDays": 1
}

text/html

Sample:
{"productPlanIds":[1,2],"promoCode":"sample string 1","coupon":{"promoCode":"sample string 2","productType":0,"description":"sample string 3","discountPercent":1,"discountAmount":1.0},"coupons":[{"promoCode":"sample string 2","productType":0,"description":"sample string 3","discountPercent":1,"discountAmount":1.0},{"promoCode":"sample string 2","productType":0,"description":"sample string 3","discountPercent":1,"discountAmount":1.0}],"selectedCardId":"sample string 2","details":{"productPlans":[{"id":1,"amount":2.0,"fee":1.0,"description":"sample string 3","feeDescription":"sample string 4","productType":0,"promoCode":"sample string 6","couponDescription":"sample string 7","discountedAmount":8.0,"trialEndDate":"2024-04-24T19:40:25.5832326+00:00","created":true,"errorMessage":"sample string 10","subscription":true,"productPlanTypeId":64},{"id":1,"amount":2.0,"fee":1.0,"description":"sample string 3","feeDescription":"sample string 4","productType":0,"promoCode":"sample string 6","couponDescription":"sample string 7","discountedAmount":8.0,"trialEndDate":"2024-04-24T19:40:25.5832326+00:00","created":true,"errorMessage":"sample string 10","subscription":true,"productPlanTypeId":64}],"discount":1.0,"total":2.0,"trial_period_days":1},"mlsId":"sample string 3","trialPeriodDays":1}

application/xml, text/xml

Sample:
<CartModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NPlay.Common.Models.Services">
  <Coupon xmlns:d2p1="http://schemas.datacontract.org/2004/07/NPlay.Common.Models">
    <d2p1:Description>sample string 3</d2p1:Description>
    <d2p1:DiscountAmount>1</d2p1:DiscountAmount>
    <d2p1:DiscountPercent>1</d2p1:DiscountPercent>
    <d2p1:DurationId>64</d2p1:DurationId>
    <d2p1:DurationInMonths>1</d2p1:DurationInMonths>
    <d2p1:EndDate>2024-04-23T19:40:25.5832326+00:00</d2p1:EndDate>
    <d2p1:Id>sample string 1</d2p1:Id>
    <d2p1:IsEnabled>true</d2p1:IsEnabled>
    <d2p1:MaxRedemptions>1</d2p1:MaxRedemptions>
    <d2p1:Product>Legacy</d2p1:Product>
    <d2p1:PublicCode>sample string 2</d2p1:PublicCode>
    <d2p1:StartDate>2024-04-23T19:40:25.5832326+00:00</d2p1:StartDate>
    <d2p1:TimesRedeemed>7</d2p1:TimesRedeemed>
  </Coupon>
  <CouponCode>sample string 1</CouponCode>
  <Coupons xmlns:d2p1="http://schemas.datacontract.org/2004/07/NPlay.Common.Models">
    <d2p1:Coupon>
      <d2p1:Description>sample string 3</d2p1:Description>
      <d2p1:DiscountAmount>1</d2p1:DiscountAmount>
      <d2p1:DiscountPercent>1</d2p1:DiscountPercent>
      <d2p1:DurationId>64</d2p1:DurationId>
      <d2p1:DurationInMonths>1</d2p1:DurationInMonths>
      <d2p1:EndDate>2024-04-23T19:40:25.5832326+00:00</d2p1:EndDate>
      <d2p1:Id>sample string 1</d2p1:Id>
      <d2p1:IsEnabled>true</d2p1:IsEnabled>
      <d2p1:MaxRedemptions>1</d2p1:MaxRedemptions>
      <d2p1:Product>Legacy</d2p1:Product>
      <d2p1:PublicCode>sample string 2</d2p1:PublicCode>
      <d2p1:StartDate>2024-04-23T19:40:25.5832326+00:00</d2p1:StartDate>
      <d2p1:TimesRedeemed>7</d2p1:TimesRedeemed>
    </d2p1:Coupon>
    <d2p1:Coupon>
      <d2p1:Description>sample string 3</d2p1:Description>
      <d2p1:DiscountAmount>1</d2p1:DiscountAmount>
      <d2p1:DiscountPercent>1</d2p1:DiscountPercent>
      <d2p1:DurationId>64</d2p1:DurationId>
      <d2p1:DurationInMonths>1</d2p1:DurationInMonths>
      <d2p1:EndDate>2024-04-23T19:40:25.5832326+00:00</d2p1:EndDate>
      <d2p1:Id>sample string 1</d2p1:Id>
      <d2p1:IsEnabled>true</d2p1:IsEnabled>
      <d2p1:MaxRedemptions>1</d2p1:MaxRedemptions>
      <d2p1:Product>Legacy</d2p1:Product>
      <d2p1:PublicCode>sample string 2</d2p1:PublicCode>
      <d2p1:StartDate>2024-04-23T19:40:25.5832326+00:00</d2p1:StartDate>
      <d2p1:TimesRedeemed>7</d2p1:TimesRedeemed>
    </d2p1:Coupon>
  </Coupons>
  <Details>
    <Discount>1</Discount>
    <ProductPlans>
      <CartPlanModel>
        <Amount>2</Amount>
        <CouponCode>sample string 6</CouponCode>
        <CouponDescription>sample string 7</CouponDescription>
        <CouponId>sample string 5</CouponId>
        <Created>true</Created>
        <Description>sample string 3</Description>
        <Error>sample string 10</Error>
        <Fee>1</Fee>
        <FeeDescription>sample string 4</FeeDescription>
        <Id>1</Id>
        <PostCouponAmount>8</PostCouponAmount>
        <ProductPlanTypeId>64</ProductPlanTypeId>
        <ProductType>Legacy</ProductType>
        <Subscription>true</Subscription>
        <SubscriptionMetadata xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
        <TrialEnd>2024-04-24T19:40:25.5832326+00:00</TrialEnd>
        <TrialPeriodDays>1</TrialPeriodDays>
      </CartPlanModel>
      <CartPlanModel>
        <Amount>2</Amount>
        <CouponCode>sample string 6</CouponCode>
        <CouponDescription>sample string 7</CouponDescription>
        <CouponId>sample string 5</CouponId>
        <Created>true</Created>
        <Description>sample string 3</Description>
        <Error>sample string 10</Error>
        <Fee>1</Fee>
        <FeeDescription>sample string 4</FeeDescription>
        <Id>1</Id>
        <PostCouponAmount>8</PostCouponAmount>
        <ProductPlanTypeId>64</ProductPlanTypeId>
        <ProductType>Legacy</ProductType>
        <Subscription>true</Subscription>
        <SubscriptionMetadata xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
        <TrialEnd>2024-04-24T19:40:25.5832326+00:00</TrialEnd>
        <TrialPeriodDays>1</TrialPeriodDays>
      </CartPlanModel>
    </ProductPlans>
    <Total>2</Total>
    <TrialPeriodDays>1</TrialPeriodDays>
  </Details>
  <MlsId>sample string 3</MlsId>
  <ProductPlanIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </ProductPlanIds>
  <SelectedCardId>sample string 2</SelectedCardId>
  <TrialPeriodDays>1</TrialPeriodDays>
</CartModel>

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

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

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

Sample:

Sample not available.