Skip to content

PERS-api Documentation (2.0.12)

PERS API Documentation

This RESTful API enables seamless integration of Web3 loyalty, token management, and engagement features into your applications.

Usage Guidelines:

  • RESTful Design: Resources are accessed via standard HTTP methods (GET, POST, PUT, DELETE) with predictable, resource-oriented URLs.
  • Authentication: Secure access is enforced via Bearer Tokens (JWT) and Project Keys (defining the Tenant context).
  • Data Format: All requests and responses utilize standard JSON formatting.

Explore the modules below for detailed endpoint specifications, schemas, and testing capabilities.

Download OpenAPI description
Overview
Languages
Servers
Mock server
https://docs.pers.ninja/_mock/swagger
Production API
https://api.pers.ninja/v2
Operations
Operations

Administrative Management

Administrative user management for tenant administrators. Handles admin authentication, permissions, and tenant-level administrative operations with secure access controls.
Admin Features:

•
Admin Authentication:
Secure admin login and session management

•
Permission Management:
Role-based access control for administrative functions

•
Tenant Administration:
Full tenant configuration and management capabilities

•
Security Controls:
Enhanced security measures for administrative access

•
Multi-Level Access:
Support for different administrative privilege levels

Request

ADMIN: Retrieve all admins associated with the current tenant

Security
authJWT
curl -i -X GET \
  https://docs.pers.ninja/_mock/swagger/admins \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Admins retrieved successfully

Bodyapplication/jsonArray [
idstringrequired

Id of the admin

emailstringrequired

Email of the admin

displayNameobjectrequired

Display name of the admin

typestringrequired

Type of the admin

Enum"SUPER_ADMIN""TENANT_ADMIN"
tenantsArray of objects(TenantDTO)

Tenant of the admin

]
Response
application/json
[ { "id": "string", "email": "string", "displayName": {}, "type": "SUPER_ADMIN", "tenants": [ … ] } ]

Request

ADMIN: Create a new admin or update an existing admin within the tenant scope

Security
authJWT
Bodyapplication/jsonrequired
emailstringrequired

Email of the admin

displayNamestring

Display name of the admin

typestringrequired

Type of the admin

Enum"SUPER_ADMIN""TENANT_ADMIN"
curl -i -X POST \
  https://docs.pers.ninja/_mock/swagger/admins \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "string",
    "displayName": "string",
    "type": "SUPER_ADMIN"
  }'

Responses

Admin created or updated successfully

Bodyapplication/json
idstringrequired

Id of the admin

emailstringrequired

Email of the admin

displayNameobjectrequired

Display name of the admin

typestringrequired

Type of the admin

Enum"SUPER_ADMIN""TENANT_ADMIN"
tenantsArray of objects(TenantDTO)

Tenant of the admin

Response
application/json
{ "id": "string", "email": "string", "displayName": {}, "type": "SUPER_ADMIN", "tenants": [ { … } ] }

Request

ADMIN: Associate or disassociate the specified admin with the current tenant. This affects admin tenant access.

Security
authJWT
Path
adminIdstringrequired
curl -i -X PUT \
  'https://docs.pers.ninja/_mock/swagger/admins/{adminId}/tenant' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Admin-tenant association updated successfully

Bodyapplication/json
idstringrequired

Id of the admin

emailstringrequired

Email of the admin

displayNameobjectrequired

Display name of the admin

typestringrequired

Type of the admin

Enum"SUPER_ADMIN""TENANT_ADMIN"
tenantsArray of objects(TenantDTO)

Tenant of the admin

Response
application/json
{ "id": "string", "email": "string", "displayName": {}, "type": "SUPER_ADMIN", "tenants": [ { … } ] }
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations