Skip to content

REST API v2. Authenticate with a Bearer JWT in the Authorization header unless an endpoint is marked public.

Servers​

https://v2-staging.tscheckout.comCurrent host

Get a list of stored value codes​

GET
/api/v2/stored-value-codes

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Query Parameters

status

Filter by status

Type
string
Valid values
"active""inactive""soldOut""expired"
Example"active"
expired

Filter by expired codes (true/1 for expired, false/0 for active)

Example"true"

Responses​

Stored value code list

application/json
JSON
{
  
"count": 10,
  
"totalCount": 25,
  
"limit": 50,
  
"offset": 25,
  
"data": [
  
]
}

Playground​

Authorization
Variables
Key
Value

Samples​


Create stored value code​

POST
/api/v2/stored-value-codes

Create stored value code

Authorizations​

bearerAuth
Type
HTTP (bearer)

Request Body​

application/json
JSON
"string"

Responses​

Stored value code created

application/json
JSON
{
  
"data": "string"
}

Playground​

Authorization
Body

Samples​


Get stored value code by ID​

GET
/api/v2/stored-value-codes/{id}

Return a single stored value code

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*

Stored value code ID

Type
integer
Required
Format
"int64"

Responses​

Stored value code

application/json
JSON
{
  
"data": "string"
}

Playground​

Authorization
Variables
Key
Value

Samples​


Delete stored value code​

DELETE
/api/v2/stored-value-codes/{id}

Soft delete stored value code by URL path id

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*

Stored value code ID

Type
integer
Required
Format
"int64"

Responses​

Stored value code deleted

Playground​

Authorization
Variables
Key
Value

Samples​


Update stored value code​

PATCH
/api/v2/stored-value-codes/{id}

Update stored value code by id in request body

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*

Stored value code ID

Type
integer
Required
Format
"int64"

Request Body​

application/json
JSON
"string"

Responses​

Stored value code updated

application/json
JSON
{
  
"data": "string"
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​


Bulk delete stored value codes​

POST
/api/v2/stored-value-codes/bulk-delete

Soft delete multiple stored value codes

Authorizations​

bearerAuth
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
  
"ids": [
  
  
[
  
  
  
1,
  
  
  
2,
  
  
  
3
  
  
]
  
]
}

Responses​

Stored value codes deleted

Playground​

Authorization
Body

Samples​


GET /api/v2/stored-value-code/​

GET
/api/v2/stored-value-code/

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Query Parameters

search

Limit to results matching this search string

Type
string
limit

Limit Results to this number

Type
integer
Format
"int64"
offset

Skip this number of results

Type
integer
Format
"int64"

Responses​

Playground​

Authorization
Variables
Key
Value

Samples​


GET /api/v2/stored-value-code/{id}​

GET
/api/v2/stored-value-code/{id}

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*

ID of stored value code to retrieve

Type
integer
Required
Format
"int64"

Responses​

Playground​

Authorization
Variables
Key
Value

Samples​


Create a new StoredValueCode​

POST
/api/v2/stored-value-code

Creates a new Stored Value Code from the data POSTed

Authorizations​

bearerAuth
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
  
"code": "RefundCredit-SamGoodman-Order12",
  
"discount": 28,
  
"active": true,
  
"activeFrom": 1704067200,
  
"activeTo": 1704067200,
  
"description": "Credit provided for excellent attendance"
}

Responses​

Playground​

Authorization
Body

Samples​


Powered by VitePress OpenAPI