operation_not_allowed
HTTP 422 · The card’s type does not allow this
What happened. The card’s type does not do what you asked. Each type has its own actions: a stamps card gives stamps and rewards, a points card adds and spends points, a prepaid card tops up and deducts, a coupon is applied once, a membership renews or counts sessions, and a VIP card only records visits or spend. A hold, for example, cannot be placed on a coupon.
What to do. Read the card’s type and rules with GET /programs/{id} and send the action that type takes.
Returned by
Section titled “Returned by”- Sign a customer up —
POST /enrolments - A fresh claim link for a card never in a wallet —
POST /cards/{id}/claim-link - Give value for a sale —
POST /awards - Refund or void an award, in full or in part —
POST /awards/{reference}/reverse - Spend value now —
POST /redemptions - Reserve value against an online order —
POST /redemption-holds
The answer
Section titled “The answer”Errors are Problem Details, served as application/problem+json, with "code": "operation_not_allowed" and "type": "https://passkaar.com/developers/errors/operation_not_allowed", which opens this page on docs.passkaar.com.