Lunchbox User Wallet API
Create, search, retrieve, update, validate, confirm, refund, and adjust loyalty user wallets.
Create, search, retrieve, update, validate, confirm, refund, and adjust loyalty user wallets.
openapi: 3.0.3
info:
title: Lunchbox Core Customer User Wallet API
description: 'The Lunchbox 2.0 Core API is used for interfacing with Lunchbox ordering functions and building frontend interfaces that interact with the variety of Lunchbox integrations: POS, Last Mile, Loyalty, Marketing, Gift Card and more. It exposes customer (guest) account management, store and menu data, order creation and item management, discounts, payments, group ordering, and order webhooks. The API uses standard HTTP status codes and all schemas are in JSON format.'
version: '2.0'
contact:
name: Lunchbox Support
email: support@lunchbox.io
url: https://docs.lunchbox.io/
termsOfService: https://lunchbox.io/
servers:
- url: https://{chain_name}.lunchbox.io/api/v2
description: Per-chain Lunchbox 2.0 Core API base URL
variables:
chain_name:
default: chain
description: The restaurant chain's Lunchbox subdomain
security:
- tokenAuth: []
tags:
- name: User Wallet
description: Create, search, retrieve, update, validate, confirm, refund, and adjust loyalty user wallets.
paths:
/loyalty-engine/user-wallets:
post:
tags:
- User Wallet
summary: Lunchbox Create a User Wallet
operationId: createUserWallet
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UserWalletCreate'
example:
firstName: John
lastName: Smith
birthdate: '1990-05-21'
email: john.smith@example.com
phone: '2125551234'
responses:
'201':
description: User wallet created.
content:
application/json:
schema:
$ref: '#/components/schemas/UserWallet'
examples:
CreateUserWallet201Example:
summary: Default createUserWallet 201 response
x-microcks-default: true
value: {}
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
get:
tags:
- User Wallet
summary: Lunchbox Search User Wallets
operationId: searchUserWallets
responses:
'200':
description: Matching user wallets.
content:
application/json:
schema:
type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/UserWallet'
examples:
SearchUserWallets200Example:
summary: Default searchUserWallets 200 response
x-microcks-default: true
value: {}
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/loyalty-engine/user-wallets/{user_wallet_id}:
parameters:
- $ref: '#/components/parameters/UserWalletId'
get:
tags:
- User Wallet
summary: Lunchbox Get a User Wallet
operationId: getUserWallet
responses:
'200':
description: The requested user wallet.
content:
application/json:
schema:
$ref: '#/components/schemas/UserWallet'
examples:
GetUserWallet200Example:
summary: Default getUserWallet 200 response
x-microcks-default: true
value: {}
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
patch:
tags:
- User Wallet
summary: Lunchbox Update a User Wallet
operationId: updateUserWallet
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UserWalletUpdate'
examples:
UpdateUserWalletRequestExample:
summary: Default updateUserWallet request
x-microcks-default: true
value: {}
responses:
'200':
description: User wallet updated.
content:
application/json:
schema:
$ref: '#/components/schemas/UserWallet'
examples:
UpdateUserWallet200Example:
summary: Default updateUserWallet 200 response
x-microcks-default: true
value: {}
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/loyalty-engine/user-wallets/{user_wallet_id}/confirm:
parameters:
- $ref: '#/components/parameters/UserWalletId'
post:
tags:
- User Wallet
summary: Lunchbox Confirm a Wallet Transaction
operationId: confirmUserWallet
responses:
'200':
description: Transaction confirmed.
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/loyalty-engine/user-wallets/{user_wallet_id}/validate:
parameters:
- $ref: '#/components/parameters/UserWalletId'
post:
tags:
- User Wallet
summary: Lunchbox Validate a Wallet Transaction
operationId: validateUserWallet
responses:
'200':
description: Transaction validated.
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/loyalty-engine/user-wallets/{user_wallet_id}/refund:
parameters:
- $ref: '#/components/parameters/UserWalletId'
post:
tags:
- User Wallet
summary: Lunchbox Refund a Wallet Transaction
operationId: refundUserWallet
responses:
'200':
description: Transaction refunded.
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/loyalty-engine/user-wallets/{user_wallet_id}/adjust:
parameters:
- $ref: '#/components/parameters/UserWalletId'
patch:
tags:
- User Wallet
summary: Lunchbox Adjust a Wallet Balance
operationId: adjustUserWallet
responses:
'200':
description: Wallet balance adjusted.
content:
application/json:
schema:
$ref: '#/components/schemas/UserWallet'
examples:
AdjustUserWallet200Example:
summary: Default adjustUserWallet 200 response
x-microcks-default: true
value: {}
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
components:
schemas:
UserWallet:
type: object
properties:
id:
type: string
format: uuid
example: 130945e3-2b24-4530-a696-3b2c6977ba1c
merchantId:
type: string
format: uuid
example: 130945e3-2b24-4530-a696-3b2c6977ba1c
email:
type: string
format: email
example: demo@lunchbox.io
firstName:
type: string
example: John
lastName:
type: string
example: Smith
phone:
type: string
example: '2125551411'
birthdate:
type: string
format: date-time
nullable: true
example: '2023-07-25T06:00:00-04:00'
pointsBalance:
type: integer
example: 1
creditsBalance:
type: integer
example: 1
lifetimePointsBalance:
type: integer
example: 1
isActive:
type: boolean
example: true
lastBirthdayYear:
type: integer
nullable: true
example: 1
createdAt:
type: string
format: date-time
example: '2023-07-25T06:00:00-04:00'
updatedAt:
type: string
format: date-time
example: '2023-07-25T06:00:00-04:00'
walletRewards:
type: array
items:
$ref: '#/components/schemas/WalletReward'
example: []
UserWalletCreate:
type: object
required:
- email
properties:
firstName:
type: string
example: John
lastName:
type: string
example: Smith
birthdate:
type: string
format: date
example: '1990-05-21'
email:
type: string
format: email
example: demo@lunchbox.io
phone:
type: string
example: '2125551411'
WalletReward:
type: object
properties:
id:
type: string
format: uuid
example: 130945e3-2b24-4530-a696-3b2c6977ba1c
UserWalletUpdate:
type: object
properties:
firstName:
type: string
example: John
lastName:
type: string
example: Smith
birthdate:
type: string
format: date
example: '1990-05-21'
phone:
type: string
example: '2125551411'
parameters:
UserWalletId:
name: user_wallet_id
in: path
required: true
schema:
type: string
format: uuid
securitySchemes:
tokenAuth:
type: apiKey
in: header
name: Authorization
description: 'Team token passed as: Authorization: Token <team_token>'