latestOpenAPI 3.0.02026-08-1056429755.6 KB

a6efafc1669c

Immediate Midterm Change

Subscription Immediate Midterm Change API - Doesn't store cart for subscription owner

Preview Change API provides the preview response for the changes which includes the credit, sub total, total tax and total amount due to be paid if the preview changes results in due amount. This API does not return the cart details (if created) in the response of the preview API. If “proratedUnitPrice” attribute is present then it overrides all other prices and skip normal proration. If “proratedUnitPrice” attribute is not present then GC pricing and proration applies. If subscription is perpetual subscription and we don’t pass “proratedUnitPrice” attribute into the request payload then prorated transaction price calculates on the basis of perpetual price.

post/v1/subscriptions/{subId}/preview

Path parameters

subIdstring required

Subscription Id

Headers

tokenstring required

Basic authorization (dispatch Key and Secret) - Client Admin key

principalstring

principal header is required only for price overriding. By default principal type will be a site. Other principal type (company, user) need to pass explicitly in header.

Request body

quantityinteger required

Product quantity

proratedUnitPricenumber

If “proratedUnitPrice” attribute is present then it overrides all other prices and skip normal proration.

Response

OK

subscriptionIdstring

Subscription id

subTotalnumber

Subscription total amount

creditnumber

Credit amount

totalAmountDuenumber

Total amount due

totalTaxnumber

Total tax

currencystring

Currency

prorationDatestring

Proration date

isCartNeededboolean

Is cart needed

isPaymentOnFileboolean

Is payment on file

reduceActionUrlstring

Reduct action URL