REST API GUIDE

airbnb-platformadmin-service

Version: 1.0.69

Administrative and compliance management backend for moderation, audit, dispute, financial oversight, localization, and GDPR in the Airbnb-style rental platform.

Architectural Design Credit and Contact Information

The architectural design of this microservice is credited to . For inquiries, feedback, or further information regarding the architecture, please direct your communication to:

Email:

We encourage open communication and welcome any questions or discussions related to the architectural aspects of this microservice.

Documentation Scope

Welcome to the official documentation for the PlatformAdmin Service’s REST API. This document is designed to provide a comprehensive guide to interfacing with our PlatformAdmin Service exclusively through RESTful API endpoints.

Intended Audience

This documentation is intended for developers and integrators who are looking to interact with the PlatformAdmin Service via HTTP requests for purposes such as creating, updating, deleting and querying PlatformAdmin objects.

Overview

Within these pages, you will find detailed information on how to effectively utilize the REST API, including authentication methods, request and response formats, endpoint descriptions, and examples of common use cases.

Beyond REST It’s important to note that the PlatformAdmin Service also supports alternative methods of interaction, such as gRPC and messaging via a Message Broker. These communication methods are beyond the scope of this document. For information regarding these protocols, please refer to their respective documentation.

Authentication And Authorization

To ensure secure access to the PlatformAdmin service’s protected endpoints, a project-wide access token is required. This token serves as the primary method for authenticating requests to our service. However, it’s important to note that access control varies across different routes:

Protected API: Certain API (routes) require specific authorization levels. Access to these routes is contingent upon the possession of a valid access token that meets the route-specific authorization criteria. Unauthorized requests to these routes will be rejected.

**Public API **: The service also includes public API (routes) that are accessible without authentication. These public endpoints are designed for open access and do not require an access token.

Token Locations

When including your access token in a request, ensure it is placed in one of the following specified locations. The service will sequentially search these locations for the token, utilizing the first one it encounters.

Location Token Name / Param Name
Query access_token
Authorization Header Bearer
Header airbnb3-access-token
Cookie airbnb3-access-token

Please ensure the token is correctly placed in one of these locations, using the appropriate label as indicated. The service prioritizes these locations in the order listed, processing the first token it successfully identifies.

Api Definitions

This section outlines the API endpoints available within the PlatformAdmin service. Each endpoint can receive parameters through various methods, meticulously described in the following definitions. It’s important to understand the flexibility in how parameters can be included in requests to effectively interact with the PlatformAdmin service.

This service is configured to listen for HTTP requests on port 3003, serving both the main API interface and default administrative endpoints.

The following routes are available by default:

This service is accessible via the following environment-specific URLs:

Parameter Inclusion Methods: Parameters can be incorporated into API requests in several ways, each with its designated location. Understanding these methods is crucial for correctly constructing your requests:

Query Parameters: Included directly in the URL’s query string.

Path Parameters: Embedded within the URL’s path.

Body Parameters: Sent within the JSON body of the request.

Session Parameters: Automatically read from the session object. This method is used for parameters that are intrinsic to the user’s session, such as userId. When using an API that involves session parameters, you can omit these from your request. The service will automatically bind them to the API layer, provided that a session is associated with your request.

Note on Session Parameters: Session parameters represent a unique method of parameter inclusion, relying on the context of the user’s session. A common example of a session parameter is userId, which the service automatically associates with your request when a session exists. This feature ensures seamless integration of user-specific data without manual input for each request.

By adhering to the specified parameter inclusion methods, you can effectively utilize the PlatformAdmin service’s API endpoints. For detailed information on each endpoint, including required parameters and their accepted locations, refer to the individual API definitions below.

Common Parameters

The PlatformAdmin service’s business API support several common parameters designed to modify and enhance the behavior of API requests. These parameters are not individually listed in the API route definitions to avoid repetition. Instead, refer to this section to understand how to leverage these common behaviors across different routes. Note that all common parameters should be included in the query part of the URL.

Supported Common Parameters:

By utilizing these common parameters, you can tailor the behavior of API requests to suit your specific requirements, ensuring optimal performance and usability of the PlatformAdmin service.

Error Response

If a request encounters an issue, whether due to a logical fault or a technical problem, the service responds with a standardized JSON error structure. The HTTP status code within this response indicates the nature of the error, utilizing commonly recognized codes for clarity:

Each error response is structured to provide meaningful insight into the problem, assisting in diagnosing and resolving issues efficiently.

{
  "result": "ERR",
  "status": 400,
  "message": "errMsg_organizationIdisNotAValidID",
  "errCode": 400,
  "date": "2024-03-19T12:13:54.124Z",
  "detail": "String"
}

Object Structure of a Successfull Response

When the PlatformAdmin service processes requests successfully, it wraps the requested resource(s) within a JSON envelope. This envelope not only contains the data but also includes essential metadata, such as configuration details and pagination information, to enrich the response and provide context to the client.

Key Characteristics of the Response Envelope:

Design Considerations: The structure of a API’s response data is meticulously crafted during the service’s architectural planning. This design ensures that responses adequately reflect the intended data relationships and service logic, providing clients with rich and meaningful information.

Brief Data: Certain API’s return a condensed version of the object data, intentionally selecting only specific fields deemed useful for that request. In such instances, the API documentation will detail the properties included in the response, guiding developers on what to expect.

API Response Structure

The API utilizes a standardized JSON envelope to encapsulate responses. This envelope is designed to consistently deliver both the requested data and essential metadata, ensuring that clients can efficiently interpret and utilize the response.

HTTP Status Codes:

Success Response Format:

For successful operations, the response includes a "status": "OK" property, signaling the successful execution of the request. The structure of a successful response is outlined below:

{
  "status":"OK",
  "statusCode": 200,   
  "elapsedMs":126,
  "ssoTime":120,
  "source": "db",
  "cacheKey": "hexCode",
  "userId": "ID",
  "sessionId": "ID",
  "requestId": "ID",
  "dataName":"products",
  "method":"GET",
  "action":"list",
  "appVersion":"Version",
  "rowCount":3
  "products":[{},{},{}],
  "paging": {
    "pageNumber":1, 
    "pageRowCount":25, 
    "totalRowCount":3,
    "pageCount":1
  },
  "filters": [],
  "uiPermissions": []
}

Handling Errors:

For details on handling error scenarios and understanding the structure of error responses, please refer to the “Error Response” section provided earlier in this documentation. It outlines how error conditions are communicated, including the use of HTTP status codes and standardized JSON structures for error messages.

Resources

PlatformAdmin service provides the following resources which are stored in its own database as a data object. Note that a resource for an api access is a data object for the service.

LocalizationSetting resource

Resource Definition : Admin-configured valid languages/currencies for site usage and preference. LocalizationSetting Resource Properties

Name Type Required Default Definition
languageCode String **
effectiveFrom Date **
effectiveTo Date **
currencyCode String **
isCurrencyActive Boolean **

AdminDisputeAction resource

Resource Definition : Record of an admin's moderation/decision action on a dispute. AdminDisputeAction Resource Properties

Name Type Required Default Definition
disputeId ID **
actionTaken String **
notes Text **
adminId ID **
outcome String **
actionDate Date **

ApiKey resource

Resource Definition : Admin-generated API key for internal/external integration—has revocation, audit trail. ApiKey Resource Properties

Name Type Required Default Definition
key String **
active Boolean **
description String **
revokedAt Date **
createdBy ID **

FinancialReport resource

Resource Definition : System-generated or admin-generated report snapshots of platform financials for a given period (GDPR/tax). FinancialReport Resource Properties

Name Type Required Default Definition
period String **
cityTaxByLocation Object **
totalPayouts Double **
createdBy ID **
totalRefunds Double **
currency String **
generatedAt Date **
totalRevenue Double **

AuditLog resource

Resource Definition : Immutable audit log for recording sensitive admin actions and platform changes. AuditLog Resource Properties

Name Type Required Default Definition
performedBy ID **
objectId ID **
details Object **
ipAddress String **
actionObject String **
occurredAt Date **
actionType String **

GdprAction resource

Resource Definition : Record of individual user GDPR/consent/export/delete request flow. Used for logs, compliance, and controls. GdprAction Resource Properties

Name Type Required Default Definition
requestedAt Date **
status Enum **
actionType String **
userId ID **
processedAt Date **

Enum Properties

Enum properties are represented as strings in the database. The values are mapped to their corresponding names in the application layer.

status Enum Property

