Main docs page Auth API Ordering API Menu API Venue API Inventory API Payment API Loyalty API Wallet API

Wallet2 API (1.0)

Download OpenAPI specification:Download

OrderingStack wallet2 API

Authentication

oauth2

Standard token auth

Security Scheme Type OAuth2

oauth2-client

Internal authorization between microservices

Security Scheme Type OAuth2

batch

expiredPaidBatches

Expired paid batches in period.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_REPORT)
query Parameters
year
required
integer <int32>
month
required
integer <int32>
header Parameters
x-tenant
string <uuid>

Responses

expiringPoints

Points expiring in near future.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_REPORT)
header Parameters
x-tenant
string <uuid>

Responses

addBatch

Create and add new batch of points. Batch can have expiration date and price for which points were bought..

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_BATCH)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
amount
required
number > 0
price
number > 0
expires
string <date-time>
order
string [ 0 .. 64 ] characters
object

Responses

report

expiredPaidBatches

Expired paid batches in period.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_REPORT)
query Parameters
year
required
integer <int32>
month
required
integer <int32>
header Parameters
x-tenant
string <uuid>

Responses

expiringPoints

Points expiring in near future.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_REPORT)
header Parameters
x-tenant
string <uuid>

Responses

reward

getReward

Get single reward data

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_REWARDS)
path Parameters
id
required
string <uuid>
Example: 9cbe650a-1fb7-4b06-912b-cead8a013e8b

Responses

upsertReward

Update reward data

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_REWARDS)
path Parameters
id
required
string <uuid>
Example: 9cbe650a-1fb7-4b06-912b-cead8a013e8b
Request Body schema: */*
name
required
string [ 3 .. 128 ] characters [\p{L}\p{N}_. -]+
visible
boolean

Visible in catalog and allowed to exchange for points by users themselves

object (Details)
availableFrom
string <date-time>
availableTo
string <date-time>
points
required
number > 0
maxCount
integer <int32> >= 1
priority
integer <int32> >= 0
required
object (CouponData)
tags
Array of strings [ 0 .. 16 ] items
object

Responses

deleteReward

Delete reward. Be careful as this is not reversible.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_REWARDS)
path Parameters
id
required
string <uuid>
Example: 9cbe650a-1fb7-4b06-912b-cead8a013e8b

Responses

getRewardsList

Get paginated list of rewards for administrative purposes. This endpoint is compatible with React AdminOnRest framework to provide DataSource.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_REWARDS)
query Parameters
required
object (RewardsFilter)

Responses

createReward

Create new reward

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_REWARDS)
Request Body schema: */*
name
required
string [ 3 .. 128 ] characters [\p{L}\p{N}_. -]+
visible
boolean

Visible in catalog and allowed to exchange for points by users themselves

object (Details)
availableFrom
string <date-time>
availableTo
string <date-time>
points
required
number > 0
maxCount
integer <int32> >= 1
priority
integer <int32> >= 0
required
object (CouponData)
tags
Array of strings [ 0 .. 16 ] items
object

Responses

getRewardsList_1

Get paginated list of rewards. This endpoint is compatible with React AdminOnRest framework to provide DataSource.

Authorizations:
query Parameters
required
object (RewardsFilter)

Responses

admin

getReward

Get single reward data

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_REWARDS)
path Parameters
id
required
string <uuid>
Example: 9cbe650a-1fb7-4b06-912b-cead8a013e8b

Responses

upsertReward

Update reward data

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_REWARDS)
path Parameters
id
required
string <uuid>
Example: 9cbe650a-1fb7-4b06-912b-cead8a013e8b
Request Body schema: */*
name
required
string [ 3 .. 128 ] characters [\p{L}\p{N}_. -]+
visible
boolean

Visible in catalog and allowed to exchange for points by users themselves

object (Details)
availableFrom
string <date-time>
availableTo
string <date-time>
points
required
number > 0
maxCount
integer <int32> >= 1
priority
integer <int32> >= 0
required
object (CouponData)
tags
Array of strings [ 0 .. 16 ] items
object

Responses

deleteReward

Delete reward. Be careful as this is not reversible.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_REWARDS)
path Parameters
id
required
string <uuid>
Example: 9cbe650a-1fb7-4b06-912b-cead8a013e8b

Responses

getRewardsList

Get paginated list of rewards for administrative purposes. This endpoint is compatible with React AdminOnRest framework to provide DataSource.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_REWARDS)
query Parameters
required
object (RewardsFilter)

Responses

createReward

Create new reward

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_REWARDS)
Request Body schema: */*
name
required
string [ 3 .. 128 ] characters [\p{L}\p{N}_. -]+
visible
boolean

