Sign in

Cashback time-to-redeem report: days or weeks until the balance is used (distribution, median, p90)

GET https://{organization}.myguper.com/api/loyalty/report/redemption-latency/{dateStart}/{dateEnd}

Distribution of the time until a cashback card is redeemed — how many card uses happened on the first day, the second day, and so on (or per week). It is a distribution, not an average: the average hides exactly what matters, which is the concentration in the first days against the tail near expiry. median and p90 come from the same distribution.

basis says where the clock starts:

  • available (default): when the card became usable (startsAt, after the campaign waiting period). Use it to tune the validity period.
  • issued: when the card was issued. Includes the waiting period.

Buckets are complete periods (24 hours or 7 days) between the basis and the checkout debit; bucket 0 is the first day/week. Only settled redemptions count. The grain is the card use: a redemption that used two cards contributes two latencies (uses); redemptions is the count of distinct redemptions in the bucket. share is uses / total (a ratio).

Same filters as loyalty.report.redemptions: cohort (redemption = debits in the period, default; issuance = cards issued in the period), campaign (list), originStore, redeemStore. Values in cents.

Try-it values populated from environment ACME (Demo)


Authentication

Token

Send your user token in the x-guper-authorization header. Endpoints that support a Public mode (e.g. acúmulo and resgate previews) accept the same request without the header — Private mode adds customer data and a confirmation token to the response.

Headers

Name Type Description
x-guper-authorization * string User token issued by Guper. Omit only on endpoints that explicitly support a Public mode.
Content-Type * string Always `application/json` for endpoints that accept a JSON body.

Path parameters

Name Type Description
dateStart * string Start of the period (YYYY-MM-DD), inclusive.
dateEnd * string End of the period (YYYY-MM-DD), inclusive.

Query parameters

Name Type Description
buckets string Bucket size. Default `day`.
basis string Where the clock starts: card availability (default) or card issuance.
cohort string Which date the period applies to. `redemption` (default) or `issuance`.
campaign string Only cards of these campaigns. Array or comma list; up to 200 ids.
originStore integer Only cards issued by this store.
redeemStore integer Only redemptions made in this store.
rewardType string Which wallet. Default `monetary`.

Responses

{
  "meta": { "unit": "days", "basis": "cardAvailableAt", "cohort": "issuance", "timezone": "Etc/GMT+6" },
  "total": 767,
  "median": 2,
  "p90": 8,
  "rows": [
    { "bucket": 0, "uses": 172, "redemptions": 166, "redeemedValue": 7788667, "share": 0.2243 },
    { "bucket": 1, "uses": 121, "redemptions": 117, "redeemedValue": 4434159, "share": 0.1578 },
    { "bucket": 2, "uses": 100, "redemptions": 100, "redeemedValue": 3856692, "share": 0.1304 }
  ]
}

Related

Copied to clipboard