The flows
This page explains what each flow does and which rules apply. The exact fields and answers are in the reference (after logging in).
Flow 1: new and changed donors
Section titled “Flow 1: new and changed donors”Shift to you. You receive every pledge from day 1, and again on every
change: a different amount, a new e-mail address, the move to confirmed or
no_show, and later a stop (cancelled). From 7 days after confirmed, and straight away with no_show, the
record holds only the status (What you can fetch).
GET /v1/pledgesreturns everything that is new or changed since a given moment. You page through with a cursor.GET /v1/pledges/{record_id}returns one pledge, in its latest version.- In addition, Shift can notify your system directly when something happens. How the two fit together is in Push and pull.
Every record has a version that only goes up. If you already have a record,
process it as an update based on record_id, and only if the version is
higher than what you have.
Flow 2: regret and changes
Section titled “Flow 2: regret and changes”You to Shift, as long as the pledge is pending. That is normally day 1 to
8; if a pledge is still in a manual check at Shift on day 9, this flow stays
open until it becomes confirmed or no_show.
If a donor contacts you in those days, you pass it on with
POST /v1/pledges/{record_id}/changes. There are two kinds of report:
withdrawal: the donor regrets it and stops. The pledge becomesno_show.change: the donation or the donor’s data change. While the pledge ispending, everything can be changed: the amount, the frequency, the account number, the name, the address and the contact details. You only send what changes; what you leave out stays as it is.
The rules:
- While the pledge is
pending, a report from you always takes precedence over what Shift holds. - You see the result immediately as a new version of the record, with a push if you receive those.
- Sending the same report twice is no problem: the second time nothing changes. To follow: how you make a report unique (a key per report).
- If the pledge is already
confirmed, this flow is closed (409 window_closed). If the donor stops after that, you report it in flow 3. Other changes after day 9, such as a new address or a different amount, no longer need to be passed on.
Flow 3: collections and cancellations
Section titled “Flow 3: collections and cancellations”You to Shift, from confirmed until 13 months after the sign-up date.
You report per donor how it is going, with
PUT /v1/pledges/{record_id}/collection-status. We ask for no more than the
progress:
- The number of successful collections since the sign-up date. You always send the state at that moment; the previous state is overwritten.
- Whether the donor has stopped: cancelled or reversed, with the date, the
reason and a short description. The pledge then becomes
cancelled. If a donor stops with Shift, you receive it the same way: the record becomescancelled, with the reason and the description.
The rules:
- How often you report is up to you, for example after every collection run.
- Whether a cancellation falls within the agreed credit arrangement, Shift calculates from the sign-up date and the stop date. You do not have to do that yourself.
- Put in the description only what is needed to understand the stop, and no details of the donor themselves.
- Reporting for a donor is done once they have stopped (
cancelled), or 13 months after the sign-up date. After that the API refuses a report (409 already_cancelledor409 reporting_closed). - If the pledge is not
confirmed(stillpending, orno_show), the API refuses the report (409 not_confirmed).
pace-api staging · a79cbe01e4c5