/api/v1/service-credits read:inventory Lists monthly service credits, newest period first. How a credit is calculated, so you can reconcile credit_cents yourself: (1) for each of the three SLAs, take how many percentage points it fell below target (pointsBelow, 0 if met or null); (2) convert each to a tier — up to 2 points → 300 bps, up to 5 → 700 bps, more than 5 → 1200 bps; (3) sum the tiers and apply the aggregate cap from your agreement — that is credit_rate_bps; (4) credit_cents is that rate applied to the month’s redemption fees. breakdown shows steps 1–2 per SLA; max_points_below is the worst single shortfall. persistent_failure flags a sustained pattern (a shortfall of more than 5 points in three consecutive months, or in four months within a rolling six) — informational here; consequences are governed by your agreement.
GET /api/v1/service-credits?limit=10 These inputs are shared across all docs pages, so an id entered here carries over.
Not run yet. Press Run to make a live call against https://service.rip.fun (through this demo's server-side proxy; the API key never reaches the browser).
curl -X GET 'https://service.rip.fun/api/v1/service-credits?limit=10' \ -H 'X-API-Key: rip_…'
| Field | Type | Required | Description |
|---|---|---|---|
limit | query int | — | 1..120, default 24 |
data)| Field | Description |
|---|---|
service_credits[].id / period_start / period_end | The month the credit covers |
service_credits[].fulfillment_pct / inventory_pct / pickpack_pct | The three measured SLAs (integer hundredths, or null) |
service_credits[].redemption_fee_cents / credit_rate_bps / credit_cents | The month’s redemption fees, the aggregate rate, and the resulting credit |
service_credits[].breakdown / max_points_below / persistent_failure | Per-SLA {pct, pointsBelow, tierBps} + worst shortfall + sustained-pattern flag |
service_credits[].status | PENDING | REQUESTED | APPLIED | EXPIRED — only REQUESTED credits are applied to your invoice |
service_credits[].report_available_at / client_requested_at / applied_invoice_id / applied_at | Request window opens at report_available_at; poll and claim promptly — an unclaimed credit expires unused |