Snag Docs logo

Create Loyalty Transaction

Create a loyalty transaction to update account balances.

POSThttps://admin.snagsolutions.io/api/loyalty/transactions

Create a loyalty transaction to update account balances.

Loading code example
Loading code example

Authorizations

apiKeyAuthstringheaderrequired

API key passed in the header.

Body

Body

descriptionstringrequired

Description of the loyalty transaction

entriesarray<object>required

Array of transaction entries

entries.walletAddressstring

The wallet address of the user

entries.direction"credit" | "debit"

Direction of the transaction entry for this wallet address

Allowed values: "credit" | "debit"
entries.amountnumberrequired

Transaction entry amount.

entries.idempotencyKeystring

Idempotency key for the transaction entry. Creation will fail if already exists for this wallet address.

Length: <= 32
entries.loyaltyCurrencyIdstring<uuid>

Unique identifier for the loyalty currency for the wallet. Can only use entry-level currency or transaction-level currency.

loyaltyCurrencyIdstring<uuid>

Unique identifier for the loyalty currency

websiteIdstring<uuid>
organizationIdstring<uuid>

Response

application/json

200

idstring<uuid>required
descriptionstringrequired
entriesarray<object>required
entries.walletAddressstringrequired
entries.amountnumberrequired
entries.direction"credit" | "debit"required

Direction of the transaction entry

Allowed values: "credit" | "debit"
entries.idempotencyKeystring
createdAtstringrequired
updatedAtstringrequired