List service credits

GET /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.

Try it GET /api/v1/service-credits?limit=10

These inputs are shared across all docs pages, so an id entered here carries over.

response

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 (tracks the inputs above)
curl -X GET 'https://service.rip.fun/api/v1/service-credits?limit=10' \
  -H 'X-API-Key: rip_…'

Request fields

FieldTypeRequiredDescription
limitquery int1..120, default 24

Response fields (data)

FieldDescription
service_credits[].id / period_start / period_endThe month the credit covers
service_credits[].fulfillment_pct / inventory_pct / pickpack_pctThe three measured SLAs (integer hundredths, or null)
service_credits[].redemption_fee_cents / credit_rate_bps / credit_centsThe month’s redemption fees, the aggregate rate, and the resulting credit
service_credits[].breakdown / max_points_below / persistent_failurePer-SLA {pct, pointsBelow, tierBps} + worst shortfall + sustained-pattern flag
service_credits[].statusPENDING | REQUESTED | APPLIED | EXPIRED — only REQUESTED credits are applied to your invoice
service_credits[].report_available_at / client_requested_at / applied_invoice_id / applied_atRequest window opens at report_available_at; poll and claim promptly — an unclaimed credit expires unused