Happy Business Starts Here

Mismatch in subscription data returned by REST API call GET_SubscriptionsByAccount

Highlighted
Zuora Support

Mismatch in subscription data returned by REST API call GET_SubscriptionsByAccount

Problem:

Trying to get the rate plans info via the rest api endpoint /subscriptions/account

 

The scenario is the following:
1- I added a new product to the subscription via amendment with contract effective date today (04.03.2020)


2- Then, I update the pricing charge via amendment with contract effective date 06.24.2020.


3- And then, I remove the Add via amendment with contract effective date 04.24.2020.

 

In the response of the subscriptions/account, I am getting the following:
"ratePlans" : [ {
"id" : "2c92c0f87129861601713089a2e1217a",
"lastChangeType" : "Remove",
"acceptanceDateC" : null,
"ratePlanCharges" : [ {
……...
"segment" : 2,
"effectiveStartDate" : "2020-06-24",
"effectiveEndDate" : "2020-06-24",
"processedThroughDate" : null,
"chargedThroughDate" : null,
"done" : false,
"triggerDate" : null,
"triggerEvent" : "ContractEffective",
"endDateCondition" : "Subscription_End",
"acceptanceDateC" : null
} ]
}, {

Although, the lastChangeType is 'remove', the effectiveEndDate and effectiveStartDate are not right.
"effectiveStartDate" : "2020-06-24",
"effectiveEndDate" : "2020-06-24",

It should be "2020-04-24", which is the contract effective end date of the removal

 

Reason:

User is using the below API call.

https://www.zuora.com/developer/api-reference/#operation/GET_SubscriptionsByAccount

 

This call retrieves all subscriptions associated with the specified account. Zuora only returns the latest version of the subscriptions.

 

Subscription data is returned in reverse chronological order based on updatedDate.

 

In the above-given example : 

Add Product Amendment version is fetched + latest date (06.24.2020) is returned in the API call.





If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √