Sign in

Reactivate Cards in Batch

POST https://{organization}.myguper.com/api/loyalty/cards/reactivate

Reverts the cancellation of up to 100 cards in one call - the way back from Cancel Cards in Batch. Without it, undoing a batch of 100 would be 100 calls.

Same shape as the batch cancel: 200 with the outcome of each item, and 400 only for a malformed request. Outcomes here are reactivated, not_canceled (the card was not canceled, nothing done) and not_found. The summary carries amountRestored - how much balance returns to circulation.

Validity is not touched: a card reactivated after its expiresAt comes back expired, with the original expiresAt. Reactivating is not extending.

dryRun works the same way as in the batch cancel.

A range never crosses organizations: an id that belongs to another account comes back not_found and is left untouched - every query here is scoped by organization.

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.

Request body

Content-Type: application/json

{
    "ids": "1512200:1512299;1512305;1512310",
    "dryRun": false                                             // optional
}

Responses

{
    "batchId": "cb_a17c40e9b882",
    "dryRun": false,
    "summary": {
        "requested": 3,
        "canceled": 0,
        "reactivated": 2,
        "already_canceled": 0,
        "not_canceled": 1,
        "has_open_reservation": 0,
        "not_found": 0,
        "amountRestored": 62400
    },
    "results": [
        { "id": 1512200, "outcome": "reactivated", "amount": 31200 },
        { "id": 1512201, "outcome": "reactivated", "amount": 31200 },
        { "id": 1512202, "outcome": "not_canceled" }
    ]
}

Related

Copied to clipboard