Visible in catalog and allowed to exchange for points by users themselves

object (Details)
availableFrom
string <date-time>
availableTo
string <date-time>
points
required
number > 0
maxCount
integer <int32> >= 1
priority
integer <int32> >= 0
required
object (CouponData)
tags
Array of strings [ 0 .. 16 ] items
object

Responses

staff

addBatch

Create and add new batch of points. Batch can have expiration date and price for which points were bought..

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_BATCH)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
amount
required
number > 0
price
number > 0
expires
string <date-time>
order
string [ 0 .. 64 ] characters
object

Responses

markCouponUsed

Mark coupon used.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_COUPONS)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
coupon
required
string [ 0 .. 16 ] characters [a-zA-Z0-9_-]+

Responses

revertUsedCoupon

Revert coupon marked used.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_COUPONS)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
coupon
required
string [ 0 .. 16 ] characters [a-zA-Z0-9_-]+

Responses

createCoupon

Create new coupon.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_COUPONS)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
required
object (Details)
object (CouponData)
expires
string <date-time>

Responses

listCoupons

List coupons in wallet.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_COUPONS)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>

Responses

createOperation

New operation (usage of collected points)

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_OP)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
amount
required
number > 0
order
string [ 0 .. 64 ] characters
object

Responses

revertOperation

Operation rollback (points are returned to batches they were collected from).

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_OP)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
operation
required
string <uuid>

Responses

createVoucher

Create new voucher.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_VOUCHER)
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
expires
string <date-time>
pointsExpireInDays
integer <int32> >= 1
forWallet
string <uuid>
amount
required
number > 0
price
number > 0
object

Responses

useVoucher

Use voucher on wallet - add points

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_VOUCHER)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
voucher
required
string <uuid>

Responses

getWallet

Get wallet for specific user. If it is not created - get 404.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_ROROLE_VIEWWALLET)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>

Responses

putWallet

Update wallet for logged user. If wallet was not there - it is created.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLET)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>

Responses

postWallet

Create wallet for specific user. If wallet is already there - attributes are overwritten if they are provided and not empty.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLET)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>

Responses

coupon

couponFromReward

Create coupon from reward.

Authorizations:
Request Body schema: */*
reward
string <uuid>
count
integer <int32> [ 1 .. 99 ]

Responses

activateCoupon

Get coupons.

Authorizations:

Responses

markCouponUsed

Mark coupon used.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_COUPONS)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
coupon
required
string [ 0 .. 16 ] characters [a-zA-Z0-9_-]+

Responses

revertUsedCoupon

Revert coupon marked used.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_COUPONS)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
coupon
required
string [ 0 .. 16 ] characters [a-zA-Z0-9_-]+

Responses

createCoupon

Create new coupon.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_COUPONS)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
required
object (Details)
object (CouponData)
expires
string <date-time>

Responses

listCoupons

List coupons in wallet.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_COUPONS)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>

Responses

operation

createOperation

New operation (usage of collected points)

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_OP)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
amount
required
number > 0
order
string [ 0 .. 64 ] characters
object

Responses

revertOperation

Operation rollback (points are returned to batches they were collected from).

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_OP)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
operation
required
string <uuid>

Responses

voucher

createVoucher

Create new voucher.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_VOUCHER)
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
expires
string <date-time>
pointsExpireInDays
integer <int32> >= 1
forWallet
string <uuid>
amount
required
number > 0
price
number > 0
object

Responses

useVoucher

Use voucher on wallet - add points

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_VOUCHER)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
voucher
required
string <uuid>

Responses

useVoucherOnMyWallet

Use voucher on my wallet - add points

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_VOUCHER)
Request Body schema: */*
voucher
required
string <uuid>

Responses

wallet

getMyWallet

Get wallet for logged user (reduced data). If it is not created - get 404.

Authorizations:

Responses

createMyWallet

Create wallet for logged user. If wallet is already there - nothing happens.

Authorizations:

Responses

alterMyWalletExtra

Alter wallet extra info for logged user.

Authorizations:

Responses

getMyWalletExtended

Get wallet for logged user with extended info. If it is not created - get 404.

Authorizations:

Responses

getWallet

Get wallet for specific user. If it is not created - get 404.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLETROLE_WALLET_ROROLE_VIEWWALLET)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>

Responses

putWallet

Update wallet for logged user. If wallet was not there - it is created.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLET)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>

Responses

postWallet

Create wallet for specific user. If wallet is already there - attributes are overwritten if they are provided and not empty.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLET)
path Parameters
wallet
required
string <uuid>
header Parameters
x-tenant
string <uuid>

Responses