Revenue Recovery

List the activity ledger

curl "https://api.subscriby.net/v1/projects/7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13/retention/activity?kind=payment_recovered" \
  -H "Authorization: Bearer sbt_..."

The ledger behind every figure: one row per notice, offer, feedback and win-back message, with the member, the kind, the channel that carried it, when it went out, and, once a charge settled after it, converted_at and the payment that counted it. kind keeps one kind of row; sort_by takes created_at, sent_at or kind.

A row converts when the next charge settles for that member, which is how the figures count a recovery and a member won back; a notice that converts is not a notice that worked on its own, only one that preceded the payment.

get/v1/projects/{project}/retention/activity

Request

  • Base URL: https://api.subscriby.net
  • URL: https://api.subscriby.net/v1/projects/{project}/retention/activity
  • Auth: HTTP bearer

Path parameters

projectstring uuid required

The project, resolved by the route binder.

Query parameters

kind'payment_failed_notice' | 'grace_reminder' | 'grace_final_warning' | 'access_suspended' | 'access_restored' | 'payment_recovered' | 'offer_shown' | 'offer_taken' | 'feedback' | 'sequence_step'

What a row of the Revenue Recovery ledger records. The four ladder kinds are the notices a member receives about an unpaid renewal, in the order they can arrive; the ledger holds each at most once per failure, which is how a notice is never repeated. AccessRestored and PaymentRecovered close an episode: the first says the member was let back in, the second that money arrived, and a recovery during the grace window records only the second because nothing was taken away. The offer, feedback and sequence kinds are written by the cancellation screen and the win-back sequences; they are declared here from the first migration because the column's check constraint cannot be widened later.

Keep only one kind of row: payment_failed_notice, grace_reminder, grace_final_warning, access_suspended, access_restored, payment_recovered, offer_shown, offer_taken, feedback or sequence_step.

pageinteger

The 1-based page to return. A page past the last answers an empty data array with meta.total still filled, so a loop can stop without guessing.

per_pageinteger

Rows per page, 1 to 100. A higher value clamps to the cap silently. Defaults to 25.

sort_bystring

The column to order by. Defaults to created_at; a column the endpoint does not offer falls back to the default rather than failing.

sort_direction'asc' | 'desc'

asc or desc. Defaults to desc.

limitinteger

Legacy alias of per_page, kept for clients that predate it. per_page wins when both are sent.

Response

The page of ledger rows, newest first, each with its member, coupon and step.

Changes

No recorded changes to this operation across all 1 revision of this API.