Start another Cashback Boost cycle
const url = 'https://api.zwipe.co/v1/cards/example/cashback/restart';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"enrollment_id":"418"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.zwipe.co/v1/cards/example/cashback/restart \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "enrollment_id": "418" }'Requires cards:issue. When the card’s offer from GET /v1/cards/{card_id}/balance has
can_restart: true, the cardholder may start another cycle of a progressive offer; send that offer’s
enrollment_id. The new cycle counts visits from the next day on the restaurant’s calendar. Repeating the
call with the same enrollment_id is safe: it answers with the cycle already started. The returned offer
is also what the next balance read shows.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The card_id of a card (UUID).
Request Bodyrequired
Section titled “Request Bodyrequired”object
The enrollment_id of the card’s current offer.
Example
{ "enrollment_id": "418"}Responses
Section titled “Responses”The cycle started, or was already started by an earlier call
object
The cashback rate this card earns now. A progressive offer raises the rate on each return visit
made within the window in window_days; rates lists the rate per visit.
object
Percent of each purchase paid back.
The next visit must happen before this to keep the boost.
The restaurant’s IANA time zone, for showing dates on its calendar.
The cycle is finished and the cardholder may start another with POST /v1/cards/{card_id}/cashback/restart.
This cycle, to name in a restart.
Example
{ "card_id": "0192f7a4-5c2e-7d3b-9a1f-4e8b2c6d0a11", "offer": { "name": "Cashback Boost", "kind": "progressive", "status": "active", "rate": 20, "base_rate": 20, "step": 1, "completed_visits": 0, "rates": [ 20, 25, 30 ], "window_days": [ 7, 7 ], "expires_at": null, "program_ends_at": null, "time_zone": "America/Los_Angeles", "minimum_purchase_cents": 1000, "can_restart": false, "enrollment_id": "421" }}Request does not match this contract (missing field, wrong type, bad format)
object
object
Stable machine-readable code.
Present on validation_error. One entry per violated field.
object
JSON pointer into the request body, or the parameter name.
Example
{ "error": { "code": "validation_error", "message": "Request body invalid: value at `/email` does not match format: email", "details": [ { "pointer": "/email", "message": "value at `/email` does not match format: email" } ] }}Missing, expired or unknown credentials
object
object
Stable machine-readable code.
Present on validation_error. One entry per violated field.
object
JSON pointer into the request body, or the parameter name.
Example
{ "error": { "code": "unauthorized", "message": "A valid Bearer token is required." }}Token lacks the scope this endpoint needs
object
object
Stable machine-readable code.
Present on validation_error. One entry per violated field.
object
JSON pointer into the request body, or the parameter name.
Example
{ "error": { "code": "insufficient_scope", "message": "This endpoint requires scope cards:issue." }}No such resource for this partner
object
object
Stable machine-readable code.
Present on validation_error. One entry per violated field.
object
JSON pointer into the request body, or the parameter name.
Example
{ "error": { "code": "not_found", "message": "Not found." }}The card is not issued (card_not_active), has no confirmed issuer card (issuance_in_doubt), or
the issuer refused the restart (restart_unavailable): the cycle is not finished, the
enrollment is not this card’s, or the program allows no further cycle. Read the balance again
for the current offer.
object
object
Stable machine-readable code.
Present on validation_error. One entry per violated field.
object
JSON pointer into the request body, or the parameter name.
Example
{ "error": { "code": "restart_unavailable", "message": "This cashback cycle cannot be restarted now. Read the card's balance for its current offer." }}Over the request limit (see Rate limit above). Wait Retry-After seconds.
object
object
Stable machine-readable code.
Present on validation_error. One entry per violated field.
object
JSON pointer into the request body, or the parameter name.
Example
{ "error": { "code": "rate_limited", "message": "Too many requests. Retry after 1 second." }}Headers
Section titled “Headers”Seconds to wait before the next request.
The issuer failed or did not answer in time. Retry reads with bounded backoff. For uncertain writes, preserve the original reference and inspect the saved order before any deliberate retry; never create a new reference to bypass uncertainty.
object
object
Stable machine-readable code.
Present on validation_error. One entry per violated field.
object
JSON pointer into the request body, or the parameter name.
Examples
Issuer unreachable or timed out
{ "error": { "code": "provider_unavailable", "message": "The card issuer did not respond." }}Issuer answered with an error
{ "error": { "code": "provider_error", "message": "The card issuer rejected the request (code 1203)." }}
