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

Wallet API (1.0)

Download OpenAPI specification:Download

OrderingStack wallet API

Authentication

oauth2

Standard token auth

Security Scheme Type OAuth2

oauth2-client

Internal authorization between microservices

Security Scheme Type OAuth2

rewards

getReward

Get reward by id.

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

Responses

updateReward

Update reward by id.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_REWARDS)
path Parameters
reward
required
string <uuid>
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
code
string [ 1 .. 32 ] characters
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
product
required
string
productConfig
object
tags
Array of strings
object

Responses

deleteReward

Delete reward by id.

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

Responses

insertReward

Insert reward by id.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_REWARDS)
header Parameters
x-tenant
string <uuid>
Request Body schema: */*
code
string [ 1 .. 32 ] characters
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
product
required
string
productConfig
object
tags
Array of strings
object

Responses

getRewards

Get rewards (supports pagination).

Authorizations:
query Parameters
required
object (RewardsFilter)
header Parameters
x-tenant
string <uuid>

Responses

report

getAggregatedReport

Get aggregated report. This endpoint is compatible with React AdminOnRest framework to provide DataSource.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLET)
query Parameters
required
object (AggregateFilter)

Responses

expiredPaidBatches

Expired paid batches in period.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLET)
query Parameters
from
required
string <date-time>
to
required
string <date-time>
header Parameters
x-tenant
string <uuid>

Responses

expiringPoints

Points expiring in near future.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLET)
query Parameters
to
required
string <date-time>
header Parameters
x-tenant
string <uuid>

Responses

walletsReport

Wallets report.

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

Responses

vouchers

Vouchers in period.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLET)
query Parameters
from
required
string <date-time>
to
required
string <date-time>
header Parameters
x-tenant
string <uuid>

Responses

batch

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

expiredPaidBatches

Expired paid batches in period.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLET)
query Parameters
from
required
string <date-time>
to
required
string <date-time>
header Parameters
x-tenant
string <uuid>

Responses

expiringPoints

Points expiring in near future.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLET)
query Parameters
to
required
string <date-time>
header Parameters
x-tenant
string <uuid>

Responses

user

getMyBatches

Get active batches for my wallet. This endpoint is compatible with React AdminOnRest framework to provide DataSource.

Authorizations:
query Parameters
required
object (MyBatchesFilter)

Responses

getMyOperations

Get operations for my wallet. This endpoint is compatible with React AdminOnRest framework to provide DataSource.

Authorizations:
query Parameters
required
object (MyOperationsFilter)

Responses

operation

addOperation

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

rollbackOperation

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: */*
string <uuid>

Responses

wallet

walletsReport

Wallets report.

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

Responses

getMyWallet

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

Authorizations:

Responses

createMyWallet

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

Authorizations:

Responses

getWallet

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

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLET)
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>
Request Body schema: */*
property name*
string

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>
Request Body schema: */*
property name*
string

Responses

voucher

vouchers

Vouchers in period.

Authorizations:
oauth2-clientoauth2 (ROLE_SUROLE_WALLET)
query Parameters
from
required
string <date-time>
to
required
string <date-time>
header Parameters
x-tenant
string <uuid>

Responses

createVoucher

Create new voucher. Expiration date for voucher can be provided (it also applies to batch of points from that voucher). Additionaly points can last for specified number of days after voucher usage.

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

Responses

getVoucher

Get voucher details.

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

Responses

useVoucherOnMyWallet

Use voucher on logged user wallet

Authorizations:
Request Body schema: */*
voucher
required
string <uuid>

Responses

useVoucher

Use voucher on specific wallet

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