Discussions

Ask a Question
Back to all

Subscription History Incomplete

Hi there, I am trying to replicate your web front end subscription history page via the API. The subscription history endpoint and the subscription endpoint share the same object response. However, what is missing is an enum of the "History Action" for example quantity change, initial order, renewal etc. and the quantity delta for example +1 or -1.

To replicate this, I've got the entire history and start from the begining, noting the previous quantity and the next item in the lists quantity. Then calculate the delta. However, there is a race condition in the system where you might have a scheduled change and a renewal on the same date, to overcome that I've ordered the list by StartDate and then by UpdatedDate which appears to have resolved that race condition. But without the enum from the API I am not 100% confident my code will correctly identify a scheduled action vs a renewal.

My questions are, is this reliable way to replicate the delta change in the history? Am I missing something more simple? Could pax8 extend the API to include the delta to reduce the number of API calls to calculate this?