Enum Options

Name Value Index
pending "pending"" 0
complete "complete"" 1
failed "failed"" 2

Business Api

Get Auditlog API

Fetch audit log entry by ID (admin only).

Rest Route

The getAuditLog API REST controller can be triggered via the following route:

/v1/auditlogs/:auditLogId

Rest Request Parameters

The getAuditLog api has got 1 regular request parameter

Parameter Type Required Population
auditLogId ID true request.params?.[“auditLogId”]
auditLogId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/auditlogs/:auditLogId

  axios({
    method: 'GET',
    url: `/v1/auditlogs/${auditLogId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "auditLog",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"auditLog": {
		"id": "ID",
		"performedBy": "ID",
		"objectId": "ID",
		"details": "Object",
		"ipAddress": "String",
		"actionObject": "String",
		"occurredAt": "Date",
		"actionType": "String",
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID",
		"isActive": true
	}
}

Get Financialreport API

Retrieve financial/tax report snapshot by ID (admin only).

Rest Route

The getFinancialReport API REST controller can be triggered via the following route:

/v1/financialreports/:financialReportId

Rest Request Parameters

The getFinancialReport api has got 1 regular request parameter

Parameter Type Required Population
financialReportId ID true request.params?.[“financialReportId”]
financialReportId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/financialreports/:financialReportId

  axios({
    method: 'GET',
    url: `/v1/financialreports/${financialReportId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "financialReport",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"financialReport": {
		"id": "ID",
		"period": "String",
		"cityTaxByLocation": "Object",
		"totalPayouts": "Double",
		"createdBy": "ID",
		"totalRefunds": "Double",
		"currency": "String",
		"generatedAt": "Date",
		"totalRevenue": "Double",
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID",
		"isActive": true
	}
}

Create Financialreport API

Snapshot financial and tax data for a period. Immutable after creation.

Rest Route

The createFinancialReport API REST controller can be triggered via the following route:

/v1/financialreports

Rest Request Parameters

The createFinancialReport api has got 7 regular request parameters

Parameter Type Required Population
period String true request.body?.[“period”]
cityTaxByLocation Object false request.body?.[“cityTaxByLocation”]
totalPayouts Double true request.body?.[“totalPayouts”]
createdBy ID true request.body?.[“createdBy”]
totalRefunds Double true request.body?.[“totalRefunds”]
currency String true request.body?.[“currency”]
totalRevenue Double true request.body?.[“totalRevenue”]
period :
cityTaxByLocation :
totalPayouts :
createdBy :
totalRefunds :
currency :
totalRevenue :

REST Request To access the api you can use the REST controller with the path POST /v1/financialreports

  axios({
    method: 'POST',
    url: '/v1/financialreports',
    data: {
            period:"String",  
            cityTaxByLocation:"Object",  
            totalPayouts:"Double",  
            createdBy:"ID",  
            totalRefunds:"Double",  
            currency:"String",  
            totalRevenue:"Double",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "financialReport",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"financialReport": {
		"id": "ID",
		"period": "String",
		"cityTaxByLocation": "Object",
		"totalPayouts": "Double",
		"createdBy": "ID",
		"totalRefunds": "Double",
		"currency": "String",
		"generatedAt": "Date",
		"totalRevenue": "Double",
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID",
		"isActive": true
	}
}

List Auditlogs API

List audit log entries (admin only). Filterable by type, performer, object, date.

Rest Route

The listAuditLogs API REST controller can be triggered via the following route:

/v1/auditlogs

Rest Request Parameters

Filter Parameters

The listAuditLogs api supports 5 optional filter parameters for filtering list results:

performedBy (ID): Filter by performedBy

objectId (ID): Filter by objectId

actionObject (String): Filter by actionObject

occurredAt (Date): Filter by occurredAt

actionType (String): Filter by actionType

REST Request To access the api you can use the REST controller with the path GET /v1/auditlogs

  axios({
    method: 'GET',
    url: '/v1/auditlogs',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // performedBy: '<value>' // Filter by performedBy
        // objectId: '<value>' // Filter by objectId
        // actionObject: '<value>' // Filter by actionObject
        // occurredAt: '<value>' // Filter by occurredAt
        // actionType: '<value>' // Filter by actionType
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "auditLogs",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"auditLogs": [
		{
			"id": "ID",
			"performedBy": "ID",
			"objectId": "ID",
			"details": "Object",
			"ipAddress": "String",
			"actionObject": "String",
			"occurredAt": "Date",
			"actionType": "String",
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID",
			"isActive": true
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

List Financialreports API

List period financial/tax reports for admin/AUDIT purposes.

Rest Route

The listFinancialReports API REST controller can be triggered via the following route:

/v1/financialreports

Rest Request Parameters

Filter Parameters

The listFinancialReports api supports 1 optional filter parameter for filtering list results:

period (String): Filter by period

REST Request To access the api you can use the REST controller with the path GET /v1/financialreports

  axios({
    method: 'GET',
    url: '/v1/financialreports',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // period: '<value>' // Filter by period
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "financialReports",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"financialReports": [
		{
			"id": "ID",
			"period": "String",
			"cityTaxByLocation": "Object",
			"totalPayouts": "Double",
			"createdBy": "ID",
			"totalRefunds": "Double",
			"currency": "String",
			"generatedAt": "Date",
			"totalRevenue": "Double",
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID",
			"isActive": true
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Create Auditlog API

Record an admin/platform action/event in the audit log. Called from side-effect flows, not direct user.

Rest Route

The createAuditLog API REST controller can be triggered via the following route:

/v1/auditlogs

Rest Request Parameters

The createAuditLog api has got 6 regular request parameters

Parameter Type Required Population
performedBy ID true request.body?.[“performedBy”]
objectId ID false request.body?.[“objectId”]
details Object false request.body?.[“details”]
ipAddress String false request.body?.[“ipAddress”]
actionObject String true request.body?.[“actionObject”]
actionType String true request.body?.[“actionType”]
performedBy :
objectId :
details :
ipAddress :
actionObject :
actionType :

REST Request To access the api you can use the REST controller with the path POST /v1/auditlogs

  axios({
    method: 'POST',
    url: '/v1/auditlogs',
    data: {
            performedBy:"ID",  
            objectId:"ID",  
            details:"Object",  
            ipAddress:"String",  
            actionObject:"String",  
            actionType:"String",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "auditLog",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"auditLog": {
		"id": "ID",
		"performedBy": "ID",
		"objectId": "ID",
		"details": "Object",
		"ipAddress": "String",
		"actionObject": "String",
		"occurredAt": "Date",
		"actionType": "String",
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID",
		"isActive": true
	}
}

Create Localizationsetting API

Add a supported language/currency for global usage.

Rest Route

The createLocalizationSetting API REST controller can be triggered via the following route:

/v1/localizationsettings

Rest Request Parameters

The createLocalizationSetting api has got 5 regular request parameters

Parameter Type Required Population
languageCode String true request.body?.[“languageCode”]
effectiveFrom Date false request.body?.[“effectiveFrom”]
effectiveTo Date false request.body?.[“effectiveTo”]
currencyCode String true request.body?.[“currencyCode”]
isCurrencyActive Boolean true request.body?.[“isCurrencyActive”]
languageCode :
effectiveFrom :
effectiveTo :
currencyCode :
isCurrencyActive :

REST Request To access the api you can use the REST controller with the path POST /v1/localizationsettings

  axios({
    method: 'POST',
    url: '/v1/localizationsettings',
    data: {
            languageCode:"String",  
            effectiveFrom:"Date",  
            effectiveTo:"Date",  
            currencyCode:"String",  
            isCurrencyActive:"Boolean",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "localizationSetting",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"localizationSetting": {
		"id": "ID",
		"languageCode": "String",
		"effectiveFrom": "Date",
		"effectiveTo": "Date",
		"currencyCode": "String",
		"isCurrencyActive": "Boolean",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Admindisputeactions API

List all moderation/decision records by admins for disputes. Filter by disputeId/adminId.

Rest Route

The listAdminDisputeActions API REST controller can be triggered via the following route:

/v1/admindisputeactions

Rest Request Parameters

Filter Parameters

The listAdminDisputeActions api supports 2 optional filter parameters for filtering list results:

disputeId (ID): Filter by disputeId

adminId (ID): Filter by adminId

REST Request To access the api you can use the REST controller with the path GET /v1/admindisputeactions

  axios({
    method: 'GET',
    url: '/v1/admindisputeactions',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // disputeId: '<value>' // Filter by disputeId
        // adminId: '<value>' // Filter by adminId
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "adminDisputeActions",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"adminDisputeActions": [
		{
			"id": "ID",
			"disputeId": "ID",
			"actionTaken": "String",
			"notes": "Text",
			"adminId": "ID",
			"outcome": "String",
			"actionDate": "Date",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Create Admindisputeaction API

Admin records moderation/decision action on a dispute (creates audit log as side effect).

Rest Route

The createAdminDisputeAction API REST controller can be triggered via the following route:

/v1/admindisputeactions

Rest Request Parameters

The createAdminDisputeAction api has got 5 regular request parameters

Parameter Type Required Population
disputeId ID true request.body?.[“disputeId”]
actionTaken String true request.body?.[“actionTaken”]
notes Text false request.body?.[“notes”]
adminId ID true request.body?.[“adminId”]
outcome String false request.body?.[“outcome”]
disputeId :
actionTaken :
notes :
adminId :
outcome :

REST Request To access the api you can use the REST controller with the path POST /v1/admindisputeactions

  axios({
    method: 'POST',
    url: '/v1/admindisputeactions',
    data: {
            disputeId:"ID",  
            actionTaken:"String",  
            notes:"Text",  
            adminId:"ID",  
            outcome:"String",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "adminDisputeAction",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"adminDisputeAction": {
		"id": "ID",
		"disputeId": "ID",
		"actionTaken": "String",
		"notes": "Text",
		"adminId": "ID",
		"outcome": "String",
		"actionDate": "Date",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Update Localizationsetting API

Update a localization setting. Admin only.

Rest Route

The updateLocalizationSetting API REST controller can be triggered via the following route:

/v1/localizationsettings/:localizationSettingId

Rest Request Parameters

The updateLocalizationSetting api has got 6 regular request parameters

Parameter Type Required Population
localizationSettingId ID true request.params?.[“localizationSettingId”]
languageCode String false request.body?.[“languageCode”]
effectiveFrom Date false request.body?.[“effectiveFrom”]
effectiveTo Date false request.body?.[“effectiveTo”]
currencyCode String false request.body?.[“currencyCode”]
isCurrencyActive Boolean false request.body?.[“isCurrencyActive”]
localizationSettingId : This id paremeter is used to select the required data object that will be updated
languageCode :
effectiveFrom :
effectiveTo :
currencyCode :
isCurrencyActive :

REST Request To access the api you can use the REST controller with the path PATCH /v1/localizationsettings/:localizationSettingId

  axios({
    method: 'PATCH',
    url: `/v1/localizationsettings/${localizationSettingId}`,
    data: {
            languageCode:"String",  
            effectiveFrom:"Date",  
            effectiveTo:"Date",  
            currencyCode:"String",  
            isCurrencyActive:"Boolean",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "localizationSetting",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"localizationSetting": {
		"id": "ID",
		"languageCode": "String",
		"effectiveFrom": "Date",
		"effectiveTo": "Date",
		"currencyCode": "String",
		"isCurrencyActive": "Boolean",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Update Gdpraction API

Compliance admin records status of a GDPR request (pending/complete/failed). No delete allowed for compliance records.

Rest Route

The updateGdprAction API REST controller can be triggered via the following route:

/v1/gdpractions/:gdprActionId

Rest Request Parameters

The updateGdprAction api has got 3 regular request parameters

Parameter Type Required Population
gdprActionId ID true request.params?.[“gdprActionId”]
status Enum false request.body?.[“status”]
processedAt Date false request.body?.[“processedAt”]
gdprActionId : This id paremeter is used to select the required data object that will be updated
status :
processedAt :

REST Request To access the api you can use the REST controller with the path PATCH /v1/gdpractions/:gdprActionId

  axios({
    method: 'PATCH',
    url: `/v1/gdpractions/${gdprActionId}`,
    data: {
            status:"Enum",  
            processedAt:"Date",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "gdprAction",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"gdprAction": {
		"id": "ID",
		"requestedAt": "Date",
		"status": "Enum",
		"status_idx": "Integer",
		"actionType": "String",
		"userId": "ID",
		"processedAt": "Date",
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID",
		"isActive": true
	}
}

List Gdpractions API

List all GDPR/compliance records with status for audit/compliance purposes.

Rest Route

The listGdprActions API REST controller can be triggered via the following route:

/v1/gdpractions

Rest Request Parameters The listGdprActions api has got no request parameters.

REST Request To access the api you can use the REST controller with the path GET /v1/gdpractions

  axios({
    method: 'GET',
    url: '/v1/gdpractions',
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "gdprActions",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"gdprActions": [
		{
			"id": "ID",
			"requestedAt": "Date",
			"status": "Enum",
			"status_idx": "Integer",
			"actionType": "String",
			"userId": "ID",
			"processedAt": "Date",
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID",
			"isActive": true
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Create Apikey API

Create/administer an API key (for integrations, partners, automation). Key is hashed at rest.

Rest Route

The createApiKey API REST controller can be triggered via the following route:

/v1/apikeys

Rest Request Parameters

The createApiKey api has got 5 regular request parameters

Parameter Type Required Population
key String true request.body?.[“key”]
active Boolean true request.body?.[“active”]
description String false request.body?.[“description”]
revokedAt Date false request.body?.[“revokedAt”]
createdBy ID true request.body?.[“createdBy”]
key :
active :
description :
revokedAt :
createdBy :

REST Request To access the api you can use the REST controller with the path POST /v1/apikeys

  axios({
    method: 'POST',
    url: '/v1/apikeys',
    data: {
            key:"String",  
            active:"Boolean",  
            description:"String",  
            revokedAt:"Date",  
            createdBy:"ID",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "apiKey",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"apiKey": {
		"id": "ID",
		"key": "String",
		"active": "Boolean",
		"description": "String",
		"revokedAt": "Date",
		"createdBy": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Apikeys API

Show all API keys with status (hash only, never show the sensitive key string itself).

Rest Route

The listApiKeys API REST controller can be triggered via the following route:

/v1/apikeys

Rest Request Parameters The listApiKeys api has got no request parameters.

REST Request To access the api you can use the REST controller with the path GET /v1/apikeys

  axios({
    method: 'GET',
    url: '/v1/apikeys',
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "apiKeys",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"apiKeys": [
		{
			"id": "ID",
			"key": "String",
			"active": "Boolean",
			"description": "String",
			"revokedAt": "Date",
			"createdBy": "ID",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Update Apikey API

Update API key metadata or deactivate (e.g. revoke). Only admin allowed.

Rest Route

The updateApiKey API REST controller can be triggered via the following route:

/v1/apikeys/:apiKeyId

Rest Request Parameters

The updateApiKey api has got 4 regular request parameters

Parameter Type Required Population
apiKeyId ID true request.params?.[“apiKeyId”]
active Boolean false request.body?.[“active”]
description String false request.body?.[“description”]
revokedAt Date false request.body?.[“revokedAt”]
apiKeyId : This id paremeter is used to select the required data object that will be updated
active :
description :
revokedAt :

REST Request To access the api you can use the REST controller with the path PATCH /v1/apikeys/:apiKeyId

  axios({
    method: 'PATCH',
    url: `/v1/apikeys/${apiKeyId}`,
    data: {
            active:"Boolean",  
            description:"String",  
            revokedAt:"Date",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "apiKey",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"apiKey": {
		"id": "ID",
		"key": "String",
		"active": "Boolean",
		"description": "String",
		"revokedAt": "Date",
		"createdBy": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Localizationsettings API

Show all currently configured languages/currencies.

Rest Route

The listLocalizationSettings API REST controller can be triggered via the following route:

/v1/localizationsettings

Rest Request Parameters

Filter Parameters

The listLocalizationSettings api supports 3 optional filter parameters for filtering list results:

languageCode (String): Filter by languageCode

currencyCode (String): Filter by currencyCode

isCurrencyActive (Boolean): Filter by isCurrencyActive

REST Request To access the api you can use the REST controller with the path GET /v1/localizationsettings

  axios({
    method: 'GET',
    url: '/v1/localizationsettings',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // languageCode: '<value>' // Filter by languageCode
        // currencyCode: '<value>' // Filter by currencyCode
        // isCurrencyActive: '<value>' // Filter by isCurrencyActive
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "localizationSettings",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"localizationSettings": [
		{
			"id": "ID",
			"languageCode": "String",
			"effectiveFrom": "Date",
			"effectiveTo": "Date",
			"currencyCode": "String",
			"isCurrencyActive": "Boolean",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Create Gdpraction API

User/admin submits GDPR request (export/delete/consent). Logged for compliance; status may be updated by compliance admin only.

Rest Route

The createGdprAction API REST controller can be triggered via the following route:

/v1/gdpractions

Rest Request Parameters

The createGdprAction api has got 3 regular request parameters

Parameter Type Required Population
actionType String true request.body?.[“actionType”]
userId ID true request.body?.[“userId”]
processedAt Date false request.body?.[“processedAt”]
actionType :
userId :
processedAt :

REST Request To access the api you can use the REST controller with the path POST /v1/gdpractions

  axios({
    method: 'POST',
    url: '/v1/gdpractions',
    data: {
            actionType:"String",  
            userId:"ID",  
            processedAt:"Date",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "gdprAction",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"gdprAction": {
		"id": "ID",
		"requestedAt": "Date",
		"status": "Enum",
		"status_idx": "Integer",
		"actionType": "String",
		"userId": "ID",
		"processedAt": "Date",
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID",
		"isActive": true
	}
}

Authentication Specific Routes

Common Routes

Route: currentuser

Route Definition: Retrieves the currently authenticated user’s session information.

Route Type: sessionInfo

Access Route: GET /currentuser

Parameters

This route does not require any request parameters.

Behavior

// Sample GET /currentuser call
axios.get("/currentuser", {
  headers: {
    "Authorization": "Bearer your-jwt-token"
  }
});

Success Response Returns the session object, including user-related data and token information.

{
  "sessionId": "9cf23fa8-07d4-4e7c-80a6-ec6d6ac96bb9",
  "userId": "d92b9d4c-9b1e-4e95-842e-3fb9c8c1df38",
  "email": "user@example.com",
  "fullname": "John Doe",
  "roleId": "user",
  "tenantId": "abc123",
  "accessToken": "jwt-token-string",
  ...
}

Error Response 401 Unauthorized: No active session found.

{
  "status": "ERR",
  "message": "No login found"
}

Notes

Route: permissions

*Route Definition*: Retrieves all effective permission records assigned to the currently authenticated user.

*Route Type*: permissionFetch

Access Route: GET /permissions

Parameters

This route does not require any request parameters.

Behavior

// Sample GET /permissions call
axios.get("/permissions", {
  headers: {
    "Authorization": "Bearer your-jwt-token"
  }
});

Success Response

Returns an array of permission objects.

[
  {
    "id": "perm1",
    "permissionName": "adminPanel.access",
    "roleId": "admin",
    "subjectUserId": "d92b9d4c-9b1e-4e95-842e-3fb9c8c1df38",
    "subjectUserGroupId": null,
    "objectId": null,
    "canDo": true,
    "tenantCodename": "store123"
  },
  {
    "id": "perm2",
    "permissionName": "orders.manage",
    "roleId": null,
    "subjectUserId": "d92b9d4c-9b1e-4e95-842e-3fb9c8c1df38",
    "subjectUserGroupId": null,
    "objectId": null,
    "canDo": true,
    "tenantCodename": "store123"
  }
]

Each object reflects a single permission grant, aligned with the givenPermissions model:

Error Responses

{
  "status": "ERR",
  "message": "No login found"
}

Notes

Tip: Applications can cache permission results client-side or server-side, but should occasionally refresh by calling this endpoint, especially after login or permission-changing operations.

Route: permissions/:permissionName

Route Definition: Checks whether the current user has access to a specific permission, and provides a list of scoped object exceptions or inclusions.

Route Type: permissionScopeCheck

Access Route: GET /permissions/:permissionName

Parameters

Parameter Type Required Population
permissionName String Yes request.params.permissionName

Behavior

// Sample GET /permissions/orders.manage
axios.get("/permissions/orders.manage", {
  headers: {
    "Authorization": "Bearer your-jwt-token"
  }
});

Success Response

{
  "canDo": true,
  "exceptions": [
    "a1f2e3d4-xxxx-yyyy-zzzz-object1",
    "b2c3d4e5-xxxx-yyyy-zzzz-object2"
  ]
}

All sources, documents and other digital materials are copyright of .

About Us

For more information please visit our website: .

. .