API way to check number of months active?

Hey, is there a way with the API to get how many months somebody’s been a patron so far? I’m looking for a solution that would work for either “pays for a whole year at once” patrons or “has paid monthly for N months” patrons. They needn’t be contiguous either. I looked through the API docs and didn’t see a way to reliably tell. The reason would be as an extra gate against “Download the whole patron-only file archive and then ask for a refund” patrons, or to provide loyalty rewards.


Memberships have an attribute called “pledge_relationship_start” which tells you when the current pledge window started. This resets every time there’s a break in patronage to whenever the new patronage starts.

This might be your best bet but it only works for continguous patrons. Tracking non-contiguous patron relationships would require something on your end to reach out to the API to grab memberships and evaluate changes in status and store things locally.


Thank you. One clarification, please: can the API give me historical relationships with a particular user, or only the latest, then?

You can get what the pledge history shows for a member. Also, total historic pledge reflects entire monetary amount which a patron has paid to your campaign.

As best I can tell there’s no direct means to ask for historical data beyond the most recent. You’d have to write something on your end to periodically ask for and capture changes.

1 Like