POST rest/v1/subscription/preview
Request Information
URI Parameters
None.
Body Parameters
ApplyCouponRequestName | Description | Type | Additional information |
---|---|---|---|
CouponCode | string |
None. |
|
RatePlanIsbn | string |
None. |
Request Formats
application/json, text/json
Sample:
{ "CouponCode": "sample string 1", "RatePlanIsbn": "sample string 2" }
application/xml, text/xml
Sample:
<ApplyCouponRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Subscriptions.HMH.Common.APIEntities"> <CouponCode>sample string 1</CouponCode> <RatePlanIsbn>sample string 2</RatePlanIsbn> </ApplyCouponRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
CouponPreviewResponseName | Description | Type | Additional information |
---|---|---|---|
contractedMrr | decimal number |
None. |
|
totalContractedValue | Object |
None. |
|
amount | decimal number |
None. |
|
amountWithoutTax | decimal number |
None. |
|
amountbeforediscount | decimal number |
None. |
|
taxAmount | decimal number |
None. |
|
invoiceTargetDate | string |
None. |
|
invoiceItems | Collection of InvoiceItem |
None. |
|
offerFreeTrialDays | integer |
None. |
|
discountRatePlanId | string |
None. |
|
success | boolean |
None. |
|
processId | string |
None. |
|
reasons | Collection of Reason |
None. |
Response Formats
application/json, text/json
Sample:
{ "contractedMrr": 1.1, "totalContractedValue": {}, "amount": 3.1, "amountWithoutTax": 4.1, "amountbeforediscount": 5.1, "taxAmount": 6.1, "invoiceTargetDate": "sample string 7", "invoiceItems": [ { "ServiceStartDate": "sample string 1", "ServiceEndDate": "sample string 2", "ChargeAmount": 1.1, "ChargeDescription": "sample string 3", "ChargeName": "sample string 4", "ProductName": "sample string 5", "ProductRatePlanChargeId": "sample string 6", "Quantity": 1.1, "UnitOfMeasure": "sample string 7" }, { "ServiceStartDate": "sample string 1", "ServiceEndDate": "sample string 2", "ChargeAmount": 1.1, "ChargeDescription": "sample string 3", "ChargeName": "sample string 4", "ProductName": "sample string 5", "ProductRatePlanChargeId": "sample string 6", "Quantity": 1.1, "UnitOfMeasure": "sample string 7" } ], "offerFreeTrialDays": 8, "discountRatePlanId": "sample string 9", "success": true, "processId": "sample string 11", "reasons": [ { "code": 1, "message": "sample string 2" }, { "code": 1, "message": "sample string 2" } ] }
application/xml, text/xml
Sample:
<CouponPreviewResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Subscriptions.HMH.Common.APIEntities"> <processId>sample string 11</processId> <reasons> <Reason> <code>1</code> <message>sample string 2</message> </Reason> <Reason> <code>1</code> <message>sample string 2</message> </Reason> </reasons> <success>true</success> <amount>3.1</amount> <amountWithoutTax>4.1</amountWithoutTax> <amountbeforediscount>5.1</amountbeforediscount> <contractedMrr>1.1</contractedMrr> <discountRatePlanId>sample string 9</discountRatePlanId> <invoiceItems> <InvoiceItem> <ChargeAmount>1.1</ChargeAmount> <ChargeDescription>sample string 3</ChargeDescription> <ChargeName>sample string 4</ChargeName> <ProductName>sample string 5</ProductName> <ProductRatePlanChargeId>sample string 6</ProductRatePlanChargeId> <Quantity>1.1</Quantity> <ServiceEndDate>sample string 2</ServiceEndDate> <ServiceStartDate>sample string 1</ServiceStartDate> <UnitOfMeasure>sample string 7</UnitOfMeasure> </InvoiceItem> <InvoiceItem> <ChargeAmount>1.1</ChargeAmount> <ChargeDescription>sample string 3</ChargeDescription> <ChargeName>sample string 4</ChargeName> <ProductName>sample string 5</ProductName> <ProductRatePlanChargeId>sample string 6</ProductRatePlanChargeId> <Quantity>1.1</Quantity> <ServiceEndDate>sample string 2</ServiceEndDate> <ServiceStartDate>sample string 1</ServiceStartDate> <UnitOfMeasure>sample string 7</UnitOfMeasure> </InvoiceItem> </invoiceItems> <invoiceTargetDate>sample string 7</invoiceTargetDate> <offerFreeTrialDays>8</offerFreeTrialDays> <taxAmount>6.1</taxAmount> <totalContractedValue /> </CouponPreviewResponse>