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

List affiliates​

GET
/api/v2/affiliates

Returns a list of affiliates

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Query Parameters

isFrontEndUser

Filter by frontend-linked affiliate. 1/true = frontendUserId > 0 (referrer picker). 0/false = admin-created only (frontendUserId = 0). Omit for all.

Type
integer
Valid values
01

Responses​

Affiliate list

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

Playground​

Authorization
Variables
Key
Value

Samples​


Create affiliate​

POST
/api/v2/affiliates

Create a new affiliate

Authorizations​

bearerAuth
Type
HTTP (bearer)

Request Body​

application/json
JSON
"string"

Responses​

Created affiliate

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

Playground​

Authorization
Body

Samples​


Get affiliate by ID​

GET
/api/v2/affiliates/{id}

Returns a single affiliate by ID

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*

Affiliate ID

Type
integer
Required
Format
"int64"

Responses​

Affiliate object

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

Playground​

Authorization
Variables
Key
Value

Samples​


Delete affiliate​

DELETE
/api/v2/affiliates/{id}

Delete an affiliate

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*

Affiliate ID

Type
integer
Required
Format
"int64"

Responses​

Affiliate deleted successfully

Playground​

Authorization
Variables
Key
Value

Samples​


Update affiliate​

PATCH
/api/v2/affiliates/{id}

Update an existing affiliate

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*

Affiliate ID

Type
integer
Required
Format
"int64"

Request Body​

application/json
JSON
"string"

Responses​

Updated affiliate

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

Playground​

Authorization
Variables
Key
Value
Body

Samples​


Delete multiple affiliates​

POST
/api/v2/affiliates/bulk-delete

Deletes multiple affiliates

Authorizations​

bearerAuth
Type
HTTP (bearer)

Request Body​

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

Responses​

Affiliates deleted successfully

Playground​

Authorization
Body

Samples​


Powered by VitePress OpenAPI