Loyalty Wallets
Loyalty points wallets (CarteraPuntos).
📄️ Get loyalty wallet by ID
Returns a single loyalty wallet by its primary key, including members and the current points balance.
📄️ Update loyalty wallet
Full replacement of an existing loyalty wallet. `members`: null leaves existing membership untouched; [] clears; non-empty list replaces. `counterpartyAccountId` only selects the owner among the supplied members (ignored if not listed).
📄️ Delete loyalty wallet
Deletes a loyalty wallet.
📄️ Merge-patch loyalty wallet
RFC 7396 merge-patch over `application/merge-patch+json`. Send only the fields you want to change; include a field with value `null` to remove it. Use the `If-Match` header for optimistic concurrency control.
📄️ List loyalty wallets
Returns a paginated list of loyalty wallets with envelope `{data, totalCount, skip, limit, hasMore}`. Supports optional RSQL `filter`, `sort` (default `lastModifiedAt:desc`), `skip`/`limit` pagination and `modifiedAfter`/`modifiedBefore` bookends.
📄️ Create loyalty wallet
Creates a new loyalty wallet. Business logic runs in the legacy WAR. `code` is optional: when omitted the WAR assigns the next sequential company-scoped code (same rule as `POST /loyalty-wallets/new`). Optional `members` links customers on creation (`null` leaves empty; `[]` clears; list replaces). `counterpartyAccountId` sets the owner when `members` is omitted. Optional `pointsBalance` seeds an initial manual movement.
📄️ Bulk delete loyalty wallets
Removes every id in `ids` as a single all-or-nothing transaction.
📄️ Bulk patch loyalty wallets
Applies the same `patch` to every id in `ids` as a single all-or-nothing transaction. Editable fields: `enabled`, `description`.
📄️ Change loyalty wallet balance
Adds or removes points from the wallet via a manual ledger movement. REMOVE operations additionally require the `REMOVE_PUNTOS_MANUAL` permission on the legacy WAR side.
📄️ Change loyalty wallet members
Adds or removes a customer from the shared wallet without replacing the full `members` collection. Use `customerOwner=true` on ADD to set the owner.
📄️ Prototype loyalty wallet for a creation form
Returns a non-persisted loyalty wallet pre-populated with backend defaults (current company, next sequential `code`, `enabled=true`). Optional JSON hints: `companyId`. Call `POST /api/v2/loyalty-wallets` to persist.
📄️ List loyalty wallet transactions
Returns a paginated ledger of points movements for the given wallet. Supports the same RSQL `filter`, `sort`, `skip`/`limit` and `modifiedAfter`/`modifiedBefore` parameters as the main listing.