Skip to content

Start another Cashback Boost cycle

POST
/v1/cards/{card_id}/cashback/restart
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.

card_id
required
string

The card_id of a card (UUID).

Media typeapplication/json
object
enrollment_id
required

The enrollment_id of the card’s current offer.

string
/^[1-9][0-9]{0,18}$/

Example

{
"enrollment_id": "418"
}

The cycle started, or was already started by an earlier call

Media typeapplication/json
object
card_id
required
string format: uuid
offer
required
One of:

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
name
required
string
kind
required
string
status
required
string
Allowed values: active expired completed base
rate
required

Percent of each purchase paid back.

number
base_rate
required
number
step
required
integer
completed_visits
required
integer
rates
required
Array<number> | null
window_days
required
Array<integer> | null
expires_at
required

The next visit must happen before this to keep the boost.

string | null format: date-time
program_ends_at
required
string | null format: date-time
time_zone

The restaurant’s IANA time zone, for showing dates on its calendar.

string | null
minimum_purchase_cents
required
integer
can_restart
required

The cycle is finished and the cardholder may start another with POST /v1/cards/{card_id}/cashback/restart.

boolean
enrollment_id

This cycle, to name in a restart.

string | null

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)

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code.

string
Allowed values: validation_error invalid_client unauthorized insufficient_scope not_found method_not_allowed unsupported_media_type external_ref_conflict card_exists card_not_active cardholder_email_conflict no_existing_card chain_only chain_account venue_claimed venue_not_registered venue_required provider_error provider_unavailable provider_timeout issuance_in_doubt restart_unavailable rate_limited internal_error
message
required
string
details

Present on validation_error. One entry per violated field.

Array<object>
object
pointer
required

JSON pointer into the request body, or the parameter name.

string
message
required
string

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

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code.

string
Allowed values: validation_error invalid_client unauthorized insufficient_scope not_found method_not_allowed unsupported_media_type external_ref_conflict card_exists card_not_active cardholder_email_conflict no_existing_card chain_only chain_account venue_claimed venue_not_registered venue_required provider_error provider_unavailable provider_timeout issuance_in_doubt restart_unavailable rate_limited internal_error
message
required
string
details

Present on validation_error. One entry per violated field.

Array<object>
object
pointer
required

JSON pointer into the request body, or the parameter name.

string
message
required
string

Example

{
"error": {
"code": "unauthorized",
"message": "A valid Bearer token is required."
}
}

Token lacks the scope this endpoint needs

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code.

string
Allowed values: validation_error invalid_client unauthorized insufficient_scope not_found method_not_allowed unsupported_media_type external_ref_conflict card_exists card_not_active cardholder_email_conflict no_existing_card chain_only chain_account venue_claimed venue_not_registered venue_required provider_error provider_unavailable provider_timeout issuance_in_doubt restart_unavailable rate_limited internal_error
message
required
string
details

Present on validation_error. One entry per violated field.

Array<object>
object
pointer
required

JSON pointer into the request body, or the parameter name.

string
message
required
string

Example

{
"error": {
"code": "insufficient_scope",
"message": "This endpoint requires scope cards:issue."
}
}

No such resource for this partner

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code.

string
Allowed values: validation_error invalid_client unauthorized insufficient_scope not_found method_not_allowed unsupported_media_type external_ref_conflict card_exists card_not_active cardholder_email_conflict no_existing_card chain_only chain_account venue_claimed venue_not_registered venue_required provider_error provider_unavailable provider_timeout issuance_in_doubt restart_unavailable rate_limited internal_error
message
required
string
details

Present on validation_error. One entry per violated field.

Array<object>
object
pointer
required

JSON pointer into the request body, or the parameter name.

string
message
required
string

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.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code.

string
Allowed values: validation_error invalid_client unauthorized insufficient_scope not_found method_not_allowed unsupported_media_type external_ref_conflict card_exists card_not_active cardholder_email_conflict no_existing_card chain_only chain_account venue_claimed venue_not_registered venue_required provider_error provider_unavailable provider_timeout issuance_in_doubt restart_unavailable rate_limited internal_error
message
required
string
details

Present on validation_error. One entry per violated field.

Array<object>
object
pointer
required

JSON pointer into the request body, or the parameter name.

string
message
required
string

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.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code.

string
Allowed values: validation_error invalid_client unauthorized insufficient_scope not_found method_not_allowed unsupported_media_type external_ref_conflict card_exists card_not_active cardholder_email_conflict no_existing_card chain_only chain_account venue_claimed venue_not_registered venue_required provider_error provider_unavailable provider_timeout issuance_in_doubt restart_unavailable rate_limited internal_error
message
required
string
details

Present on validation_error. One entry per violated field.

Array<object>
object
pointer
required

JSON pointer into the request body, or the parameter name.

string
message
required
string

Example

{
"error": {
"code": "rate_limited",
"message": "Too many requests. Retry after 1 second."
}
}
Retry-After
integer
>= 1

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.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code.

string
Allowed values: validation_error invalid_client unauthorized insufficient_scope not_found method_not_allowed unsupported_media_type external_ref_conflict card_exists card_not_active cardholder_email_conflict no_existing_card chain_only chain_account venue_claimed venue_not_registered venue_required provider_error provider_unavailable provider_timeout issuance_in_doubt restart_unavailable rate_limited internal_error
message
required
string
details

Present on validation_error. One entry per violated field.

Array<object>
object
pointer
required

JSON pointer into the request body, or the parameter name.

string
message
required
string

Examples

Issuer unreachable or timed out

{
"error": {
"code": "provider_unavailable",
"message": "The card issuer did not respond."
}
}