Snag Docs logo

Create a loyalty currency

Create a loyalty currency

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

Create a loyalty currency

Loading code example
Loading code example

Authorizations

apiKeyAuthstringheaderrequired

API key passed in the header.

Body

Body

organizationIdstring<uuid>required

Unique identifier for the organization

websiteIdstring<uuid>required

Unique identifier for the website

imageUrlstring

URL of the image; must start with AWS S3 asset URL base

namestringrequired

Name of the loyalty currency

symbolstringrequired

Symbol representing the loyalty currency

decimalsnumberrequired

Number of decimal places for the currency

Required range: x >= 0
apiGetUrlstring

Optional API GET URL for fetching data

Length: >= 1
apiGetTransactionEntryUrlstring

Optional API GET URL for fetching transaction entry data

Length: >= 1
apiPostUrlstring

Optional API POST URL for sending data

Length: >= 1
sortIdnumber

Optional sorting identifier

apiAuthType"none" | "basic" | "bearer" | "apiKey"

Type of authentication used for API

Allowed values: "none" | "basic" | "bearer" | "apiKey"
apiAuthKeystring

Authentication key for API

Length: >= 1
apiAuthValuestring

Authentication value for API

Length: >= 1

Response

application/json

200

idstring<uuid>required

Unique identifier for the loyalty currency

organizationIdstring<uuid>required

Unique identifier for the organization

websiteIdstring<uuid>required

Unique identifier for the website

imageUrlstringrequired

URL of the image

namestringrequired

Name of the loyalty currency

symbolstringrequired

Symbol representing the loyalty currency

decimalsnumberrequired

Number of decimal places for the currency

Required range: x >= 0
createdByIdstring<uuid>required

ID of the user who created the currency

createdAtstring<date-time>required

Timestamp when the currency was created

updatedAtstring<date-time>required

Timestamp when the currency was last updated

apiGetUrlstringrequired

API GET URL for fetching data

apiGetTransactionEntryUrlstringrequired

API GET URL for fetching transaction entry data

apiPostUrlstringrequired

API POST URL for sending data

apiAuthType"none" | "basic" | "bearer" | "apiKey"required

Type of authentication used for API

Allowed values: "none" | "basic" | "bearer" | "apiKey"
apiAuthKeystringrequired

Authentication key for API

apiAuthValuestringrequired

Authentication value for API

sortIdnumberrequired

Sorting identifier

deletedAtstring<date-time>required

Timestamp when the currency was deleted, if applicable

isTokenRewardCurrencyboolean

True for LoyaltyCurrency rows auto-created by resolveTokenReward (Option 1 hidden currency backing a token-reward rule). Excluded from list responses by default; opt in via excludeTokenRewardCurrencies=false on the list endpoint.