Javascript
About
JFramework (JFW) is a comprehensive backend API client library for JavaScript, part of the JFW ecosystem. It provides a set of APIs to interact with various resources such as brands, users, roles and more, enabling developers to build robust applications with features like authentication, payments, and content management. The @jframework/jfw-js
package is designed for client-side and server-side JavaScript environments and integrates seamlessly with Axios for HTTP requests.
Table of Contents
Getting Started
Setup Your Brand
To get started with JFramework, you need to set up your brand in the JFW dashboard:
Visit my.jframework.io.
Register for a new account if you don't have one, or log in with your existing credentials.
Once logged in, navigate to the "Brands" section.
Click on "Create New Brand" and fill in the required details, such as brand name, description, and any associated domains or configurations.
Save your brand. You'll receive a brand ID and API keys (e.g., secret key) that you'll use to authenticate requests in your application.
This setup ensures your API calls are associated with your brand for proper authorization and resource management.
Quick Start
Installation
Install the @jframework/jfw-js
package using your preferred package manager:
npm install @jframework/jfw-js
Or with Yarn:
yarn add @jframework/jfw-js
Configuration
To initialize the backend API client, create an instance using your Axios instance configured with your JFW API base URL and authentication headers (e.g., using your secret key from the brand setup).
Example in Node.js:
import { createJFWClient } from '@jframework/jfw-js';
export const jfwClient = createJFWClient({
brandURL: 'https://api.jframework.io', // Replace with your brandURL you created in Setup Your Brand.
protocolURL: 'https://protocol.jframework.io/api', // Replace with your protocolURL if you have custom protocol URL of JFW.
});
// Now you can use the client, e.g., to get your current brand info.
const currentBrand = await jfwClient.brand.getBrandByURL();
Make sure to handle errors appropriately, such as using try/catch for API calls, as they may throw errors on failure.
For framework-specific setups (e.g., Next.js, Express), refer to the detailed usage examples in the API Reference.
API Reference
The createBackendApiClient
function returns an object with resource-specific API clients. Each client extends AbstractAPI
and provides methods for CRUD operations and other resource-specific actions.
Below is a listing of all available API objects and their methods. Detailed documentation for each method includes parameters, return types (where applicable), and links to the full endpoint reference.
Ad API
The ad
object manages advertisements.
activateAd(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
activateAd(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Activates an ad.
Parameters:
id
IdType The ID of the ad to activate.config
AxiosRequestConfig Optional Axios request configuration.
See: Activate an Ad
deactivateAd(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deactivateAd(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deactivates an ad.
Parameters:
id
IdType The ID of the ad to deactivate.config
AxiosRequestConfig Optional Axios request configuration.
See: Deactivate an Ad
createAd(params: ICreateAdParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
createAd(params: ICreateAdParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Creates an ad.
Parameters:
params
ICreateAdParams The parameters for creating an ad.config
AxiosRequestConfig Optional Axios request configuration.
ICreateAdParams Fields:
type
AdType The type of the advertisement.title
string - min: 1 The title of the advertisement.position
AdPosition - min: 1 The display position of the advertisement (e.g., homepage-top, sidebar).targetURL
string The target URL that the ad points to when clicked. uri - min: 1description
string The description of the advertisement.tags
string The tags of the advertisement.startDate
DateType The start date and time when the advertisement becomes active. Format: yyyy-MM-dd HH:mm:ss date-timeendDate
DateType The end date and time when the advertisement expires. Format: yyyy-MM-dd HH:mm:ss date-timemetadata
string The metadata of the advertisement.languageCodes
string[] The list of supported language codes (ISO 639-1, e.g., "en", "vi"). If null, available for all languages.countryCodes
string[] The list of supported country codes (ISO 3166-1 alpha-2, e.g., "US", "VN"). If null, available in all countries.status
AdStatus The status of the advertisement.imageURLs
string[] The list of image URLs. Allowed formats: JPG, PNG, GIF. Maximum: 5.brandDomainIds
IdType[] The list of brand domains for the advertisement.
See: Create an Ad
deleteAd(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deleteAd(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes an ad.
Parameters:
id
IdType The ID of the ad to delete.config
AxiosRequestConfig Optional Axios request configuration.
See: Delete an Ad
getAdsClientView(position: AdPosition, config?: AxiosRequestConfig) => Promise<HttpResponse<IAd[]>>
getAdsClientView(position: AdPosition, config?: AxiosRequestConfig) => Promise<HttpResponse<IAd[]>>
Gets ads with the client view.
Parameters:
position
AdPosition The position for getting ads.config
AxiosRequestConfig Optional Axios request configuration.
See: Get Ads Client View
getAds(params?: IGetAdsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IAd>>
getAds(params?: IGetAdsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IAd>>
Gets ads.
Parameters:
params
IGetAdsParams The parameters for getting ads.config
AxiosRequestConfig Optional Axios request configuration.
IGetAdsParams Fields:
type
AdType The type to filter.title
string The title to filter.position
AdPosition The position to filter.targetURL
string The target URL to filter.description
string The description to filter.status
AdStatus The status to filter.keywords
string The keywords to filter.
See: Get Ads
getAd(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IAd>>
getAd(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IAd>>
Gets an ad.
Parameters:
id
IdType The ID of the ad to get.config
AxiosRequestConfig Optional Axios request configuration.
See: Get an Ad
updateAd(params: IUpdateAdParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
updateAd(params: IUpdateAdParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Updates an ad.
Parameters:
params
IUpdateAdParams The parameters for updating an ad.config
AxiosRequestConfig Optional Axios request configuration.
IUpdateAdParams Fields:
id
IdType The ID of the ad to update.type
AdType The type of the advertisement.title
string - min: 1 The title of the advertisement.position
AdPosition - min: 1 The display position of the advertisement (e.g., homepage-top, sidebar).targetURL
string The target URL that the ad points to when clicked. uri - min: 1description
string The description of the advertisement.tags
string The tags of the advertisement.startDate
DateType The start date and time when the advertisement becomes active. Format: yyyy-MM-dd HH:mm:ss date-timeendDate
DateType The end date and time when the advertisement expires. Format: yyyy-MM-dd HH:mm:ss date-timemetadata
string The metadata of the advertisement.languageCodes
string[] The list of supported language codes (ISO 639-1, e.g., "en", "vi"). If null, available for all languages.countryCodes
string[] The list of supported country codes (ISO 3166-1 alpha-2, e.g., "US", "VN"). If null, available in all countries.status
AdStatus The status of the advertisement.imageURLs
string[] The list of image URLs. Allowed formats: JPG, PNG, GIF. Maximum: 5.brandDomainIds
IdType[] The list of brand domains for the advertisement.
See: Update an Ad
App Integration API
The appIntegration
object manages various app integrations.
getAppIntegrations(params?: IGetAppIntegrationsParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegration[]>>
getAppIntegrations(params?: IGetAppIntegrationsParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegration[]>>
Lists all app integrations by type.
Parameters:
params?
IGetAppIntegrationsParams The parameters for getting app integrations.config?
AxiosRequestConfig Optional Axios request configuration.
IGetAppIntegrationsParams Fields:
type?
AppIntegrationType The type of the app integration to get. enumstatus?
AppIntegrationStatus The status of the app integration to filter. enumkeywords?
string The keywords of the app integration to get.
See: Get App Integrations
AppIntegrationAnalyticsAPI
Handles analytics-related operations for app integrations.
createAppIntegrationAnalytics(params: ICreateAppIntegrationAnalyticsParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationAnalytics>>
Creates a new app integration analytics record.
Parameters:
params
ICreateAppIntegrationAnalyticsParams The parameters for creating analytics.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateAppIntegrationAnalyticsParams Fields:
appIntegrationId
IdType The app integration provider ID of the analytics. min: 1trackingId
string - min: 1 This ID is used to track and associate events/data with a specific analytics property or project.apiKey
string - min: 1 This is usually embedded in the frontend to initialize and send data to the analytics platform.apiSecret?
string Gets or sets the API secret or verification URL used to authorize or validate requests from the Jframework.metadata?
string This can include environment-specific data, custom flags, or platform-specific information.accountConfigNotes?
string Gets or sets any additional notes or identifiers related to the account or setup that manages this Analytics configuration.isDefault?
boolean Flag to indicate if the analytics integration is the default.status
AppIntegrationAnalyticsStatus The status of the app integration. enum
deleteAppIntegrationAnalytics(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes an app integration analytics record by ID.
Parameters:
id
IdType The ID of the analytics record.config?
AxiosRequestConfig Optional Axios request configuration.
getAppIntegrationAnalytics(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationAnalytics>>
Gets an app integration analytics record by ID.
Parameters:
id
IdType The ID of the analytics record.config?
AxiosRequestConfig Optional Axios request configuration.
getAppIntegrationAnalyticsWithBrand(config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationAnalytics[]>>
Lists all app integration analytics associated with a brand.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
updateAppIntegrationAnalytics(params: IUpdateAppIntegrationAnalyticsParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationAnalytics>>
Updates an app integration analytics record by ID.
Parameters:
params
IUpdateAppIntegrationAnalyticsParams The parameters for updating analytics.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateAppIntegrationAnalyticsParams Fields:
id
IdType The app integration analytics id.appIntegrationId
IdType - min: 1 The app integration provider ID of the analytics.trackingId
string - min: 1 This ID is used to track and associate events/data with a specific analytics property or project.apiKey
string - min: 1 This is usually embedded in the frontend to initialize and send data to the analytics platform.apiSecret?
string Gets or sets the API secret or verification URL used to authorize or validate requests from the Jframework.metadata?
string This can include environment-specific data, custom flags, or platform-specific information.accountConfigNotes?
string Gets or sets any additional notes or identifiers related to the account or setup that manages this Analytics configuration.isDefault?
boolean Flag to indicate if the analytics integration is the default.status
AppIntegrationAnalyticsStatus The status of the app integration. enum
AppIntegrationAuthenticationAPI
Manages authentication settings for app integrations.
createAppIntegrationAuthentication(params: ICreateAppIntegrationAuthenticationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationAuthentication>>
Creates a new app integration authentication.
Parameters:
params
ICreateAppIntegrationAuthenticationParams The parameters for creating authentication.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateAppIntegrationAuthenticationParams Fields:
appIntegrationId
string - min: 1 The app integration id.code
string - min: 1 The code of the app integration.name
string - min: 1 The name of the app integration.projectId
string - min: 1 The project Id of the app integration.clientId
string - min: 1 The client email of the app integration. This value is used for OAuth2 methods. For example, for Google OAuth2, this value is the email of the service account.clientSecret
string - min: 1 The client secret of the app integration. This value is used for OAuth2 methods. For example, for Google OAuth2, this value is the private key of the service account.redirectURI
string - uri - min: 1 The redirect URI of the app integration. After the user logs in, the user is redirected to this URI. This value is must be mapping with the application configuration on the OAuth2 provider.scope
string - min: 1 The scope of the app integration.authEndpoint?
string - uri The authentication endpoint of the app integration.tokenEndpoint?
string - uri The token endpoint of the app integration.iconURL?
string - uri The icon URL of the app integration.tags?
string The tags of the app integration.description?
string The description of the app integration.status?
AppIntegrationAuthenticationStatus The status of the app integration. enumisDefault?
boolean Flag to indicate if the authentication integration is the default. defaultValuefalse
createAppIntegrationAuthenticationWithImportFileSettings(params: ICreateAppIntegrationAuthenticationWithImportFileSettingsParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationAuthentication>>
Creates a new app integration authentication with import file settings.
Parameters:
params
ICreateAppIntegrationAuthenticationWithImportFileSettingsParams The parameters for creating authentication with import file.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateAppIntegrationAuthenticationWithImportFileSettingsParams Fields:
appIntegrationId
IdType The app integration id.file
File - min: 1 The file setting to import.
deleteAppIntegrationAuthentication(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes an app integration authentication by ID.
Parameters:
id
IdType The ID of the authentication.config?
AxiosRequestConfig Optional Axios request configuration.
getAppIntegrationAuthentication(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationAuthentication>>
Gets an app integration authentication by ID.
Parameters:
id
IdType The ID of the authentication.config?
AxiosRequestConfig Optional Axios request configuration.
getAppsIntegrationAuthenticationWithBrand(params?: IGetAppIntegrationAuthenticationsWithBrandParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationAuthentication[]>>
Gets app integration authentications for a brand.
Parameters:
params?
IGetAppIntegrationAuthenticationsWithBrandParams The parameters for getting authentications.config?
AxiosRequestConfig Optional Axios request configuration.
IGetAppIntegrationAuthenticationsWithBrandParams Fields:
appIntegrationId?
string The app integration id to filter.code?
string The code to filter.name?
string The name of filter.description?
string The description of filter.projectId?
string The project id of filter.clientEmail?
string The client email of filter.clientId?
string The client id of filter.clientSecret?
string The client secret of filter.privateKey?
string The private key of filter.redirectURI?
string - uri The redirect URI of filter.scope?
string The scope of filter.authEndpoint?
string - uri The auth endpoint of filter.tokenEndpoint?
string - uri The token endpoint of filter.iconURL?
string - uri The icon URL of filter.tags?
string The tags of filter.status?
AppIntegrationAuthenticationStatus The status of filter. string - enum -0
-Inactive
-1
-Active
testBuildingAuthenticationURL(appIntegrationId: IdType, params: ITestBuildingAuthenticationURLParams, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
Simulates building an authentication URL for an app integration to validate settings.
Parameters:
appIntegrationId
IdType The ID of the app integration.params
ITestBuildingAuthenticationURLParams The parameters for testing authentication URL.config?
AxiosRequestConfig Optional Axios request configuration.
ITestBuildingAuthenticationURLParams Fields:
clientId
string - min: 1 The client email of the app integration. This value is used for OAuth2 methods. For example, for Google OAuth2, this value is the email of the service account.redirectURI
string - min: 1 The redirect URI of the app integration. After the user logs in, the user is redirected to this URI.scope
string - min: 1 The scope of the app integration.state?
string The state of the app integration.
updateAppIntegrationAuthentication(id: IdType, params: IUpdateAppIntegrationAuthenticationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationAuthentication>>
Updates an app integration authentication by ID.
Parameters:
id
IdType The ID of the authentication.params
IUpdateAppIntegrationAuthenticationParams The parameters for updating authentication.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateAppIntegrationAuthenticationParams Fields:
appIntegrationId
string - min: 1 The app integration id.code
string - min: 1 The code of the app integration.name
string - min: 1 The name of the app integration.projectId
string - min: 1 The project Id of the app integration.clientId
string - min: 1 The client email of the app integration. This value is used for OAuth2 methods. For example, for Google OAuth2, this value is the email of the service account.clientSecret
string - min: 1 The client secret of the app integration. This value is used for OAuth2 methods. For example, for Google OAuth2, this value is the private key of the service account.redirectURI
string - uri - min: 1 The redirect URI of the app integration. After the user logs in, the user is redirected to this URI. This value is must be mapping with the application configuration on the OAuth2 provider.scope
string - min: 1 The scope of the app integration.authEndpoint?
string - uri The authentication endpoint of the app integration.tokenEndpoint?
string - uri The token endpoint of the app integration.iconURL?
string - uri The icon URL of the app integration.tags?
string The tags of the app integration.description?
string The description of the app integration.status?
AppIntegrationAuthenticationStatus The status of the app integration. enumisDefault?
boolean Flag to indicate if the authentication integration is the default. defaultValuefalse
AppIntegrationPaymentGatewayAPI
Manages payment gateway integrations for apps.
createAppIntegrationPaymentGateway(params: ICreateAppIntegrationPaymentGatewayParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationPaymentGateway>>
Creates a new app integration payment gateway.
Parameters:
params
ICreateAppIntegrationPaymentGatewayParams The parameters for creating payment gateway.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateAppIntegrationPaymentGatewayParams Fields:
appIntegrationId
string - min: 1 The app integration id of the payment gateway.name
string - min: 1 The name of the payment gateway integration.ipnListenerLink
string - uri - min: 1 The IPN (Instant Payment Notification) listener link of the payment gateway. This endpoint will receive payment notifications from the gateway. For PayPal: This is your IPN listener URL for payment status updates. For Stripe: This would be your webhook URL for payment events.cancelLinkWithoutLogin?
string - uri The payment link of the payment gateway. This is used when unauthenticated users cancel payment and need to be redirected. For PayPal/Stripe: Fallback URL when session is lost or user isn't logged in.cancelLink
string - uri - min: 1 The cancel link of the payment gateway. Users will be redirected here when they cancel a payment. For PayPal: Set as the cancel_url in PayPal checkout. For Stripe: Used as cancel_url in Stripe Checkout sessions.returnLink
string - uri - min: 1 The return link of the payment gateway. Users will be redirected here after successful payment. For PayPal: Set as the return_url in PayPal checkout. For Stripe: Used as success_url in Stripe Checkout sessions.publicKey
string - min: 1 The public key of the payment gateway. For PayPal: Client ID from your PayPal app credentials. For Stripe: Publishable key from your Stripe dashboard.privateKey
string - min: 1 The private key of the payment gateway. For PayPal: Secret from your PayPal app credentials. For Stripe: Secret key from your Stripe dashboard.description?
string Description of the payment gateway. For PayPal/Stripe: Optional description that appears in your dashboard.notes?
string The notes of the payment gateway. For PayPal/Stripe: Internal notes about this integration.testMode?
boolean Flag to indicate if the payment gateway is in test mode. When true, transactions will use the provider's sandbox environment. For PayPal: Uses https://api.sandbox.paypal.com instead of production. For Stripe: Uses test mode keys and endpoints. defaultValuefalse
isDefault?
boolean Flag to indicate if the payment gateway integration is the default.status?
AppIntegrationPaymentGatewayStatus The status of the payment gateway integration. enum
deleteAppIntegrationPaymentGateway(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes an app integration payment gateway by ID.
Parameters:
id
IdType The ID of the payment gateway.config?
AxiosRequestConfig Optional Axios request configuration.
getAppIntegrationPaymentGateway(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationPaymentGateway>>
Gets an app integration payment gateway by ID.
Parameters:
id
IdType The ID of the payment gateway.config?
AxiosRequestConfig Optional Axios request configuration.
getAppsIntegrationPaymentGatewayWithBrand(config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationPaymentGateway[]>>
Gets the list of app integration payment gateways for the current brand.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
testCreatingCheckoutLink(appIntegrationId: IdType, params: ITestCreatingCheckoutLinkParams, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
Tests generating a checkout link for an app integration.
Parameters:
appIntegrationId
IdType The ID of the app integration.params
ITestCreatingCheckoutLinkParams The parameters for testing checkout link creation.config?
AxiosRequestConfig Optional Axios request configuration.
ITestCreatingCheckoutLinkParams Fields:
product
IAppIntegrationPaymentGatewayProduct This class represents the Checkout Payment Request PayPal Data Transfer Object. objectpublicKey
string - min: 1 The public key of the payment gateway used for authentication. For PayPal: Client ID from your PayPal app credentials (used with OAuth 2.0). For Stripe: Publishable key from your Stripe dashboard (used client-side).privateKey
string - min: 1 The private key of the payment gateway used for secure server-side operations. For PayPal: Secret from your PayPal app credentials. For Stripe: Secret key from your Stripe dashboard (used for server-side API calls). Note: This should never be exposed to client-side code.displayName
string - min: 1 - max: 127 The display name shown to customers during checkout. For PayPal: Appears as the merchant name during PayPal checkout flow. For Stripe: Displayed as the company name on Stripe Checkout pages. Maximum length is typically 127 characters for most payment providers.
updateAppIntegrationPaymentGateway(id: IdType, params: IUpdateAppIntegrationPaymentGatewayParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationPaymentGateway>>
Updates an app integration payment gateway by ID.
Parameters:
id
IdType The ID of the payment gateway.params
IUpdateAppIntegrationPaymentGatewayParams The parameters for updating payment gateway.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateAppIntegrationPaymentGatewayParams Fields:
appIntegrationId
string - min: 1 The app integration id of the payment gateway.name
string - min: 1 The name of the payment gateway integration.ipnListenerLink
string - uri - min: 1 The IPN (Instant Payment Notification) listener link of the payment gateway. This endpoint will receive payment notifications from the gateway. For PayPal: This is your IPN listener URL for payment status updates. For Stripe: This would be your webhook URL for payment events.cancelLinkWithoutLogin?
string - uri The payment link of the payment gateway. This is used when unauthenticated users cancel payment and need to be redirected. For PayPal/Stripe: Fallback URL when session is lost or user isn't logged in.cancelLink
string - uri - min: 1 The cancel link of the payment gateway. Users will be redirected here when they cancel a payment. For PayPal: Set as the cancel_url in PayPal checkout. For Stripe: Used as cancel_url in Stripe Checkout sessions.returnLink
string - uri - min: 1 The return link of the payment gateway. Users will be redirected here after successful payment. For PayPal: Set as the return_url in PayPal checkout. For Stripe: Used as success_url in Stripe Checkout sessions.publicKey
string - min: 1 The public key of the payment gateway. For PayPal: Client ID from your PayPal app credentials. For Stripe: Publishable key from your Stripe dashboard.privateKey
string - min: 1 The private key of the payment gateway. For PayPal: Secret from your PayPal app credentials. For Stripe: Secret key from your Stripe dashboard.description?
string Description of the payment gateway. For PayPal/Stripe: Optional description that appears in your dashboard.notes?
string The notes of the payment gateway. For PayPal/Stripe: Internal notes about this integration.testMode?
boolean Flag to indicate if the payment gateway is in test mode. When true, transactions will use the provider's sandbox environment. For PayPal: Uses https://api.sandbox.paypal.com instead of production. For Stripe: Uses test mode keys and endpoints. defaultValuefalse
isDefault?
boolean Flag to indicate if the payment gateway integration is the default.status?
AppIntegrationPaymentGatewayStatus The status of the payment gateway integration. enum
AppIntegrationPushNotificationAPI
Manages push notification integrations for apps.
createAppIntegrationPushNotification(params: ICreateAppIntegrationPushNotificationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationPushNotification>>
Creates a new app integration push notification.
Parameters:
params
ICreateAppIntegrationPushNotificationParams The parameters for creating push notification.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateAppIntegrationPushNotificationParams Fields:
appIntegrationId
IdType - min: 1 The app integration provider ID of the push notification.code
string - min: 1 The code of the push notification.name
string - min: 1 The name of the push notification.projectId
IdType - min: 1 The project ID of the push notification.clientEmail
string - min: 1 The client email of the push notification.clientId?
string - min: 1 The client ID of the push notification.privateKey
string - min: 1 The private key of the push notification.authURL?
string - uri The authentication URL of the push notification.tokenURL?
string - uri The token URL of the push notification.authProviderX509CertURL?
string - uri The authentication provider X509 certificate URL of the push notification.clientX509CertURL?
string - uri The client X509 certificate URL of the push notification.universeDomain?
string The universe domain of the push notification.apiKey?
string The API key of the push notification.authDomain?
string The authentication domain of the push notification.storageBucket?
string The storage bucket of the push notification.messagingSenderId?
string The messaging sender ID of the push notification.appId?
string The app ID of the push notification. Use projectId instead if using Firebase service.measurementId?
string The measurement ID of the push notification.vapidKey?
string The VAPID key of the push notification.isDefault?
boolean Flag to indicate if the push notification integration is the default. defaultValuefalse
createAppIntegrationPushNotificationWithImportFileSettings(params: ICreateAppIntegrationPushNotificationWithImportFileSettingsParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationPushNotification>>
Creates a new app integration push notification with import file settings.
Parameters:
params
ICreateAppIntegrationPushNotificationWithImportFileSettingsParams The parameters for creating push notification with import file.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateAppIntegrationPushNotificationWithImportFileSettingsParams Fields:
appIntegrationId
IdType The app integration id.file
File - min: 1 The file setting to import.
deleteAppIntegrationPushNotification(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes an app integration push notification by ID.
Parameters:
id
IdType The ID of the push notification.config?
AxiosRequestConfig Optional Axios request configuration.
getAppIntegrationPushNotification(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationPushNotification>>
Gets an app integration push notification by ID.
Parameters:
id
IdType The ID of the push notification.config?
AxiosRequestConfig Optional Axios request configuration.
getAppIntegrationPushNotificationsWithBrand(config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationPushNotification[]>>
Gets the current brand's app integration push notifications.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
updateAppIntegrationPushNotification(id: IdType, params: IUpdateAppIntegrationPushNotificationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationPushNotification>>
Updates an app integration push notification by ID.
Parameters:
id
IdType The ID of the push notification.params
IUpdateAppIntegrationPushNotificationParams The parameters for updating push notification.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateAppIntegrationPushNotificationParams Fields:
appIntegrationId
IdType - min: 1 The app integration provider ID of the push notification.code
string - min: 1 The code of the push notification.name
string - min: 1 The name of the push notification.projectId
IdType - min: 1 The project ID of the push notification.clientEmail
string - min: 1 The client email of the push notification.clientId?
string - min: 1 The client ID of the push notification.privateKey
string - min: 1 The private key of the push notification.authURL?
string - uri The authentication URL of the push notification.tokenURL?
string - uri The token URL of the push notification.authProviderX509CertURL?
string - uri The authentication provider X509 certificate URL of the push notification.clientX509CertURL?
string - uri The client X509 certificate URL of the push notification.universeDomain?
string The universe domain of the push notification.apiKey?
string The API key of the push notification.authDomain?
string The authentication domain of the push notification.storageBucket?
string The storage bucket of the push notification.messagingSenderId?
string The messaging sender ID of the push notification.appId?
string The app ID of the push notification. Use projectId instead if using Firebase service.measurementId?
string The measurement ID of the push notification.vapidKey?
string The VAPID key of the push notification.isDefault?
boolean Flag to indicate if the push notification integration is the default. defaultValuefalse
AppIntegrationReCAPTCHAAPI
Manages reCAPTCHA integrations for apps.
createAppIntegrationReCAPTCHA(params: ICreateAppIntegrationReCAPTCHAParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationReCAPTCHA>>
Creates a new app integration reCAPTCHA.
Parameters:
params
ICreateAppIntegrationReCAPTCHAParams The parameters for creating reCAPTCHA.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateAppIntegrationReCAPTCHAParams Fields:
appIntegrationId
IdType - min: 1 This is used to associate this configuration with a specific integration instance.version
string - min: 1 Gets or sets the version of the ReCaptcha being used (e.g., v2, v3). Different versions may have different behavior and setup requirements.siteKey
string - min: 1 This is the public key used on the client-side to render the ReCaptcha widget.verifyURL?
string - uri The verify URL of the app integration.secretKey?
string - min: 1 This is the private key used server-side to validate ReCaptcha responses. It's optional to allow scenarios where only public configuration is required.accountConfigNotes?
string - min: 1 Gets or sets any additional notes or identifiers related to the account or setup that manages this ReCaptcha configuration.isDefault?
boolean Flag to indicate if the analytics integration is the default. defaultfalse
status?
AppIntegrationReCAPTCHAStatus The status of the app integration. enum
deleteAppIntegrationReCAPTCHA(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes an app integration reCAPTCHA by ID.
Parameters:
id
IdType The ID of the reCAPTCHA.config?
AxiosRequestConfig Optional Axios request configuration.
getAppIntegrationReCAPTCHA(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationReCAPTCHA>>
Gets an app integration reCAPTCHA by ID.
Parameters:
id
IdType The ID of the reCAPTCHA.config?
AxiosRequestConfig Optional Axios request configuration.
getAppsIntegrationReCAPTCHAWithBrand(config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationReCAPTCHA[]>>
Lists all app integration reCAPTCHAs.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
updateAppIntegrationReCAPTCHA(params: IUpdateAppIntegrationReCAPTCHAParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationReCAPTCHA>>
Updates an app integration reCAPTCHA by ID.
Parameters:
params
IUpdateAppIntegrationReCAPTCHAParams The parameters for updating reCAPTCHA.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateAppIntegrationReCAPTCHAParams Fields:
id
IdType The app integration ReCaptcha id.appIntegrationId
IdType - min: 1 This is used to associate this configuration with a specific integration instance.version
string - min: 1 Gets or sets the version of the ReCaptcha being used (e.g., v2, v3). Different versions may have different behavior and setup requirements.siteKey
string - min: 1 This is the public key used on the client-side to render the ReCaptcha widget.verifyURL?
string - uri The verify URL of the app integration.secretKey?
string - min: 1 This is the private key used server-side to validate ReCaptcha responses. It's optional to allow scenarios where only public configuration is required.accountConfigNotes?
string - min: 1 Gets or sets any additional notes or identifiers related to the account or setup that manages this ReCaptcha configuration.isDefault?
boolean Flag to indicate if the analytics integration is the default. defaultfalse
status?
AppIntegrationReCAPTCHAStatus The status of the app integration. enum
AppIntegrationSMSAPI
Manages SMS integrations for apps.
createAppIntegrationSMS(params: ICreateAppIntegrationSMSParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationSMS>>
Creates a new app integration SMS.
Parameters:
params
ICreateAppIntegrationSMSParams The parameters for creating SMS integration.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateAppIntegrationSMSParams Fields:
appIntegrationId
string - min: 1 The app integration provider ID of the SMS.name
string - min: 1 The name of the SMS integration.username
string - min: 1 The username or identifier for the SMS integration. For Twilio, this is the Account SID (String Identifier).password
string - min: 1 The password or authentication token for the SMS integration. For Twilio, this is the Auth Token.phoneNumber
string - min: 1 The phone number of the SMS integration. The phone number should be following the E.164 format.description?
string The description of the SMS integration.status?
AppIntegrationSMSStatus The status of the app integration. enumisDefault?
boolean Flag to indicate if the app integration SMS setting is default. defaultValuefalse
deleteAppIntegrationSMS(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes an app integration SMS by ID.
Parameters:
id
IdType The ID of the SMS integration.config?
AxiosRequestConfig Optional Axios request configuration.
getAppIntegrationSMS(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationSMS>>
Gets an app integration SMS by ID.
Parameters:
id
IdType The ID of the SMS integration.config?
AxiosRequestConfig Optional Axios request configuration.
getAppsIntegrationSMSWithBrand(config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationSMS[]>>
Lists all app integration SMS.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
testSendingSMSMessage(appIntegrationId: IdType, params: ITestSendingSMSMessageParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Sends a test SMS message using the configured SMS integration settings.
Parameters:
appIntegrationId
IdType The ID of the app integration.params
ITestSendingSMSMessageParams The parameters for testing sending an SMS message.config?
AxiosRequestConfig Optional Axios request configuration.
ITestSendingSMSMessageParams Fields:
username
string - min: 1 The username or identifier for the SMS integration. For Twilio, this is the Account SID (String Identifier).password
string - min: 1 The password or authentication token for the SMS integration. For Twilio, this is the Auth Token.phoneNumberFrom
string - min: 1 The sender's phone number used by the SMS integration. Must be in E.164 format (e.g., +1234567890).phoneNumberTo
string - min: 1 The recipient's phone number to which the test SMS will be sent. Must be in E.164 format (e.g., +1234567890).message
string - min: 1 The content of the SMS message to be sent during the test.
updateAppIntegrationSMS(id: IdType, params: IUpdateAppIntegrationSMSParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationSMS>>
Updates an app integration SMS by ID.
Parameters:
id
IdType The ID of the SMS integration.params
IUpdateAppIntegrationSMSParams The parameters for updating SMS integration.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateAppIntegrationSMSParams Fields:
appIntegrationId
string - min: 1 The app integration provider ID of the SMS.name
string - min: 1 The name of the SMS integration.username
string - min: 1 The username or identifier for the SMS integration. For Twilio, this is the Account SID (String Identifier).password
string - min: 1 The password or authentication token for the SMS integration. For Twilio, this is the Auth Token.phoneNumber
string - min: 1 The phone number of the SMS integration. The phone number should be following the E.164 format.description?
string The description of the SMS integration.status?
AppIntegrationSMSStatus The status of the app integration. enumisDefault?
boolean Flag to indicate if the app integration SMS setting is default. defaultValuefalse
AppIntegrationSMTPAPI
Manages SMTP integrations for apps.
createAppIntegrationSMTP(params: ICreateAppIntegrationSMTPParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationSMTP>>
Creates a new app integration SMTP.
Parameters:
params
ICreateAppIntegrationSMTPParams The parameters for creating SMTP integration.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateAppIntegrationSMTPParams Fields:
appIntegrationId
IdType - min: 1 The type of the SMTP integration.name
string - min: 1 The name of the SMTP integration.host
string - min: 1 The host of the SMTP integration.port
number - int32 The port of the SMTP integration.username
string - min: 1 The username of the SMTP integration.password
string - min: 1 The password of the SMTP integration.useTls?
boolean Flag to indicate if the SMTP integration uses TLS. defaultValuefalse
isDefault?
boolean Flag to indicate if the SMTP integration is the default. defaultValuefalse
description?
string The description of the SMTP integration.status?
AppIntegrationSMTPStatus The status of the SMTP integration. enum
deleteAppIntegrationSMTP(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes an app integration SMTP by ID.
Parameters:
id
IdType The ID of the SMTP integration.config?
AxiosRequestConfig Optional Axios request configuration.
getAppIntegrationSMTP(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationSMTP>>
Gets an app integration SMTP by ID.
Parameters:
id
IdType The ID of the SMTP integration.config?
AxiosRequestConfig Optional Axios request configuration.
getAppsIntegrationSMTPWithBrand(config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationSMTP[]>>
Gets app integration SMTPs for a brand.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
testSendingEmailAddress(params: ITestSendingEmailAddressParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Sends a test email using the configured SMTP integration settings.
Parameters:
params
ITestSendingEmailAddressParams The parameters for testing email sending.config?
AxiosRequestConfig Optional Axios request configuration.
ITestSendingEmailAddressParams Fields:
host
string - min: 1 The SMTP server hostname or IP (e.g., smtp.gmail.com).port
number - int32 The port number for the SMTP server (typically 587 or 465).username
string - min: 1 The username/email address for SMTP authentication.password
string - min: 1 The password for SMTP authentication.useTls
boolean Whether to enable SSL for SMTP connection.emailAddressFrom
string - min: 1 The sender email address.emailAddressTo
string - min: 1 The recipient email address.subject
string - min: 1 The subject of the test email.body
string - min: 1 The body content of the test email.
See: Send Test Email
updateAppIntegrationSMTP(id: IdType, params: IUpdateAppIntegrationSMTPParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationSMTP>>
Updates an app integration SMTP by ID.
Parameters:
id
IdType The ID of the SMTP integration.params
IUpdateAppIntegrationSMTPParams The parameters for updating SMTP integration.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateAppIntegrationSMTPParams Fields:
appIntegrationId
IdType - min: 1 The type of the SMTP integration.name
string - min: 1 The name of the SMTP integration.host
string - min: 1 The host of the SMTP integration.port
number - int32 The port of the SMTP integration.username
string - min: 1 The username of the SMTP integration.password
string - min: 1 The password of the SMTP integration.useTls?
boolean Flag to indicate if the SMTP integration uses TLS. defaultValuefalse
isDefault?
boolean Flag to indicate if the SMTP integration is the default. defaultValuefalse
description?
string The description of the SMTP integration.status?
AppIntegrationSMTPStatus The status of the SMTP integration. enum
BrandAPI
Manages brand-related operations.
checkDomainIfExists(domain: string, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Checks if a brand exists by domain.
Parameters:
domain
string The domain to check.config?
AxiosRequestConfig Optional Axios request configuration.
See: Check Domain Exists
createBrand(params: ICreateBrandParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IBrand>>
Creates a new brand.
Parameters:
params
ICreateBrandParams Parameters for creating a brand.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateBrandParams Fields:
name
string - min: 1 The name of the brand.abbr
string - min: 1 The abbreviation of the brand.description?
string The description of the brand.setting
ICreateBrandSettingParams The setting of the brand.profile
ICreateBrandProfileParams The profile of the brand.
ICreateBrandSettingParams Fields:
domain
string - min: 1 The domain of the brand. The value is the subdomain of the brand.
ICreateBrandProfileParams Fields:
logoUrl?
string - uri The logo URL of the brand.faviconUrl?
string - uri The favicon URL of the brand.slogan?
string The slogan of the brand, used with the brand name in page titles.
See: Create a Brand
generateNewDomain(config?: AxiosRequestConfig) => Promise<HttpResponse<IGeneratedDomain>>
Generates a new, unused domain name.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
IGeneratedDomain Fields:
rootDomain
string - min: 1 The root part of the domain, typically the main domain name.subDomain
string - min: 1 The subdomain part, often used to identify a specific brand or service.fullDomain
string - min: 1 The full domain name, combining the root domain and subdomain.
See: Generate Domain
getBrand(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IBrand>>
Gets a brand by ID.
Parameters:
id
IdType The ID of the brand.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get a Brand
getBrandByURL(config?: AxiosRequestConfig) => Promise<HttpResponse<IBrand>>
Gets a brand based on the client or host domain.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
getBrands(params?: IGetBrandsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IBrand>>
Gets brands by filter.
Parameters:
params?
IGetBrandsParams Parameters for getting brands.config?
AxiosRequestConfig Optional Axios request configuration.
IGetBrandsParams Fields:
code?
string The code of the brand.name?
string The name of the brand.abbr?
string The abbreviation of the brand.description?
string The description of the brand.tags?
string The tags of the brand.status?
BrandStatus The status of the brand.keywords?
string The keywords of the brand.
See: Get Brands
updateBrand(id: IdType, params: IUpdateBrandParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Updates a brand by ID.
Parameters:
id
IdType The ID of the brand.params
IUpdateBrandParams Parameters for updating a brand.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateBrandParams Fields:
name
string - min: 1 The name of the brand.abbr
string - min: 1 The abbreviation of the brand.description?
string The description of the brand.tags?
string The tags of the brand.
See: Update a Brand
BrandProfileAPI
Manages brand profile operations.
updateBrandProfile(id: IdType, params: IUpdateBrandProfileParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Updates a brand's profile by ID.
Parameters:
id
IdType The ID of the brand.params
IUpdateBrandProfileParams Parameters for updating the brand profile.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateBrandProfileParams Fields:
slogan
string - min: 1 The slogan of the brand.logoURL?
string - uri The logo URL of the brand.faviconURL?
string - uri The favicon URL of the brand.primaryColor?
string The primary color for actions, buttons, and text links. Accepts 3 or 6 digit hex code values.primaryColorHover?
string The hover color for primary actions, buttons, and text links. Accepts 3 or 6 digit hex code values.secondaryColor?
string The secondary color for background accents in the UI. Accepts 3 or 6 digit hex code values.tertiaryColor?
string The tertiary color for background accents in the UI. Accepts 3 or 6 digit hex code values.
BrandSettingAPI
Manages brand setting operations.
updateBrandSetting(id: IdType, params: IUpdateBrandSettingParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Updates a brand's settings by ID.
Parameters:
id
IdType The ID of the brand.params
IUpdateBrandSettingParams Parameters for updating brand settings.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateBrandSettingParams Fields:
domainWhiteListURLs?
string The whitelisted domain URLs for the brand.googleAnalyticsAccount?
string The Google Analytics account ID for tracking.reCaptchaKey?
string The reCAPTCHA key for verification.coinCurrencyCode?
string The coin earning code of the brand system.cdnURL?
string The CDN URL for serving assets.cdnFolder?
string The CDN folder path for organizing assets.passwordPolicyLevel?
PasswordPolicyLevel The password policy level. Options: 1 - Low, 2 - Medium, 3 - High.
EmailAddressAPI
Manages email addresses associated with brands.
createEmailAddress(params: ICreateEmailAddressParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IEmailAddress>>
Creates an email address for a brand.
Parameters:
params
ICreateEmailAddressParams Parameters for creating an email address.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateEmailAddressParams Fields:
brandId
IdType The ID of the brand.placeholderKeyTitle?
string The placeholder key for the email title, related to email templates.title
string - min: 1 The title of the email address.placeholderKeyEmailAddress?
string The placeholder key for the email address, related to email templates.emailAddress
string - email - min: 1 The email address value.description?
string The description of the email address.
deleteEmailAddress(params: IDeleteEmailAddressParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes an email address.
Parameters:
params
IDeleteEmailAddressParams Parameters for deleting an email address.config?
AxiosRequestConfig Optional Axios request configuration.
IDeleteEmailAddressParams Fields:
brandId
IdType The ID of the brand.emailAddressId
IdType The ID of the email address to delete.
getEmailAddress(params: IGetEmailAddressParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IEmailAddress>>
Gets an email address.
Parameters:
params
IGetEmailAddressParams Parameters for getting an email address.config?
AxiosRequestConfig Optional Axios request configuration.
IGetEmailAddressParams Fields:
brandId
IdType The ID of the brand.emailAddressId
IdType The ID of the email address to retrieve.
See: Get an Email Address
getEmailAddresses(brandId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IEmailAddress[]>>
Gets email addresses for a brand.
Parameters:
brandId
IdType The ID of the brand.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get Email Addresses
updateEmailAddress(emailAddressId: IdType, params: IUpdateEmailAddressParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IEmailAddress>>
Updates an email address.
Parameters:
emailAddressId
IdType The ID of the email address.params
IUpdateEmailAddressParams Parameters for updating an email address.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateEmailAddressParams Fields:
brandId
IdType The ID of the brand.placeholderKeyTitle?
string The placeholder key for the email title, related to email templates.title
string - min: 1 The title of the email address.placeholderKeyEmailAddress?
string The placeholder key for the email address, related to email templates.emailAddress
string - email - min: 1 The email address value.description?
string The description of the email address.
CDN API
The cdn
object manages files on the Content Delivery Network (CDN).
deleteFileCDN(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deleteFileCDN(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes a file from the CDN.
Parameters:
id
IdType The ID of the file.config?
AxiosRequestConfig Optional Axios request configuration.
See: Delete a File CDN
getFileCDN(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IFileCDN>>
getFileCDN(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IFileCDN>>
Gets a file from the CDN by ID.
Parameters:
id
IdType The ID of the file.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get a File CDN
getFilesCDN(params?: IGetFilesCDNParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IFileCDN>>
getFilesCDN(params?: IGetFilesCDNParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IFileCDN>>
Gets a list of CDN items.
Parameters:
params?
IGetFilesCDNParams Parameters for getting CDN files.config?
AxiosRequestConfig Optional Axios request configuration.
IGetFilesCDNParams Fields:
userId?
IdType The ID of the user.refObject?
string The reference object for filtering.refId?
number - int64 The reference identifier for filtering.mimeType?
string The MIME type for filtering.originalFilename?
string The original file name for filtering.
See: Get Files CDN
uploadFileCDN(params: IUploadFileParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IUploadedFileCDN>>
uploadFileCDN(params: IUploadFileParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IUploadedFileCDN>>
Uploads a file to the CDN. The CdnPathType
specifies the root folder, defaulting to "User".
Parameters:
params
IUploadFileParams Parameters for uploading a file.config?
AxiosRequestConfig Optional Axios request configuration.
IUploadFileParams Fields:
zOrder?
number - int64 The z-order of the uploaded file. Default value is 0 (e.g., 1, 2, 3, etc.).uploadFile
File The file to upload.fileName?
string The name to save the file as (e.g., "profile.jpg", "feedback.png"). If not set, uses the uploaded file's name.prefixFolder?
string The prefix folder before the file name (e.g., "profile", "assets").refObject?
string The object reference for the uploaded file.refId?
IdType - int64 The reference ID of the uploaded file, used to reference the object ID.notes?
string Notes for the uploaded file (e.g., "Profile picture", "Feedback screenshot").tags?
string Tags for the uploaded file (e.g., "#MyProfile", "#Feedback").cdnPathType?
CDNFilePathType The CDN path type specifying the root folder.testMode?
boolean Indicates if the file upload is in test mode.
See: Upload File
uploadFile(params: IUploadFileParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IUploadedFileCDN>>
uploadFile(params: IUploadFileParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IUploadedFileCDN>>
Deprecated. Use uploadFileCDN
instead.
Parameters:
params
IUploadFileParams Parameters for uploading a file.config?
AxiosRequestConfig Optional Axios request configuration.
IUploadFileParams Fields:
zOrder?
number - int64 The z-order of the uploaded file. Default value is 0 (e.g., 1, 2, 3, etc.).uploadFile
File The file to upload.fileName?
string The name to save the file as (e.g., "profile.jpg", "feedback.png"). If not set, uses the uploaded file's name.prefixFolder?
string The prefix folder before the file name (e.g., "profile", "assets").refObject?
string The object reference for the uploaded file.refId?
IdType - int64 The reference ID of the uploaded file, used to reference the object ID.notes?
string Notes for the uploaded file (e.g., "Profile picture", "Feedback screenshot").tags?
string Tags for the uploaded file (e.g., "#MyProfile", "#Feedback").cdnPathType?
CDNFilePathType The CDN path type specifying the root folder.testMode?
boolean Indicates if the file upload is in test mode.
See: Upload File
City API
The city
object manages city data.
getCities(params?: IGetCitiesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<ICity>>
getCities(params?: IGetCitiesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<ICity>>
Gets a list of all cities.
Parameters:
params?
IGetCitiesParams Parameters for getting cities.config?
AxiosRequestConfig Optional Axios request configuration.
IGetCitiesParams Fields:
keywords?
string The keywords for filtering cities.countryCode?
string The country code for filtering (ISO 3166-1 alpha-2, e.g., "US", "VN").stateCode?
string The state code for filtering.name?
string The city name for filtering.
See: Get Cities
Commission Rate API
The commissionRate
object manages commission rates.
createCommissionRate(params?: ICreateCommissionRateParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ICommissionRate>>
createCommissionRate(params?: ICreateCommissionRateParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ICommissionRate>>
Creates a new commission rate.
Parameters:
params?
ICreateCommissionRateParams Parameters for creating a commission rate.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateCommissionRateParams Fields:
type?
CommissionRateType The type of the commission rate.unit
string - min: 1 The unit of the commission rate.quantityFrom?
number - int32 The starting quantity for the commission rate.quantityTo?
number - int32 The ending quantity for the commission rate.percentage
number - double The percentage of the commission rate.description?
string The description of the commission rate.isDefault?
boolean Indicates if this is the default commission rate.
deleteCommissionRate(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deleteCommissionRate(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes a commission rate by ID.
Parameters:
id
IdType The ID of the commission rate.config?
AxiosRequestConfig Optional Axios request configuration.
getCommissionRate(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<ICommissionRate>>
getCommissionRate(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<ICommissionRate>>
Gets a commission rate by ID.
Parameters:
id
IdType The ID of the commission rate.config?
AxiosRequestConfig Optional Axios request configuration.
getDiscountValue(quantity: number, config?: AxiosRequestConfig) => Promise<HttpResponse<number>>
getDiscountValue(quantity: number, config?: AxiosRequestConfig) => Promise<HttpResponse<number>>
Gets the discount value based on quantity, using the user's commission rate.
Parameters:
quantity
number The quantity to check for discount.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get Discount Value
getCommissionRates(params?: IGetCommissionRatesParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ICommissionRate[]>>
getCommissionRates(params?: IGetCommissionRatesParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ICommissionRate[]>>
Gets a list of commission rates.
Parameters:
params?
IGetCommissionRatesParams Parameters for getting commission rates.config?
AxiosRequestConfig Optional Axios request configuration.
IGetCommissionRatesParams Fields:
type?
CommissionRateType Filter by type. The type can be one of the following: Discount, Commission.unit?
string The unit of the commission rate.isDefault?
boolean Filter by whether the commission rate is default.
See: Get Commission Rates
updateCommissionRate(id: IdType, params?: IUpdateCommissionRateParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
updateCommissionRate(id: IdType, params?: IUpdateCommissionRateParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Updates a commission rate by ID.
Parameters:
id
IdType The ID of the commission rate.params?
IUpdateCommissionRateParams Parameters for updating a commission rate.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateCommissionRateParams Fields:
type?
CommissionRateType The type of the commission rate.unit
string - min: 1 The unit of the commission rate.quantityFrom?
number - int32 The starting quantity for the commission rate.quantityTo?
number - int32 The ending quantity for the commission rate.percentage
number - double The percentage of the commission rate.description?
string The description of the commission rate.isDefault?
boolean Indicates if this is the default commission rate.
Configuration API
The configuration
object manages configurations.
createConfiguration(params: ICreateConfigurationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IConfiguration>>
createConfiguration(params: ICreateConfigurationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IConfiguration>>
Creates a new configuration.
Parameters:
params
ICreateConfigurationParams Parameters for creating a configuration.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateConfigurationParams Fields:
groupCode
string - min: 1 The group code of the configuration.code
string - min: 1 The code of the configuration.name
string - min: 1 The name of the configuration.description?
string The description of the configuration.value
string - min: 1 The value of the configuration.status?
ConfigurationStatus The status of the configuration.
deleteConfiguration(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deleteConfiguration(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes a configuration by ID.
Parameters:
id
IdType The ID of the configuration.config?
AxiosRequestConfig Optional Axios request configuration.
getConfigurations(params?: IGetConfigurationsParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IConfiguration[]>>
getConfigurations(params?: IGetConfigurationsParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IConfiguration[]>>
Gets a list of configurations.
Parameters:
params?
IGetConfigurationsParams Parameters for getting configurations.config?
AxiosRequestConfig Optional Axios request configuration.
IGetConfigurationsParams Fields:
groupCode?
string Filter by group code.code?
string Filter by code.name?
string Filter by name.description?
string Filter by description.value?
string Filter by value.status?
ConfigurationStatus Filter by status.
See: Get Configurations
getConfiguration(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IConfiguration>>
getConfiguration(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IConfiguration>>
Gets a configuration by ID.
Parameters:
id
IdType The ID of the configuration.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get a Configuration
updateConfiguration(id: IdType, params: IUpdateConfigurationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<unknown>>
updateConfiguration(id: IdType, params: IUpdateConfigurationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<unknown>>
Updates a configuration by ID.
Parameters:
id
IdType The ID of the configuration.params
IUpdateConfigurationParams Parameters for updating a configuration.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateConfigurationParams Fields:
groupCode
string - min: 1 The group code of the configuration.code
string - min: 1 The code of the configuration.name
string - min: 1 The name of the configuration.description?
string The description of the configuration.value
string - min: 1 The value of the configuration.status?
ConfigurationStatus The status of the configuration.
Constant API
The constant
object retrieves various constant types and statuses.
getBrandLinkTypes(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
getBrandLinkTypes(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
Gets all brand link types.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
See: Brand Link
getBlackListTypes(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
getBlackListTypes(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
Gets all black list types.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
See: Black List
getCouponStatuses(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
getCouponStatuses(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
Gets all coupon statuses.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
See: Coupon
getCommissionRateTypes(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
getCommissionRateTypes(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
Gets all commission rate types.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
See: Commission Rate
getDeviceStatuses(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
getDeviceStatuses(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
Gets all device statuses.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
See: Device Status
getDeviceTypes(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
getDeviceTypes(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
Gets all device types.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
See: Device Types
getInvoiceStatuses(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
getInvoiceStatuses(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
Gets all invoice statuses.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
See: Invoice Status
getInvoiceTypes(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
getInvoiceTypes(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
Gets all invoice types.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
See: Invoice Types
getIssuePriorities(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
getIssuePriorities(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
Gets all issue priorities.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
See: Issue
getLicenseSources(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
getLicenseSources(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
Gets all license sources.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
See: License Sources
getLicenseTypes(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
getLicenseTypes(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
Gets all license types.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
See: License Types
getLicenseStatuses(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
getLicenseStatuses(config?: AxiosRequestConfig) => Promise<HttpResponse<string[]>>
Gets all license statuses.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
See: License Status
Country API
The country
object manages country data.
getCountries(config?: AxiosRequestConfig) => Promise<HttpResponse<ICountry[]>>
getCountries(config?: AxiosRequestConfig) => Promise<HttpResponse<ICountry[]>>
Gets a list of all countries.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
IGetCountriesParams Fields:
region?
string The region of the country.subregion?
string The subregion of the country.codeAlpha2?
string The code alpha 2 of the country.codeAlpha3?
string The code alpha 3 of the country.codeNumeric?
number - int32 The code numeric of the country.codePhone?
string The code phone of the country.name?
string The name of the country.capital?
string The capital of the country.currency?
string The currency of the country.tld?
string The tld of the country.native?
string The native of the country.tags?
string The tags of the country.keywords?
string Filter by keywords.
See: Get Countries
Coupon API
The coupon
object manages coupons.
createCoupon(params: ICreateCouponParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ICoupon>>
createCoupon(params: ICreateCouponParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ICoupon>>
Creates a new coupon.
Parameters:
params
ICreateCouponParams Parameters for creating a coupon.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateCouponParams Fields:
name
string - min: 1 The name of the coupon.code
string - min: 1 The code of the coupon.percentage?
number - double The percentage of the coupon.quantity?
number - int32 The quantity of the coupon.startDate
DateType - date-time The start date and time of the coupon.endDate
DateType - date-time The end date and time of the coupon.autoApplyToPrice?
boolean Is the coupon auto apply to price. If true, the coupon will be applied to the price automatically.description?
string The description of the coupon.tags?
string The tags of the coupon.status?
CouponStatus The status of the coupon.testMode?
boolean The test mode of the coupon.
See: Create a Coupon
deleteCoupon(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deleteCoupon(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes a coupon by ID.
Parameters:
id
IdType The ID of the coupon.config?
AxiosRequestConfig Optional Axios request configuration.
See: Delete a Coupon
getCoupon(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<ICoupon>>
getCoupon(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<ICoupon>>
Gets a coupon by ID.
Parameters:
id
IdType The ID of the coupon.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get a Coupon
getCoupons(params?: IGetCouponsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<ICoupon>>
getCoupons(params?: IGetCouponsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<ICoupon>>
Gets a list of coupons.
Parameters:
params?
IGetCouponsParams Parameters for getting coupons.config?
AxiosRequestConfig Optional Axios request configuration.
IGetCouponsParams Fields:
name?
string Filter by the name of the coupon.code?
string Filter by the code of the coupon.description?
string Filter by the description of the coupon.percentage?
number - double Filter by the percentage of the coupon.quantity?
number - int32 Filter by the quantity of the coupon.autoApplyToPrice?
boolean Filter by the auto apply to price of the coupon.tags?
string Filter by the tags of the coupon.status?
CouponStatus Filter by the status of the coupon.keywords?
string Filter by the keywords of the coupon.testMode?
boolean Filter by the test mode of the coupon.
See: Get Coupons
updateCoupon(id: IdType, params: IUpdateCouponParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ICoupon>>
updateCoupon(id: IdType, params: IUpdateCouponParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ICoupon>>
Updates a coupon by ID.
Parameters:
id
IdType The ID of the coupon.params
IUpdateCouponParams Parameters for updating a coupon.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateCouponParams Fields:
name
string - min: 1 The name of the coupon.code
string - min: 1 The code of the coupon.percentage?
number - double The percentage of the coupon.quantity?
number - int32 The quantity of the coupon.startDate
DateType - date-time The start date and time of the coupon.endDate
DateType - date-time The end date and time of the coupon.autoApplyToPrice?
boolean Is the coupon auto apply to price. If true, the coupon will be applied to the price automatically.description?
string The description of the coupon.tags?
string The tags of the coupon.status?
CouponStatus The status of the coupon.testMode?
boolean The test mode of the coupon.
See: Update a Coupon
Cryptography API
The cryptography
object manages cryptographic operations.
generateRSAKeyPair(config?: AxiosRequestConfig) => Promise<HttpResponse<IRSAKeyPair>>
generateRSAKeyPair(config?: AxiosRequestConfig) => Promise<HttpResponse<IRSAKeyPair>>
Generates an RSA key pair.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
Currency API
The currency
object manages currency data.
getCurrencies(config?: AxiosRequestConfig) => Promise<HttpResponse<ICurrency[]>>
getCurrencies(config?: AxiosRequestConfig) => Promise<HttpResponse<ICurrency[]>>
Gets a list of all currencies.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
IGetCurrenciesParams Fields:
code?
string The code of the currency.name?
string The name of the currency.namePlural?
string The plural name of the currency.symbol?
string The symbol of the currency.symbolNative?
string The native symbol of the currency.decimalDigits?
number - int32 The number of decimal digits for the currency.rounding?
number - double The rounding value for the currency.tags?
string The tags for the currency.isCoin?
boolean Flag to indicate if the currency is a coin.keywords?
string The keywords for the currency.
See: Get Currencies
Device API
The device
object manages device data.
createDevice(params: ICreateDeviceParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IDevice>>
createDevice(params: ICreateDeviceParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IDevice>>
Creates a new device.
Parameters:
params
ICreateDeviceParams Parameters for creating a device.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateDeviceParams Fields:
type
DeviceType The type of the device.code
string - min: 1 The code of the device.isMobileApp?
boolean Flag indicating if the device is a mobile app.tags?
string The tags of the device.status?
DeviceStatus The status of the device.isDefault?
boolean Flag indicating if the device is the default device.testMode?
boolean The test mode of the device.name
string - min: 1 The name of the device.phoneNumber?
string The phone number of the device.osDevice
string - min: 1 The operating system of the device.appVersionNumber
string - min: 1 The version of the operating system of the device.iccid?
string The ICCID of the device.imsi?
string The IMSI of the device.imei?
string The IMEI of the device.simCardInfo?
string The SIM card info of the device.
See: Create a Device
deleteDevice(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deleteDevice(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes a device by ID.
Parameters:
id
IdType The ID of the device.config?
AxiosRequestConfig Optional Axios request configuration.
See: Delete a Device
getDevice(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IDevice>>
getDevice(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IDevice>>
Gets a device by ID.
Parameters:
id
IdType The ID of the device.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get a Device
getDevices(params?: IGetDevicesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IDevice>>
getDevices(params?: IGetDevicesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IDevice>>
Gets a list of devices.
Parameters:
params?
IGetDevicesParams Parameters for getting devices.config?
AxiosRequestConfig Optional Axios request configuration.
IGetDevicesParams Fields:
userId?
string Filter by ID of the user.type?
DeviceType Filter by type of the device.code?
string The code to filter.name?
string The name to filter.isMobileApp?
boolean Filter with is mobile app.testMode?
boolean The test mode to filter.status?
DeviceStatus The status to filter.keywords?
string The keywords to filter.
See: Get Devices
updateDevice(id: IdType, params: IUpdateDeviceParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IDevice>>
updateDevice(id: IdType, params: IUpdateDeviceParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IDevice>>
Updates a device by ID.
Parameters:
id
IdType The ID of the device.params
IUpdateDeviceParams Parameters for updating a device.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateDeviceParams Fields:
name
string - min: 1 The name of the device.phoneNumber?
string The phone number of the device.tags?
string The tags of the device.status?
DeviceStatus The status of the device.
See: Update a Device
checkUserAccessDevice(params: ICheckUserAccessDeviceParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
checkUserAccessDevice(params: ICheckUserAccessDeviceParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Checks if a user has access to a device.
Parameters:
params
ICheckUserAccessDeviceParams Parameters for checking user access to a device.config?
AxiosRequestConfig Optional Axios request configuration.
ICheckUserAccessDeviceParams Fields:
userId
IdType The ID of the user.deviceCode
string The device code of the user.
refreshDeviceToken(params: IRefreshDeviceTokenParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
refreshDeviceToken(params: IRefreshDeviceTokenParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Refreshes a mobile device token for Firebase push notifications.
Parameters:
params
IRefreshDeviceTokenParams Parameters for refreshing a device token.config?
AxiosRequestConfig Optional Axios request configuration.
IRefreshDeviceTokenParams Fields:
oldToken
string - min: 1 The previous Firebase device token that is now obsolete.newToken
string - min: 1 The new Firebase device token to replace the old one.
See: Refresh Device Token
Domain API
The domain
object manages domain-related operations.
BrandLinksAPI
Manages brand link operations.
createBrandLink(params: ICreateBrandLinkParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IBrandLink>>
Creates a new brand link.
Parameters:
params
ICreateBrandLinkParams Parameters for creating a brand link.config?
AxiosRequestConfig Optional Axios request configuration.
See: Create a Brand Link
deleteBrandLink(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes a brand link by ID.
Parameters:
id
IdType The ID of the brand link.config?
AxiosRequestConfig Optional Axios request configuration.
See: Delete a Brand Link
getBrandLink(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IBrandLink>>
Gets a brand link by ID.
Parameters:
id
IdType The ID of the brand link.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get a Brand Link
getBrandLinks(params?: IGetBrandLinksParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IBrandLink>>
Gets a list of brand links.
Parameters:
params?
IGetBrandLinksParams Parameters for getting brand links.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get Brand Links
updateBrandLink(id: IdType, params: IUpdateBrandLinkParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IBrandLink>>
Updates a brand link by ID.
Parameters:
id
IdType The ID of the brand link.params
IUpdateBrandLinkParams Parameters for updating a brand link.config?
AxiosRequestConfig Optional Axios request configuration.
See: Update a Brand Link
getDomains(params?: IGetDomainsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IDomain>>
getDomains(params?: IGetDomainsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IDomain>>
Gets a list of domains.
Parameters:
params?
IGetDomainsParams Parameters for getting domains.config?
AxiosRequestConfig Optional Axios request configuration.
IGetDomainsParams Fields:
type?
DomainType The type of the domain.protocol?
DomainProtocol The protocol of the domain.domain?
string The domain name.keywords?
string The keywords of the domain.verified?
boolean Filter by the verified domain.isDefault?
boolean Filter by the default domain.isPrimary?
boolean Filter by the primary domain.
See: Get Domains
Event API
The event
object manages events and their associated templates.
getEvent(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IEvent>>
getEvent(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IEvent>>
Gets an event by ID.
Parameters:
id
IdType The ID of the event.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get an Event
getEmailTemplateDefaultByEvent(eventId: IdType, params: IGetEmailTemplateDefaultByEventParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IDefaultEmailTemplate>>
getEmailTemplateDefaultByEvent(eventId: IdType, params: IGetEmailTemplateDefaultByEventParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IDefaultEmailTemplate>>
Gets the default email template for an event by ID and specified language code.
Parameters:
eventId
IdType The ID of the event.params
IGetEmailTemplateDefaultByEventParams Parameters for getting the default email template.config?
AxiosRequestConfig Optional Axios request configuration.
IGetEmailTemplateDefaultByEventParams Fields:
languageCode
string The code of the language. The language code must be in the ISO 639-1 format.
getEmailTemplateByEvent(eventId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IEmailTemplate>>
getEmailTemplateByEvent(eventId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IEmailTemplate>>
Gets an email template by event ID.
Parameters:
eventId
IdType The ID of the event.config?
AxiosRequestConfig Optional Axios request configuration.
getEvents(params?: IGetEventsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IEvent>>
getEvents(params?: IGetEventsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IEvent>>
Gets a list of events.
Parameters:
params?
IGetEventsParams Parameters for getting events.config?
AxiosRequestConfig Optional Axios request configuration.
IGetEventsParams Fields:
groupCodeName?
string Filter by GroupCodeName.code?
string Filter by Code.name?
string Filter by Name.description?
string Filter by Description.tags?
string Filter by Tags.zOrder?
number - int64 Filter by ZOrder.status?
EventStatus Filter by Status.isSystem?
boolean Filter by IsSystem.includeParentBrand?
boolean Filter by IncludeParentBrand.keywords?
string Filter by Keywords.
See: Get Events
getEventsEarningWallet(params?: IGetEventsEarningWalletParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IWalletEarningEvent>>
getEventsEarningWallet(params?: IGetEventsEarningWalletParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IWalletEarningEvent>>
Gets events related to wallet earnings (default type: Earning).
Parameters:
params?
IGetEventsEarningWalletParams Parameters for getting wallet earning events.config?
AxiosRequestConfig Optional Axios request configuration.
IGetEventsEarningWalletParams Fields:
type?
string The type of the wallet earning event. The value can be Earning or Redeem.
getEventsAssociatedWithEmailTemplates(config?: AxiosRequestConfig) => Promise<HttpResponse<IEvent[]>>
getEventsAssociatedWithEmailTemplates(config?: AxiosRequestConfig) => Promise<HttpResponse<IEvent[]>>
Gets events associated with email templates.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
getEventsAssociatedWithPhoneTemplates(config?: AxiosRequestConfig) => Promise<HttpResponse<IEvent[]>>
getEventsAssociatedWithPhoneTemplates(config?: AxiosRequestConfig) => Promise<HttpResponse<IEvent[]>>
Gets events associated with phone templates.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
getPhoneTemplateByEvent(eventId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPhoneTemplate>>
getPhoneTemplateByEvent(eventId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPhoneTemplate>>
Gets a phone template by event ID.
Parameters:
eventId
IdType The ID of the event.config?
AxiosRequestConfig Optional Axios request configuration.
getPhoneTemplateDefaultByEvent(eventId: IdType, params: IGetPhoneTemplateDefaultByEventParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IDefaultPhoneTemplate>>
getPhoneTemplateDefaultByEvent(eventId: IdType, params: IGetPhoneTemplateDefaultByEventParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IDefaultPhoneTemplate>>
Gets the default phone template for an event by ID and specified language code.
Parameters:
eventId
IdType The ID of the event.params
IGetPhoneTemplateDefaultByEventParams Parameters for getting the default phone template.config?
AxiosRequestConfig Optional Axios request configuration.
IGetPhoneTemplateDefaultByEventParams Fields:
languageCode
string The code of the language. The language code must be in the ISO 639-1 format.
Exchange Rate API
The exchangeRate
object manages exchange rates and currency conversions.
getExchangeRates(config?: AxiosRequestConfig) => Promise<HttpResponse<IExchangeRate[]>>
getExchangeRates(config?: AxiosRequestConfig) => Promise<HttpResponse<IExchangeRate[]>>
Gets all exchange rates in the system, relative to the base USD currency.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
See: Get Exchange Rates
convertCurrency(params: IConvertCurrencyParams, config?: AxiosRequestConfig) => Promise<HttpResponse<number>>
convertCurrency(params: IConvertCurrencyParams, config?: AxiosRequestConfig) => Promise<HttpResponse<number>>
Converts an amount from one currency to another.
Parameters:
params
IConvertCurrencyParams Parameters for converting currency.config?
AxiosRequestConfig Optional Axios request configuration.
IConvertCurrencyParams Fields:
fromCurrency
string The currency to convert from.toCurrency
string The currency to convert to.amount
number - double The amount to convert.
See: Convert Currency
Feature API
The feature
object manages features and their associated packages.
addPackagesToFeature(featureId: IdType, params: IAddPackageToFeatureParams[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
addPackagesToFeature(featureId: IdType, params: IAddPackageToFeatureParams[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Adds packages to a feature.
Parameters:
featureId
IdType The ID of the feature.params
IAddPackageToFeatureParams[] Parameters for adding packages to a feature.config?
AxiosRequestConfig Optional Axios request configuration.
IAddPackageToFeatureParams Fields:
packageId
IdType - min: 1 The ID of the package.
createFeature(params: ICreateFeatureParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IFeature>>
createFeature(params: ICreateFeatureParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IFeature>>
Creates a new feature.
Parameters:
params
ICreateFeatureParams Parameters for creating a feature.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateFeatureParams Fields:
eventId?
IdType - min: 1 The event ID. This value represents the event that the feature belongs to. (Deprecated: Will be removed in the future.)type?
FeatureType The type of the feature.code
string - min: 1 The code of the feature.name
string - min: 1 The name of the feature.unit?
string The unit of the feature.defaultValue?
number - int32 The default value of the feature.helpURL?
string - uri The help URL of the feature. This value must be a valid URL.image?
string - uri The image of the feature. This value must be a valid URL.styles?
string The style of the feature. It is a JSON string. You can use this property to store the CSS styles of the feature.description?
string The description of the feature. The description can be a long text.tags?
string The tags of the feature. You can use this property to store the tags of the feature.zOrder?
number - int64 The zOrder number in the list. This property is used to sort the features in the list when displaying them.status?
FeatureStatus The status of the feature.
See: Create a Feature
deleteFeature(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deleteFeature(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes a feature by ID.
Parameters:
id
IdType The ID of the feature.config?
AxiosRequestConfig Optional Axios request configuration.
See: Delete a Feature
getFeature(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IFeature>>
getFeature(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IFeature>>
Gets a feature by ID.
Parameters:
id
IdType The ID of the feature.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get a Feature
getFeatures(params?: IGetFeaturesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IFeature>>
getFeatures(params?: IGetFeaturesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IFeature>>
Gets a list of features.
Parameters:
params?
IGetFeaturesParams Parameters for getting features.config?
AxiosRequestConfig Optional Axios request configuration.
IGetFeaturesParams Fields:
packageId?
IdType Filter by the package ID.eventId?
IdType Filter by the event ID. (Deprecated: Will be removed in the future.)type?
FeatureType Filter by the feature type.code?
string Filter by the code.name?
string Filter by the name.description?
string Filter by the description.tags?
string Filter by the tags.notes?
string Filter by the notes.status?
FeatureStatus Filter by the status.keywords?
string Filter by the keywords.
See: Get Features
getPackagesFromFeature(featureId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPackage[]>>
getPackagesFromFeature(featureId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPackage[]>>
Gets packages associated with a feature.
Parameters:
featureId
IdType The ID of the feature.config?
AxiosRequestConfig Optional Axios request configuration.
removePackagesFromFeature(featureId: IdType, packageIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
removePackagesFromFeature(featureId: IdType, packageIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Removes packages from a feature.
Parameters:
featureId
IdType The ID of the feature.packageIds
IdType[] The IDs of the packages to remove.config?
AxiosRequestConfig Optional Axios request configuration.
updateFeature(id: IdType, params: IUpdateFeatureParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IFeature>>
updateFeature(id: IdType, params: IUpdateFeatureParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IFeature>>
Updates a feature by ID.
Parameters:
id
IdType The ID of the feature.params
IUpdateFeatureParams Parameters for updating a feature.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateFeatureParams Fields:
eventId?
IdType - min: 1 The event ID. This value represents the event that the feature belongs to. (Deprecated: Will be removed in the future.)type?
FeatureType The type of the feature.code
string - min: 1 The code of the feature.name
string - min: 1 The name of the feature.unit?
string The unit of the feature.defaultValue?
number - int32 The default value of the feature.helpURL?
string - uri The help URL of the feature. This value must be a valid URL.image?
string - uri The image of the feature. This value must be a valid URL.styles?
string The style of the feature. It is a JSON string. You can use this property to store the CSS styles of the feature.description?
string The description of the feature. The description can be a long text.tags?
string The tags of the feature. You can use this property to store the tags of the feature.zOrder?
number - int64 The zOrder number in the list. This property is used to sort the features in the list when displaying them.status?
FeatureStatus The status of the feature.
See: Update a Feature
Invoice API
The invoice
object manages invoices.
deleteInvoice(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deleteInvoice(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes an invoice by ID.
Parameters:
id
IdType The ID of the invoice.config?
AxiosRequestConfig Optional Axios request configuration.
See: Delete an Invoice
getInvoices(params?: IGetInvoicesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IInvoice>>
getInvoices(params?: IGetInvoicesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IInvoice>>
Gets a list of invoices.
Parameters:
params?
IGetInvoicesParams Parameters for getting invoices.config?
AxiosRequestConfig Optional Axios request configuration.
IGetInvoicesParams Fields:
userId?
IdType The ID of the user. If not provided, it will be the current user.packageId?
IdType The package ID.subscriptionTypeId?
IdType Filter by the subscription type ID.type?
InvoiceType Filter by the invoice type.code?
string Filter by the invoice code.name?
string Filter by the invoice name.description?
string Filter by the invoice description.notes?
string Filter by the invoice notes.tags?
string Filter by the invoice tags.reminderedCount?
number - int32 Filter by the number of reminders sent.deliveryInstructions?
string Filter by the delivery instructions.confirmedDeliveryDate?
DateType - date-time Filter by the confirmed delivery date.invoiceDate?
DateType - date-time Filter by the invoice date.overdueDate?
DateType - date-time Filter by the due date.status?
InvoiceStatus Filter by the status.keywords?
string Filter by the keywords.testMode?
boolean Filter by the test mode. By default, it is false.
See: Get Invoices
getInvoice(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IInvoice>>
getInvoice(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IInvoice>>
Gets an invoice by ID.
Parameters:
id
IdType The ID of the invoice.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get an Invoice
downloadInvoice(id: IdType, config?: AxiosRequestConfig) => Promise<Blob>
downloadInvoice(id: IdType, config?: AxiosRequestConfig) => Promise<Blob>
Downloads an invoice by ID.
Parameters:
id
IdType The ID of the invoice.config?
AxiosRequestConfig Optional Axios request configuration.
See: (Documentation to be updated in the future)
Issue API
The issue
object manages issues and their reactions.
createIssue(params: ICreateIssueParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IIssue>>
createIssue(params: ICreateIssueParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IIssue>>
Creates a new issue.
Parameters:
params
ICreateIssueParams Parameters for creating an issue.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateIssueParams Fields:
issueCategoryId?
IdType The ID of the issue category.parentId?
IdType The parent ID of the issue. If the issue is a sub-issue, this is the parent issue ID.content
string - min: 1 The content of the issue.refId?
number - int64 The referrer ID of the issue.refObject?
string The referrer object of the issue.refType?
number - int32 The referrer type of the issue.assigneeId?
IdType Assignee user ID of the issue.priority?
IssuePriority The priority of the issue.name?
string The name of the issue.description?
string The description of the issue.issueCc?
string The CC of the issue. This value is the email address of the user.tags?
string The tags of the issue.
See: Create an Issue
deleteIssue(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deleteIssue(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes an issue by ID.
Parameters:
id
IdType The ID of the issue.config?
AxiosRequestConfig Optional Axios request configuration.
See: Delete an Issue
getIssues(params?: IGetIssuesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IIssue>>
getIssues(params?: IGetIssuesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IIssue>>
Gets a list of issues.
Parameters:
params?
IGetIssuesParams Parameters for getting issues.config?
AxiosRequestConfig Optional Axios request configuration.
IGetIssuesParams Fields:
onlyParent?
boolean This property represents the only parent filter.userId?
IdType Filter with user ID.deviceId?
IdType Filter with device ID.assigneeId?
IdType Filter with assignee ID.issueTypeId?
IdType Filter with issue type ID.parentId?
IdType Filter with parent ID.name?
string Filter with name.description?
string Filter with description.refType?
number - int32 Filter with reference type.refObject?
string Filter with reference object.refId?
IdType Filter with reference ID.content?
string Filter with content.issueCc?
string Filter with issue CC.tags?
string Filter with tags.status?
IssueStatus Filter with status.keywords?
string Filter with keywords.
See: Get Issues
getIssue(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IIssue>>
getIssue(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IIssue>>
Gets an issue by ID.
Parameters:
id
IdType The ID of the issue.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get an Issue
getIssuesByListId(ids: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<IIssue[]>>
getIssuesByListId(ids: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<IIssue[]>>
Gets a list of issues by their IDs (maximum 100 issues).
Parameters:
ids
IdType[] The list of issue IDs.config?
AxiosRequestConfig Optional Axios request configuration.
getChildrenIssues(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IIssue[]>>
getChildrenIssues(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IIssue[]>>
Gets the children of an issue by ID.
Parameters:
id
IdType The ID of the issue.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get Children Issues
updateIssue(params: IUpdateIssueParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IIssue>>
updateIssue(params: IUpdateIssueParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IIssue>>
Updates an issue by ID.
Parameters:
params
IUpdateIssueParams Parameters for updating an issue, includingid
.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateIssueParams Fields:
id
IdType The ID of the issue.assigneeId?
IdType Assignee user ID of the issue.name?
string The name of the issue.description?
string The description of the issue.content
string - min: 1 The content of the issue.priority?
IssuePriority The priority of the issue.issueCc?
string The CC of the issue. This value is the email address of the user.tags?
string The tags of the issue.status?
IssueStatus The status of the issue.
See: Update an Issue
createIssueReaction(params: ICreateIssueReactionParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
createIssueReaction(params: ICreateIssueReactionParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Creates an issue reaction.
Parameters:
params
ICreateIssueReactionParams Parameters for creating an issue reaction.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateIssueReactionParams Fields:
issueId
IdType - min: 1 The ID of the issue.issueReactionType
IssueReactionType The type of reaction for the issue.status
IssueReactionStatus The status of the issue reaction.
deleteIssueReaction(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deleteIssueReaction(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes an issue reaction by ID.
Parameters:
id
IdType The ID of the issue reaction.config?
AxiosRequestConfig Optional Axios request configuration.
Issue Category API
The issueCategory
object manages issue categories.
createIssueCategory(params: ICreateIssueCategoryParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IIssueCategory>>
createIssueCategory(params: ICreateIssueCategoryParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IIssueCategory>>
Creates a new issue category.
Parameters:
params
ICreateIssueCategoryParams Parameters for creating an issue category.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateIssueCategoryParams Fields:
groupCode?
string The group code of the issue category. If null, it is a root issue category.code
string - min: 1 The code of the issue category.name
string - min: 1 The name of the issue category.description?
string The description of the issue category.tags?
string The tags of the issue category.suggestionURL?
string - uri The links of the issue category.
deleteIssueCategory(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deleteIssueCategory(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes an issue category by ID.
Parameters:
id
IdType The ID of the issue category.config?
AxiosRequestConfig Optional Axios request configuration.
getIssueCategories(params?: IGetIssueCategoriesParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IIssueCategory[]>>
getIssueCategories(params?: IGetIssueCategoriesParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IIssueCategory[]>>
Gets a list of issue categories.
Parameters:
params?
IGetIssueCategoriesParams Parameters for getting issue categories.config?
AxiosRequestConfig Optional Axios request configuration.
IGetIssueCategoriesParams Fields:
groupCode?
string Filter by group code.code?
string Filter by code.name?
string Filter by name.description?
string Filter by description.suggestionURL?
string Filter by suggestion URL.tags?
string Filter by tags.zOrder?
number - int64 Filter by z order.status?
IssueCategoryStatus Filter by status. Examples: 0 - Inactive, 1 - Active.isSystem?
boolean Filter by is system.
See: Get Issue Categories
getIssueCategory(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IIssueCategory>>
getIssueCategory(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IIssueCategory>>
Gets an issue category by ID.
Parameters:
id
IdType The ID of the issue category.config?
AxiosRequestConfig Optional Axios request configuration.
updateIssueCategory(id: IdType, params: IUpdateIssueCategoryParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IIssueCategory>>
updateIssueCategory(id: IdType, params: IUpdateIssueCategoryParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IIssueCategory>>
Updates an issue category by ID.
Parameters:
id
IdType The ID of the issue category.params
IUpdateIssueCategoryParams Parameters for updating an issue category.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateIssueCategoryParams Fields:
groupCode?
string The group code of the issue category. If null, it is a root issue category.code
string - min: 1 The code of the issue category.name
string - min: 1 The name of the issue category.description?
string The description of the issue category.tags?
string The tags of the issue category.suggestionURL?
string - uri The links of the issue category.
Language API
The language
object manages languages.
getLanguages(config?: AxiosRequestConfig) => Promise<HttpResponse<ILanguage[]>>
getLanguages(config?: AxiosRequestConfig) => Promise<HttpResponse<ILanguage[]>>
Gets a list of all languages.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
See: Get Languages
License API
The license
object manages licenses.
activateLicense(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<ILicense>>
activateLicense(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<ILicense>>
Activates a license based on its current state. If NotStarted, sets StartDate to a valid past date. If Expired, sets EndDate to a future date. If Inactive, sets both if necessary. Does nothing if already Used.
Parameters:
id
IdType The ID of the license.config?
AxiosRequestConfig Optional Axios request configuration.
See: Activate a License
applyLicenseToLoggedUser(licenseCode: string, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
applyLicenseToLoggedUser(licenseCode: string, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Applies a license to the logged-in user, enabling the user to use the license's features and sending a notification email.
Parameters:
licenseCode
string The license code to apply.config?
AxiosRequestConfig Optional Axios request configuration.
applyLicenseToGivenLoginName(params: IApplyLicenseToGivenLoginNameParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
applyLicenseToGivenLoginName(params: IApplyLicenseToGivenLoginNameParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Applies a license code to a user by their login name, enabling the user to use the license's features and sending a notification email.
Parameters:
params
IApplyLicenseToGivenLoginNameParams Parameters for applying a license to a given login name.config?
AxiosRequestConfig Optional Axios request configuration.
IApplyLicenseToGivenLoginNameParams Fields:
licenseCode
string The license code.loginName
string The login name.
applyLicenseToGivenUser(params: IApplyLicenseToGivenUserParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
applyLicenseToGivenUser(params: IApplyLicenseToGivenUserParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Applies a license code to a user by their user ID, enabling the user to use the license's features and sending a notification email.
Parameters:
params
IApplyLicenseToGivenUserParams Parameters for applying a license to a given user.config?
AxiosRequestConfig Optional Axios request configuration.
IApplyLicenseToGivenUserParams Fields:
licenseCode
string The license code.userId
IdType The user ID.
checkLicenseCode(licenseCode: string, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
checkLicenseCode(licenseCode: string, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Checks the status of a given license code.
Parameters:
licenseCode
string The license code to check.config?
AxiosRequestConfig Optional Axios request configuration.
See: Checks a License
createLicenses(params: ICreateLicensesParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ICountSuccessResponse>>
createLicenses(params: ICreateLicensesParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ICountSuccessResponse>>
Creates new licenses.
Parameters:
params
ICreateLicensesParams Parameters for creating licenses.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateLicensesParams Fields:
packageId
IdType - min: 1 The ID of the package.subscriptionTypeId
IdType - min: 1 The ID of the subscription type.code?
string The license code custom. If provided, creates with this code; otherwise, auto-generates. Cannot be used for multiple licenses.amount
number - double The amount value of a license to be created.currencyCode
string The currency code in ISO 4217 format, a three-letter uppercase code identifying a specific currency.startDate
DateType - date-time The start date of the license.endDate
DateType - date-time The end date of the license.description?
string The description of the license.tags?
string The tags of the license.testMode
boolean The test mode of the license. By default, it is set to false.quantity?
number - int32 The quantity of licenses to create. By default, it is 1.userCode?
string - min: 1 The user code of the license. If empty, uses the current logged-in user.
See: Create the Licenses
countLicensesCreated(config?: AxiosRequestConfig) => Promise<HttpResponse<ICountSuccessResponse>>
countLicensesCreated(config?: AxiosRequestConfig) => Promise<HttpResponse<ICountSuccessResponse>>
Counts the number of licenses created by each user.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
deactivateLicense(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<ILicense>>
deactivateLicense(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<ILicense>>
Deactivates a license.
Parameters:
id
IdType The ID of the license.config?
AxiosRequestConfig Optional Axios request configuration.
See: Deactivate a License
deleteLicense(id: IdType) => Promise<HttpResponse<boolean>>
deleteLicense(id: IdType) => Promise<HttpResponse<boolean>>
Deletes a license by ID.
Parameters:
id
IdType The ID of the license.
See: Delete a License
getLicenses(params?: IGetLicensesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<ILicense>>
getLicenses(params?: IGetLicensesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<ILicense>>
Gets a list of licenses.
Parameters:
params?
IGetLicensesParams Parameters for getting licenses.config?
AxiosRequestConfig Optional Axios request configuration.
IGetLicensesParams Fields:
packageId?
IdType The package ID filter.subscriptionTypeId?
IdType The subscription type ID filter.licenseCode?
string The license code filter.sourceId?
string The source ID filter.refLicense?
string The reference license filter.description?
string The description filter.isUsed?
boolean Used to filter the license by used status.startDate?
DateType - date-time The start date filter.endDate?
DateType - date-time The end date filter.tags?
string The tags filter.status?
LicenseStatus The status filter.type?
LicenseType The type filter.usedBy?
string The user who used the license. The value is the code of the user.usedDate?
DateType - date-time The used date filter.testMode?
boolean The test mode filter. By default, the value is false.keywords?
string The keyword to filter.createdBy?
string The user who created the license. The value is the code of the user.
See: Get Licenses
getLicense(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<ILicense>>
getLicense(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<ILicense>>
Gets a license by ID.
Parameters:
id
IdType The ID of the license.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get a License
generateLicenseCode(params: IGenerateLicenseCodeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
generateLicenseCode(params: IGenerateLicenseCodeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
Generates a license code, which is not stored in the system.
Parameters:
params
IGenerateLicenseCodeParams Parameters for generating a license code.config?
AxiosRequestConfig Optional Axios request configuration.
IGenerateLicenseCodeParams Fields:
packageId
IdType The package ID of the license.subscriptionTypeId
IdType The subscription type ID of the license.startDate?
DateType - date-time The start date of the license.
purchaseToAddLicensesByCheckoutLink(params: IPurchaseToAddLicensesByCheckoutLinkParams, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
purchaseToAddLicensesByCheckoutLink(params: IPurchaseToAddLicensesByCheckoutLinkParams, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
Generates a checkout link to purchase licenses.
Parameters:
params
IPurchaseToAddLicensesByCheckoutLinkParams Parameters for purchasing licenses via checkout link.config?
AxiosRequestConfig Optional Axios request configuration.
IPurchaseToAddLicensesByCheckoutLinkParams Fields:
returnURL?
string - uri The return URL. If the payment is successful, the user will be redirected to this URL.cancelURL?
string - uri The cancel URL. If the payment is canceled, the user will be redirected to this URL.packageId
IdType - min: 1 The package ID of the license.subscriptionTypeId
IdType - min: 1 The subscription type ID of the license.startDate
DateType - date-time The start date of the license.endDate
DateType - date-time The end date of the license.testMode?
boolean The test mode of the license. By default, it is set to false.quantity?
number - int32 The quantity of the license to create. By default, it is 1.
purchaseToAddLicensesByWallet(params: IPurchaseToAddLicensesByWalletParams, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
purchaseToAddLicensesByWallet(params: IPurchaseToAddLicensesByWalletParams, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
Purchases licenses using the user's wallet.
Parameters:
params
IPurchaseToAddLicensesByWalletParams Parameters for purchasing licenses via wallet.config?
AxiosRequestConfig Optional Axios request configuration.
IPurchaseToAddLicensesByWalletParams Fields:
walletId
IdType The wallet ID.packageId
IdType - min: 1 The package ID of the license.subscriptionTypeId
IdType - min: 1 The subscription type ID of the license.type
LicenseType The type of the license.code?
string The license code custom. If provided, creates with this code; otherwise, auto-generates. Cannot be used for multiple licenses.startDate
DateType - date-time The start date of the license.endDate
DateType - date-time The end date of the license.description?
string The description of the license.tags?
string The tags of the license.testMode
boolean The test mode of the license. By default, it is set to false.quantity
number - int32 The quantity of the license to create. By default, it is 1.userCode
string - min: 1 The user code of the license. If empty, uses the current logged-in user.
statisticsLicensesMonthly(params?: IStatisticLicensesMonthlyParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ILicenseStatisticsReportSummary>>
statisticsLicensesMonthly(params?: IStatisticLicensesMonthlyParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ILicenseStatisticsReportSummary>>
Retrieves monthly license usage statistics for reporting and analysis, including totals for licenses created, active, expired, used, unused, and financial details like total amount, refund, and postpaid billing.
Parameters:
params?
IStatisticLicensesMonthlyParams Parameters for getting monthly license statistics.config?
AxiosRequestConfig Optional Axios request configuration.
IStatisticLicensesMonthlyParams Fields:
packageId?
IdType The ID of the package.subscriptionTypeId?
IdType The ID of the subscription type.type?
LicenseType The type of the license.status?
LicenseStatus The status of the license.
updateLicense(params: IUpdateLicenseParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ILicense>>
updateLicense(params: IUpdateLicenseParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ILicense>>
Updates a license by ID.
Parameters:
params
IUpdateLicenseParams Parameters for updating a license, includingid
.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateLicenseParams Fields:
id
IdType The ID of the license.packageId
IdType - min: 1 The ID of the package.subscriptionTypeId
IdType - min: 1 The ID of the subscription type.amount
number - double The amount value of a license to be created.currencyCode
string The currency code in ISO 4217 format, a three-letter uppercase code identifying a specific currency.startDate
DateType - date-time The start date of the license.endDate
DateType - date-time The end date of the license.description?
string The description of the license.tags?
string The tags of the license.testMode
boolean The test mode of the license. By default, it is set to false.
See: Update a License
MFA API
The mfa
object manages multiple factor authentication methods.
getListOfMFA(config?: AxiosRequestConfig) => Promise<HttpResponse<IMFA[]>>
getListOfMFA(config?: AxiosRequestConfig) => Promise<HttpResponse<IMFA[]>>
Gets a list of multiple factor authentication methods available for the user.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
See: Get a List of MFA
Notification API
The notification
object manages notifications and broadcasts.
createBroadcast(params: ICreateBroadcastParams, config?: AxiosRequestConfig) => Promise<HttpResponse<INotification>>
createBroadcast(params: ICreateBroadcastParams, config?: AxiosRequestConfig) => Promise<HttpResponse<INotification>>
Creates a new broadcast, generating individual notifications for relevant users.
Parameters:
params
ICreateBroadcastParams Parameters for creating a broadcast.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateBroadcastParams Fields:
title
string - min: 1 The main title of the notification. Displayed prominently to the user.type
NotificationType The type of the notification.channel
NotificationChannel The channel of the notification.content
string - min: 1 The main message or body of the notification.actionURL?
string | null - uri The action URL. Deep link URL for action buttons.category?
string | null A general grouping or category label for notifications, useful for organizing and filtering.topic?
string | null A more specific sub-label or theme related to the notification, such as a campaign name or feature tag.metadata?
Record<string, string> | null Set of key-value pairs that you can attach to an object. Useful for storing additional information in a structured format.scheduledDate?
DateType | null The date and time at which the notification should be sent. If null, it will be sent immediately.conditions?
Record<string, ISegmentCondition> | null The conditions to filter the recipients.
See: Create a Broadcast
getNotification(notificationId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<INotification>>
getNotification(notificationId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<INotification>>
Gets a notification by ID.
Parameters:
notificationId
IdType The ID of the notification.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get a Notification
getNotifications(params?: IGetNotificationsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<INotification>>
getNotifications(params?: IGetNotificationsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<INotification>>
Gets a list of notifications.
Parameters:
params?
IGetNotificationsParams Parameters for getting notifications.config?
AxiosRequestConfig Optional Axios request configuration.
IGetNotificationsParams Fields:
type?
NotificationType The type of the notification.channel?
NotificationChannel The channel of the notification.title?
string The title of the notification.content?
string The content of the notification.actionUrl?
string - uri The action URL of the notification.category?
string The category of the notification.topic?
string The topic of the notification.testMode?
boolean Flag to indicate if the notification is in test mode.status?
NotificationStatus | null The status of the notification.
See: Get Notifications
pushNotificationMessageForTokens(params: IPushNotificationMessageForTokensParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPushNotificationResponse>>
pushNotificationMessageForTokens(params: IPushNotificationMessageForTokensParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPushNotificationResponse>>
Pushes a notification with the given title and body to the specified device tokens.
Parameters:
params
IPushNotificationMessageForTokensParams Parameters for pushing a notification message.config?
AxiosRequestConfig Optional Axios request configuration.
IPushNotificationMessageForTokensParams Fields:
title
string The title of the notification.body
string The body of the notification.deviceTokens
string[] The list of device tokens.
pushNotificationDataMessageByTokens(deviceTokens: string[], data: Object, config?: AxiosRequestConfig) => Promise<HttpResponse<IPushNotificationResponse>>
pushNotificationDataMessageByTokens(deviceTokens: string[], data: Object, config?: AxiosRequestConfig) => Promise<HttpResponse<IPushNotificationResponse>>
Pushes a notification with data messages to the specified device tokens.
Parameters:
deviceTokens
string[] The list of device tokens.data
Object The data for the notification.config?
AxiosRequestConfig Optional Axios request configuration.
testPushNotificationDataMessage(params: ITestPushNotificationDataMessageParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ICountSuccessResponse>>
testPushNotificationDataMessage(params: ITestPushNotificationDataMessageParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ICountSuccessResponse>>
Tests pushing a notification message to the given device tokens.
Parameters:
params
ITestPushNotificationDataMessageParams Parameters for testing a push notification.config?
AxiosRequestConfig Optional Axios request configuration.
ITestPushNotificationDataMessageParams Fields:
projectId
string The ID of the project in the notification app.privateKey
string The private key in the notification app.clientEmail
string The client email in the notification app.title
string The title of the notification.body
string The body of the notification.tokens
string[] The list of tokens.
Organization API
The organization
object manages organizations and their users.
addNewUserToOrganization(id: IdType, userId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
addNewUserToOrganization(id: IdType, userId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Adds a new user to an organization.
Parameters:
id
IdType The ID of the organization.userId
IdType The ID of the user to add.config?
AxiosRequestConfig Optional Axios request configuration.
addUserForDefaultLanguageCodeOrganizationSystem(userId: IdType, languageCode: string, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
addUserForDefaultLanguageCodeOrganizationSystem(userId: IdType, languageCode: string, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Adds a new user to the organization system with the specified default language.
Parameters:
userId
IdType The ID of the user to add.languageCode
string The language code to use.config?
AxiosRequestConfig Optional Axios request configuration.
assignRoleForUserInOrganization(organizationId: IdType, params: IAssignRoleForUserInOrganizationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
assignRoleForUserInOrganization(organizationId: IdType, params: IAssignRoleForUserInOrganizationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Assigns a role to a user in an organization.
Parameters:
organizationId
IdType The ID of the organization.params
IAssignRoleForUserInOrganizationParams Parameters for assigning a role.config?
AxiosRequestConfig Optional Axios request configuration.
IAssignRoleForUserInOrganizationParams Fields:
roleId
IdType - min: 1 The ID of the role to assign.userId
IdType - min: 1 The ID of the user to assign the role to.
createOrganization(params: ICreateOrganizationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IOrganization>>
createOrganization(params: ICreateOrganizationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IOrganization>>
Creates a new organization.
Parameters:
params
ICreateOrganizationParams Parameters for creating an organization.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateOrganizationParams Fields:
countryCode?
string | null The country code of the organization.languageCode?
string | null The language code of the organization.name
string - min: 1 The name of the organization.description
string - min: 1 The description of the organization.avatar?
string | null - uri The avatar of the organization.isPrivate?
boolean | null The is private status of the organization. By default, it is set to false.isDefault?
boolean | null The is default status of the organization. By default, it is set to false.status?
OrganizationStatus | null The status of the organization.
deleteOrganization(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deleteOrganization(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes an organization by ID.
Parameters:
id
IdType The ID of the organization.config?
AxiosRequestConfig Optional Axios request configuration.
getOrganization(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IOrganization>>
getOrganization(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IOrganization>>
Gets an organization by ID.
Parameters:
id
IdType The ID of the organization.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get an Organization
getOrganizations(params?: IGetOrganizationsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IOrganization>>
getOrganizations(params?: IGetOrganizationsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IOrganization>>
Gets a list of organizations.
Parameters:
params?
IGetOrganizationsParams Parameters for getting organizations.config?
AxiosRequestConfig Optional Axios request configuration.
IGetOrganizationsParams Fields:
userId?
IdType The param UserId to apply filter.countryCode?
string The param CountryCode to apply filter.languageCode?
string The param LanguageCode to apply filter.code?
string The param Code to apply filter.name?
string The param Name to apply filter.description?
string The param Description to apply filter.avatar?
string The param Avatar to apply filter.isPrivate?
boolean The param IsPrivate to apply filter.status?
OrganizationStatus The param Status to apply filter.userStatus?
OrganizationUserStatus The param Status to apply filter. This status is the status of the user in the organization.keywords?
string The param Keywords to apply filter.
See: Get Organizations
getUsersOfOrganization(organizationId: IdType, params?: IGetUsersOfOrganizationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IOrganizationUser>>
getUsersOfOrganization(organizationId: IdType, params?: IGetUsersOfOrganizationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IOrganizationUser>>
Gets the users of an organization.
Parameters:
organizationId
IdType The ID of the organization.params?
IGetUsersOfOrganizationParams Parameters for getting users.config?
AxiosRequestConfig Optional Axios request configuration.
IGetUsersOfOrganizationParams Fields:
userId?
IdType The user ID filter.roleId?
IdType The role ID filter.status?
OrganizationUserStatus | null Filter by status of the user in the organization.
removeUserInOrganization(organizationId: IdType, userId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
removeUserInOrganization(organizationId: IdType, userId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Removes a user from an organization.
Parameters:
organizationId
IdType The ID of the organization.userId
IdType The ID of the user.config?
AxiosRequestConfig Optional Axios request configuration.
updateOrganization(id: IdType, params: IUpdateOrganizationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
updateOrganization(id: IdType, params: IUpdateOrganizationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Updates an organization by ID.
Parameters:
id
IdType The ID of the organization.params
IUpdateOrganizationParams Parameters for updating an organization.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateOrganizationParams Fields:
countryCode?
string | null The country code of the organization.languageCode?
string | null The language code of the organization.name
string - min: 1 The name of the organization.description
string - min: 1 The description of the organization.avatar?
string | null - uri The avatar of the organization.isPrivate?
boolean | null The is private status of the organization. By default, it is set to false.isDefault?
boolean | null The is default status of the organization. By default, it is set to false.status?
OrganizationStatus | null The status of the organization.
updateUserStatusInOrganization(organizationId: IdType, params: IUpdateUserStatusInOrganizationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
updateUserStatusInOrganization(organizationId: IdType, params: IUpdateUserStatusInOrganizationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Updates a user's status in an organization.
Parameters:
organizationId
IdType The ID of the organization.params
IUpdateUserStatusInOrganizationParams Parameters for updating a user's status.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateUserStatusInOrganizationParams Fields:
status
OrganizationUserStatus The status of the user in the organization.userIds
IdType[] The list of user IDs.
Package API
The package
object manages packages and their features.
addFeaturesToPackage(packageId: IdType, params: IAddFeatureToPackageParams[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
addFeaturesToPackage(packageId: IdType, params: IAddFeatureToPackageParams[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Adds features to a package.
Parameters:
packageId
IdType The ID of the package.params
IAddFeatureToPackageParams[] Parameters for adding features.config?
AxiosRequestConfig Optional Axios request configuration.
IAddFeatureToPackageParams Fields:
featureId
string - min: 1 The feature ID.
calculateTotalPriceCheckout(params: ICalculateTotalPriceCheckoutParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ICalculateTotalPriceCheckoutResponse>>
calculateTotalPriceCheckout(params: ICalculateTotalPriceCheckoutParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ICalculateTotalPriceCheckoutResponse>>
Calculates the total price of a package at checkout, considering wallet, refund, prorate, subtotal, tax, and total price.
Parameters:
params
ICalculateTotalPriceCheckoutParams Parameters for calculating total price.config?
AxiosRequestConfig Optional Axios request configuration.
ICalculateTotalPriceCheckoutParams Fields:
packageId
IdType The ID of the package for which the total price is being calculated.priceId
IdType - min: 1 The ID of the package to calculate the total price for.walletId?
IdType | null The ID of the app integration payment gateway to use for the calculation.couponCode?
string | null The coupon code to apply for the price calculation, if any.
createPackage(params: ICreatePackageParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPackage>>
createPackage(params: ICreatePackageParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPackage>>
Creates a new package.
Parameters:
params
ICreatePackageParams Parameters for creating a package.config?
AxiosRequestConfig Optional Axios request configuration.
ICreatePackageParams Fields:
code
string - min: 1 The code of the package.name
string - min: 1 The name of the package.imageURL?
string | null - uri The image URL of the package.patternAvatarURL?
string | null - uri The pattern avatar URL of the package.styles?
string | null The styles of the package. This value is a JSON string.description?
string | null The description of the package.tags?
string | null The tags of the package.zOrder?
number - int64 The order of the package. Default is 1.isDefault?
boolean Flag to indicate if the package is default. Default is false.
See: Create a Package
deletePackage(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deletePackage(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes a package by ID.
Parameters:
id
IdType The ID of the package.config?
AxiosRequestConfig Optional Axios request configuration.
See: Delete a Package
getPackage(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPackage>>
getPackage(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPackage>>
Gets a package by ID.
Parameters:
id
IdType The ID of the package.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get a Package
getFeaturesFromPackage(packageId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IFeatureOfPackage[]>>
getFeaturesFromPackage(packageId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IFeatureOfPackage[]>>
Gets features associated with a package.
Parameters:
packageId
IdType The ID of the package.config?
AxiosRequestConfig Optional Axios request configuration.
getPackages(params?: IGetPackagesParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPackage[]>>
getPackages(params?: IGetPackagesParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPackage[]>>
Gets a list of packages.
Parameters:
params?
IGetPackagesParams Parameters for getting packages.config?
AxiosRequestConfig Optional Axios request configuration.
IGetPackagesParams Fields:
name?
string Filter by the name.code?
string Filter by the code.description?
string Filter by the description.tags?
string Filter by the tags.isDefault?
boolean Filter by the default package.keywords?
string Filter by the keywords.
See: Get Packages
getPricesFromPackage(packageId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPrice[]>>
getPricesFromPackage(packageId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPrice[]>>
Gets prices associated with a package by its ID.
Parameters:
packageId
IdType The ID of the package.config?
AxiosRequestConfig Optional Axios request configuration.
removeFeaturesFromPackage(packageId: IdType, featureIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
removeFeaturesFromPackage(packageId: IdType, featureIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Removes features from a package.
Parameters:
packageId
IdType The ID of the package.featureIds
IdType[] The list of feature IDs to remove.config?
AxiosRequestConfig Optional Axios request configuration.
renewalOrUpgradeUserPackage(params: IRenewalOrUpgradeUserPackageParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IRenewalOrUpgradeUserPackageResponse>>
renewalOrUpgradeUserPackage(params: IRenewalOrUpgradeUserPackageParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IRenewalOrUpgradeUserPackageResponse>>
Renews or upgrades a user's package.
Parameters:
params
IRenewalOrUpgradeUserPackageParams Parameters for renewing or upgrading a package.config?
AxiosRequestConfig Optional Axios request configuration.
IRenewalOrUpgradeUserPackageParams Fields:
packageId
IdType The ID of the package.priceId
IdType - min: 1 The ID of the package to calculate the total price for.walletId?
string | null The ID of the app integration payment gateway to use for the calculation.refundWalletId?
string | null The ID of the wallet to refund if the proration amount exceeds the upgrade price.couponCode?
string | null The coupon code to apply for the price calculation, if any.appIntegrationId?
string | null The ID of the app integration associated with the package upgrade.
updatePackage(id: IdType, params: IUpdatePackageParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPackage>>
updatePackage(id: IdType, params: IUpdatePackageParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPackage>>
Updates a package by ID.
Parameters:
id
IdType The ID of the package.params
IUpdatePackageParams Parameters for updating a package.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdatePackageParams Fields:
code
string - min: 1 The code of the package.name
string - min: 1 The name of the package.imageURL?
string | null - uri The image URL of the package.patternAvatarURL?
string | null - uri The pattern avatar URL of the package.styles?
string | null The styles of the package. This value is a JSON string.description?
string | null The description of the package.tags?
string | null The tags of the package.zOrder?
number - int64 The order of the package. Default is 1.isDefault?
boolean Flag to indicate if the package is default. Default is false.
See: Update a Package
updatePackageFeatureData(pathParams: IUpdatePackageFeatureDataPathParams, params: IUpdatePackageFeatureDataParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
updatePackageFeatureData(pathParams: IUpdatePackageFeatureDataPathParams, params: IUpdatePackageFeatureDataParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Updates package feature data.
Parameters:
pathParams
IUpdatePackageFeatureDataPathParams Path parameters for updating package feature data.params
IUpdatePackageFeatureDataParams Parameters for updating package feature data.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdatePackageFeatureDataPathParams Fields:
packageId
IdType The ID of the package.featureId
IdType The ID of the feature.
IUpdatePackageFeatureDataParams Fields:
title?
string | null The title of the feature. This title is used to display the feature in the UI.value?
number | null - int32 The value of the feature follow by package.isUnlimited?
boolean | null Flag to indicate if the feature is unlimited. Default is false.
Payment API
The payment
object manages payments.
generatePaymentCheckoutLink(params: IGeneratePaymentCheckoutLinkParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPaymentGenerateCheckoutLinkResponse>>
generatePaymentCheckoutLink(params: IGeneratePaymentCheckoutLinkParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPaymentGenerateCheckoutLinkResponse>>
Generates a checkout link to make a payment.
Parameters:
params
IGeneratePaymentCheckoutLinkParams Parameters for generating a payment checkout link.config?
AxiosRequestConfig Optional Axios request configuration.
IGeneratePaymentCheckoutLinkParams Fields:
id
IdType The ID of the payment.appIntegrationId?
IdType The identifier of the specific app integration payment gateway to use for generating the checkout link.
getPayment(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPayment>>
getPayment(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPayment>>
Gets a payment by ID.
Parameters:
id
IdType The ID of the payment.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get a Payment
getPayments(params?: IGetPaymentsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IPayment>>
getPayments(params?: IGetPaymentsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IPayment>>
Gets a list of payments based on the given filter.
Parameters:
params?
IGetPaymentsParams Parameters for getting payments.config?
AxiosRequestConfig Optional Axios request configuration.
IGetPaymentsParams Fields:
appIntegrationPaymentGatewayId?
string Filter by the app integration payment gateway ID.priceId?
string The price ID.code?
string The payment request code.userId?
IdType The ID of the user.referralUserCode?
string The reference user code.status?
PaymentStatus | null The status of the payment request.paymentType?
string The payment request type.currencyCode?
string The currency code.keywords?
string The keywords to filter.testMode?
boolean The payment request amount.
See: Get Payments
getOverviewSellDashboard(testMode?: boolean, config?: AxiosRequestConfig) => Promise<HttpResponse<IPaymentDashboard>>
getOverviewSellDashboard(testMode?: boolean, config?: AxiosRequestConfig) => Promise<HttpResponse<IPaymentDashboard>>
Calculates the metric overview dashboard for payments.
Parameters:
testMode?
boolean Query parameter to enable test mode.config?
AxiosRequestConfig Optional Axios request configuration.
Permission API
The permission
object manages permissions and their associated roles.
addRolesToPermission(permissionId: IdType, roleIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
addRolesToPermission(permissionId: IdType, roleIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Adds roles to a permission.
Parameters:
permissionId
IdType The ID of the permission.roleIds
IdType[] The list of role IDs.config?
AxiosRequestConfig Optional Axios request configuration.
createPermission(params: ICreatePermissionParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPermission>>
createPermission(params: ICreatePermissionParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPermission>>
Creates a new permission.
Parameters:
params
ICreatePermissionParams Parameters for creating a permission.config?
AxiosRequestConfig Optional Axios request configuration.
ICreatePermissionParams Fields:
resourceTypeId
IdType - min: 1 The resource type ID.code
string - min: 1 The permission code.name
string - min: 1 The name of the permission.description?
string | null The description of the permission.tags?
string | null The tags of the permission.
See: Create a Permission
deletePermission(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deletePermission(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes a permission by ID.
Parameters:
id
IdType The ID of the permission.config?
AxiosRequestConfig Optional Axios request configuration.
See: Delete a Permission
getPermission(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPermission>>
getPermission(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPermission>>
Gets a permission by ID.
Parameters:
id
IdType The ID of the permission.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get a Permission
getPermissions(params?: IGetPermissionsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IPermission>>
getPermissions(params?: IGetPermissionsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IPermission>>
Gets a list of all permissions.
Parameters:
params?
IGetPermissionsParams Parameters for getting permissions.config?
AxiosRequestConfig Optional Axios request configuration.
IGetPermissionsParams Fields:
resourceTypeId?
string Filter by resource type ID.code?
string Filter by code.name?
string Filter by name.tags?
string Filter by tags.description?
string Filter by description.type?
PermissionTypeFilter Filter by type.keywords?
string Filter by keywords.
See: Get Permissions
getRolesFromPermission(permissionId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IRole[]>>
getRolesFromPermission(permissionId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IRole[]>>
Gets roles associated with a permission by its ID.
Parameters:
permissionId
IdType The ID of the permission.config?
AxiosRequestConfig Optional Axios request configuration.
removeRolesFromPermission(permissionId: IdType, roleIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
removeRolesFromPermission(permissionId: IdType, roleIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Removes roles from a permission.
Parameters:
permissionId
IdType The ID of the permission.roleIds
IdType[] The list of role IDs.config?
AxiosRequestConfig Optional Axios request configuration.
updatePermission(id: IdType, params: IUpdatePermissionParams, config?: AxiosRequestConfig) => Promise<HttpResponse<unknown>>
updatePermission(id: IdType, params: IUpdatePermissionParams, config?: AxiosRequestConfig) => Promise<HttpResponse<unknown>>
Updates a permission by ID.
Parameters:
id
IdType The ID of the permission.params
IUpdatePermissionParams Parameters for updating a permission.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdatePermissionParams Fields:
resourceTypeId
IdType - min: 1 The resource type ID.code
string - min: 1 The permission code.name
string - min: 1 The name of the permission.description?
string | null The description of the permission.tags?
string | null The tags of the permission.
See: Update a Permission
Price API
The price
object manages prices.
createPrice(params: ICreatePriceParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPrice>>
createPrice(params: ICreatePriceParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPrice>>
Creates a new price.
Parameters:
params
ICreatePriceParams Parameters for creating a price.config?
AxiosRequestConfig Optional Axios request configuration.
ICreatePriceParams Fields:
packageId
string - min: 1 The package ID.subscriptionTypeId
string - min: 1 The subscription type ID.code
string - min: 1 The code of the price.name
string The name of the price.amount
number - double The amount of the price.currency
string - min: 1 The currency code of the price. Must be a valid ISO 4217 currency code.checkoutLink?
string | null - uri The checkout link of the price. Redirects to the checkout page.description?
string | null The description of the price.tags?
string | null The tags of the price.zOrder?
number | null - int32 The order of the price. Default is 1.
See: Create a Price
deletePrice(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deletePrice(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes a price by ID.
Parameters:
id
IdType The ID of the price.config?
AxiosRequestConfig Optional Axios request configuration.
See: Delete a Price
generateCheckoutLink(params: IGenerateCheckoutLinkParams, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
generateCheckoutLink(params: IGenerateCheckoutLinkParams, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
Generates a direct checkout link for a price, allowing the user to place an order.
Parameters:
params
IGenerateCheckoutLinkParams Parameters for generating a checkout link.config?
AxiosRequestConfig Optional Axios request configuration.
IGenerateCheckoutLinkParams Fields:
priceId
IdType The ID of the price.appIntegrationId
IdType The ID of the app integration.
getPrice(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPrice>>
getPrice(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPrice>>
Gets a price by ID.
Parameters:
id
IdType The ID of the price.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get a Price
getPrices(params?: IGetPricesParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPrice[]>>
getPrices(params?: IGetPricesParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPrice[]>>
Gets a list of prices.
Parameters:
params?
IGetPricesParams Parameters for getting prices.config?
AxiosRequestConfig Optional Axios request configuration.
IGetPricesParams Fields:
paymentMethodId?
IdType The ID of the payment method.packageId?
IdType The ID of the package.subscriptionTypeId?
IdType The ID of the subscription type.code?
string The code of the price.name?
string The name of the price.description?
string The description of the price.amount?
number The amount of the price.currency?
string The currency of the price.checkoutLink?
string The checkout link.tags?
string The tags of the price.zOrder?
number - int64 The z-order of the price.
See: Get Prices
updatePrice(id: IdType, params: IUpdatePriceParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPrice>>
updatePrice(id: IdType, params: IUpdatePriceParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IPrice>>
Updates a price by ID.
Parameters:
id
IdType The ID of the price.params
IUpdatePriceParams Parameters for updating a price.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdatePriceParams Fields:
packageId
string - min: 1 The package ID.subscriptionTypeId
string - min: 1 The subscription type ID.code
string - min: 1 The code of the price.name
string The name of the price.amount
number - double The amount of the price.currency
string - min: 1 The currency code of the price. Must be a valid ISO 4217 currency code.checkoutLink?
string | null - uri The checkout link of the price. Redirects to the checkout page.description?
string | null The description of the price.tags?
string | null The tags of the price.zOrder?
number | null - int32 The order of the price. Default is 1.
See: Update a Price
Resource Type API
The resourceType
object manages resource types.
createResourceType(params: ICreateResourceTypeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IResourceType>>
createResourceType(params: ICreateResourceTypeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IResourceType>>
Creates a new resource type.
Parameters:
params
ICreateResourceTypeParams Parameters for creating a resource type.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateResourceTypeParams Fields:
code
string - min: 1 The resource type code.name
string - min: 1 The name of the resource type.description
string - min: 1 The description of the resource type.
deleteResourceType(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deleteResourceType(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes a resource type by ID.
Parameters:
id
IdType The ID of the resource type.config?
AxiosRequestConfig Optional Axios request configuration.
getResourceType(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IResourceType>>
getResourceType(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IResourceType>>
Gets a resource type by ID.
Parameters:
id
IdType The ID of the resource type.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get a Resource Type
getResourceTypes(params?: IGetResourceTypesParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IResourceType[]>>
getResourceTypes(params?: IGetResourceTypesParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IResourceType[]>>
Gets a list of resource types.
Parameters:
params?
IGetResourceTypesParams Parameters for getting resource types.config?
AxiosRequestConfig Optional Axios request configuration.
IGetResourceTypesParams Fields:
code?
string Filter by code.name?
string Filter by name.tags?
string Filter by tags.description?
string Filter by description.type?
ResourceTypeTypeFilter The param type to apply filter.keywords?
string Filter by keywords.
See: Get Resource Types
updateResourceType(id: IdType, params: IUpdateResourceTypeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IResourceType>>
updateResourceType(id: IdType, params: IUpdateResourceTypeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IResourceType>>
Updates a resource type by ID.
Parameters:
id
IdType The ID of the resource type.params
IUpdateResourceTypeParams Parameters for updating a resource type.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateResourceTypeParams Fields:
code
string - min: 1 The resource type code.name
string - min: 1 The name of the resource type.description
string - min: 1 The description of the resource type.
Role API
The role
object manages roles and their permissions.
assignUsersToRole(id: IdType, userIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
assignUsersToRole(id: IdType, userIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Assigns users to a role.
Parameters:
id
IdType The ID of the role.userIds
IdType[] The list of user IDs to assign.config?
AxiosRequestConfig Optional Axios request configuration.
deleteRole(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deleteRole(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes a role by ID, removing it from any assigned users and permissions.
Parameters:
id
IdType The ID of the role.config?
AxiosRequestConfig Optional Axios request configuration.
See: Delete a Role
createRole(params: ICreateRoleParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IRole>>
createRole(params: ICreateRoleParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IRole>>
Creates a new role. New roles are not associated with permissions by default.
Parameters:
params
ICreateRoleParams Parameters for creating a role.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateRoleParams Fields:
code
string - min: 1 The code of the role.name
string - min: 1 The name of the role.description?
string | null The description of the role.tags?
string | null The tags of the role.
See: Create a Role
getRole(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IRole>>
getRole(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IRole>>
Gets a role by ID.
Parameters:
id
IdType The ID of the role.config?
AxiosRequestConfig Optional Axios request configuration.
See: Get a Role
getRoles(params?: IGetRolesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IRole>>
getRoles(params?: IGetRolesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IRole>>
Gets a list of roles in the brand.
Parameters:
params?
IGetRolesParams Parameters for getting roles.config?
AxiosRequestConfig Optional Axios request configuration.
IGetRolesParams Fields:
ids?
string The list ID of the role to filter.code?
string The param code to apply filter.name?
string The param name to apply filter.description?
string The param description to apply filter.type?
RoleTypeFilter The param type to apply filter.keywords?
string Filter by keywords.
See: Get Roles
grantPermissionsToRole(roleId: IdType, permissionIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
grantPermissionsToRole(roleId: IdType, permissionIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Grants one or more permissions to a specific role.
Parameters:
roleId
IdType The ID of the role.permissionIds
IdType[] The list of permission IDs.config?
AxiosRequestConfig Optional Axios request configuration.
getPermissionsGrantedByRole(roleId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPermission[]>>
getPermissionsGrantedByRole(roleId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPermission[]>>
Retrieves a detailed list of permissions granted by a specified role, including name, description, and resource server.
Parameters:
roleId
IdType The ID of the role.config?
AxiosRequestConfig Optional Axios request configuration.
removePermissionsFromRole(roleId: IdType, permissionIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
removePermissionsFromRole(roleId: IdType, permissionIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Removes one or more permissions from a specific role.
Parameters:
roleId
IdType The ID of the role.permissionIds
IdType[] The list of permission IDs.config?
AxiosRequestConfig Optional Axios request configuration.
updateRole(id: IdType, params: IUpdateRoleParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IRole>>
updateRole(id: IdType, params: IUpdateRoleParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IRole>>
Updates a role by ID.
Parameters:
id
IdType The ID of the role.params
IUpdateRoleParams Parameters for updating a role.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateRoleParams Fields:
code
string - min: 1 The code of the role.name
string - min: 1 The name of the role.description?
string | null The description of the role.tags?
string | null The tags of the role.
See: Update a Role
State API
The state
object manages state data.
getStates(config?: AxiosRequestConfig) => Promise<HttpResponse<IState[]>>
getStates(config?: AxiosRequestConfig) => Promise<HttpResponse<IState[]>>
Gets a list of states.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
See: Get States
Subscription Type API
The subscriptionType
object manages subscription types.
createSubscriptionType(params: ICreateSubscriptionTypeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ISubscriptionType>>
createSubscriptionType(params: ICreateSubscriptionTypeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ISubscriptionType>>
Creates a new subscription type.
Parameters:
params
ICreateSubscriptionTypeParams Parameters for creating a new subscription type.config?
AxiosRequestConfig Optional Axios request configuration.
ICreateSubscriptionTypeParams Fields:
name
string - min: 1 The name of the subscription type.unit
SubscriptionTypeUnit - min: 1 The unit of the subscription type.quantity?
number - int32 The quantity of the subscription type.tags?
string | null The tags of the subscription type.zOrder?
number - int64 The z-order of the subscription type. Default is 1.status?
SubscriptionTypeStatus The status of the subscription type.isDefault?
boolean Flag to indicate if the subscription type is default. By default, it is false.description?
string | null The description of the subscription type.
deleteSubscriptionType(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deleteSubscriptionType(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes a subscription type by ID.
Parameters:
id
IdType The ID of the subscription type.config?
AxiosRequestConfig Optional Axios request configuration.
getSubscriptionType(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<ISubscriptionType>>
getSubscriptionType(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<ISubscriptionType>>
Gets a subscription type by ID.
Parameters:
id
IdType The ID of the subscription type.config?
AxiosRequestConfig Optional Axios request configuration.
getPricesFromSubscriptionType(subscriptionTypeId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPrice[]>>
getPricesFromSubscriptionType(subscriptionTypeId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IPrice[]>>
Gets prices from a subscription type.
Parameters:
subscriptionTypeId
IdType The ID of the subscription type.config?
AxiosRequestConfig Optional Axios request configuration.
getSubscriptionTypes(params?: IGetSubscriptionTypesParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ISubscriptionType[]>>
getSubscriptionTypes(params?: IGetSubscriptionTypesParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ISubscriptionType[]>>
Gets a list of subscription types.
Parameters:
params?
IGetSubscriptionTypesParams Parameters for getting subscription types.config?
AxiosRequestConfig Optional Axios request configuration.
IGetSubscriptionTypesParams Fields:
name?
string The name to filter.unit?
SubscriptionTypeUnit The unit to filter.status?
SubscriptionTypeStatus The status to filter.tags?
string The tags to filter.description?
string The description to filter.keywords?
string The keywords to filter.
updateSubscriptionType(id: IdType, params: IUpdateSubscriptionTypeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ISubscriptionType>>
updateSubscriptionType(id: IdType, params: IUpdateSubscriptionTypeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<ISubscriptionType>>
Updates a subscription type by ID.
Parameters:
id
IdType The ID of the subscription type.params
IUpdateSubscriptionTypeParams Parameters for updating a subscription type.config?
AxiosRequestConfig Optional Axios request configuration.
IUpdateSubscriptionTypeParams Fields:
name
string - min: 1 The name of the subscription type.unit
SubscriptionTypeUnit - min: 1 The unit of the subscription type.quantity?
number - int32 The quantity of the subscription type.tags?
string | null The tags of the subscription type.zOrder?
number - int64 The z-order of the subscription type. Default is 1.status?
SubscriptionTypeStatus The status of the subscription type.isDefault?
boolean Flag to indicate if the subscription type is default. By default, it is false.description?
string | null The description of the subscription type.
Timezone API
The timezone
object manages timezones.
getTimezones(config?: AxiosRequestConfig) => Promise<HttpResponse<ITimezone[]>>
getTimezones(config?: AxiosRequestConfig) => Promise<HttpResponse<ITimezone[]>>
Lists all time zones.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration.
See: Time Zones
Tracking Activity API
The trackingActivity
object provides methods for managing tracking activities.
getTrackingActivities(params?: IGetTrackingActivitiesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<ITrackingActivity>>
getTrackingActivities(params?: IGetTrackingActivitiesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<ITrackingActivity>>
Gets a list of tracking activities.
Parameters:
params?
IGetTrackingActivitiesParams The parameters for getting tracking activities.config?
AxiosRequestConfig Optional Axios request configuration object.
IGetTrackingActivitiesParams Fields:
userId?
string Filter by user id.deviceId?
string Filter by device id.trackingEventId?
string Filter by tracking event id.url?
string Filter by the URL requested.ipAddress?
string Filter by the ip address.os?
string Filter by the os.browserName?
string Filter by the browser name.browserVersion?
string Filter by the browser version.requestFromMobile?
boolean Filter by the request from mobile.userAgent?
string Filter by the user agent.location?
string Filter by the location.latitude?
number - double Filter by the latitude.longitude?
number - double Filter by the longitude.description?
string Filter by the description.tags?
string Filter by the tags.keywords?
string Filter by the keywords.
See: Get Activities
getTrackingActivity(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<ITrackingActivity>>
getTrackingActivity(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<ITrackingActivity>>
Gets a tracking activity by the given ID.
Parameters:
id
IdType The ID of the activity.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Get a Activity
Tracking Email API
The trackingEmail
object provides methods for managing tracking emails.
getTrackingEmail(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<ITrackingEmail>>
getTrackingEmail(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<ITrackingEmail>>
Gets a tracking email by the given ID.
Parameters:
id
IdType The ID of the tracking email.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Get a Tracking Email
getTrackingEmails(params?: IGetTrackingEmailsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<ITrackingEmail>>
getTrackingEmails(params?: IGetTrackingEmailsParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<ITrackingEmail>>
Gets a list of tracking emails.
Parameters:
params?
IGetTrackingEmailsParams The parameters for getting tracking emails.config?
AxiosRequestConfig Optional Axios request configuration object.
IGetTrackingEmailsParams Fields:
userId?
IdType The id of the user.eventId?
IdType The id of the event.countryCode?
string The country code. This is a two letter country code.languageCode?
string The language code. This is a two letter language code.type?
TrackingEmailNotificationType The notification type.notificationChannelType?
TrackingEmailNotificationChannelType The notification channel type.emailFrom?
string The email from.emailTo?
string The email to.emailCc?
string The email cc.emailBcc?
string The email bcc.emailSubject?
string The email subject.emailBody?
string The email body.testMode?
boolean Flag to indicate if the email is in test mode.keywords?
string Filter by keywords.tags?
string The tags.status?
TrackingEmailStatus The status of the tracking email.
See: Get Tracking Emails
User API
The user
object provides methods for managing users, including authentication, roles, devices, notifications, and passwordless login.
activateUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
activateUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Sends an activation email to the user, setting their status to Active upon completion.
Parameters:
id
IdType The ID of the user.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Activate a User
addDeviceToUser(params: IAddDeviceToUserParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
addDeviceToUser(params: IAddDeviceToUserParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Adds a device to a user.
Parameters:
params
IAddDeviceToUserParams The parameters for adding a device to a user.config?
AxiosRequestConfig Optional Axios request configuration object.
IAddDeviceToUserParams Fields:
userId
IdType The id of the user.deviceId
IdType The id of the device to add.token?
string | null The token of the device data. This token is used when push notification for the device.session?
string | null The session of the device data and related with user.tags?
string | null The tags of the device.status?
UserDeviceStatus The status of the device.
applyReferralCodeToUser(id: IdType, params: IApplyReferralCodeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
applyReferralCodeToUser(id: IdType, params: IApplyReferralCodeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Applies a referral code to a user.
Parameters:
id
IdType The ID of the user.params
IApplyReferralCodeParams The parameters for applying a referral code.config?
AxiosRequestConfig Optional Axios request configuration object.
IApplyReferralCodeParams Fields:
referralCode
string The referral code to apply.
assignRolesToUser(id: IdType, roleIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
assignRolesToUser(id: IdType, roleIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Assigns roles to a user.
Parameters:
id
IdType The ID of the user.roleIds
IdType[] The role IDs to assign.config?
AxiosRequestConfig Optional Axios request configuration object.
authenticationByApple(callbackURL: string, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
authenticationByApple(callbackURL: string, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
Gets the Apple login URL.
Parameters:
callbackURL
string The callback URL for redirection after login.config?
AxiosRequestConfig Optional Axios request configuration object.
authenticationByGoogle(params: IAuthenticationByGoogleParams, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
authenticationByGoogle(params: IAuthenticationByGoogleParams, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
Gets the Google login URL.
Parameters:
params
IAuthenticationByGoogleParams The parameters for authentication with Google.config?
AxiosRequestConfig Optional Axios request configuration object.
IAuthenticationByGoogleParams Fields:
callbackURL
string The callback URL that the user will be redirected to after logging in.returnURL
string The return URL that the user will be redirected to after canceling the login.typeResponse?
AuthenticationResponseType The type response after the authentication success. The type includes the RedirectUrl or JsonFormat. By default, the type is RedirectUrl.
authenticationByPhoneNumber(params: IAuthenticationByPhoneNumberParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAuthenticateResponse>>
authenticationByPhoneNumber(params: IAuthenticationByPhoneNumberParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAuthenticateResponse>>
Authenticates a user with phone number and password.
Parameters:
params
IAuthenticationByPhoneNumberParams The parameters for authentication by phone number.config?
AxiosRequestConfig Optional Axios request configuration object.
IAuthenticationByPhoneNumberParams Fields:
phoneNumber
string - min: 1 This represents the phone number of the user.password
string - min: 1 This represents the password of the user.
authentication(params: IAuthenticationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAuthenticateResponse>>
authentication(params: IAuthenticationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAuthenticateResponse>>
Authenticates a user with email and password.
Parameters:
params
IAuthenticationParams The parameters for authentication.config?
AxiosRequestConfig Optional Axios request configuration object.
IAuthenticationParams Fields:
username
string - min: 1 This represents the username of the user.password
string - min: 1 This represents the password of the user.
See: Authentication
changePassword(params: IChangePasswordParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
changePassword(params: IChangePasswordParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Changes the user's password.
Parameters:
params
IChangePasswordParams The parameters for changing password.config?
AxiosRequestConfig Optional Axios request configuration object.
IChangePasswordParams Fields:
oldPassword
string - min: 1 The old password of the user.newPassword
string - min: 1 The new password of the user.confirmPassword
string - min: 1 The confirm password of the user.
See: Change Password
changePasswordForAnotherUser(params: IChangePasswordForAnotherUserParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
changePasswordForAnotherUser(params: IChangePasswordForAnotherUserParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Changes the password for another user.
Parameters:
params
IChangePasswordForAnotherUserParams The parameters for changing password for another user.config?
AxiosRequestConfig Optional Axios request configuration object.
IChangePasswordForAnotherUserParams Fields:
id
IdType The id of the user to change.newPassword
string - min: 1 The new password of the user.confirmPassword
string - min: 1 The confirm password of the user.
checkReferralUserCode(code: string, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
checkReferralUserCode(code: string, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Checks if the referral code exists in the system.
Parameters:
code
string The referral code to check.config?
AxiosRequestConfig Optional Axios request configuration object.
checkAuthKeyAvailable(params: ICheckAuthKeyAvailableParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
checkAuthKeyAvailable(params: ICheckAuthKeyAvailableParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Checks if the auth key is available.
Parameters:
params
ICheckAuthKeyAvailableParams The parameters for checking auth key availability.config?
AxiosRequestConfig Optional Axios request configuration object.
ICheckAuthKeyAvailableParams Fields:
authKey
string The auth key to check.
deactivateUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deactivateUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deactivates a user, setting their status to Inactive after sending a deactivation email.
Parameters:
id
IdType The ID of the user.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Deactivate a User
deleteUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
deleteUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes a user by the given ID.
Parameters:
id
IdType The ID of the user.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Delete a User
sendEmailToVerifyEmailAddressOfUser(id: IdType, returnURL: string, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
sendEmailToVerifyEmailAddressOfUser(id: IdType, returnURL: string, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Sends an email to verify the user's email address with a verification link.
Parameters:
id
IdType The ID of the user.returnURL
string The return URL after verification.config?
AxiosRequestConfig Optional Axios request configuration object.
activeUserEmailAddress(token: string, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
activeUserEmailAddress(token: string, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Activates the user's email address using the provided token.
Parameters:
token
string The token to activate the email address.config?
AxiosRequestConfig Optional Axios request configuration object.
forgotPassword(params: IForgotPasswordParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
forgotPassword(params: IForgotPasswordParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Sends an email with a link to reset the user's password.
Parameters:
params
IForgotPasswordParams The parameters for forgot password.config?
AxiosRequestConfig Optional Axios request configuration object.
IForgotPasswordParams Fields:
emailAddress
string - email - min: 1 This represents the email of the user.resetPasswordLink
string - uri - min: 1 This represents the reset password link to be sent to the user.
See: Forgot Password
getUserByUsername(username: string, config?: AxiosRequestConfig) => Promise<HttpResponse<IUser>>
getUserByUsername(username: string, config?: AxiosRequestConfig) => Promise<HttpResponse<IUser>>
Gets a user by username.
Parameters:
username
string The username of the user.config?
AxiosRequestConfig Optional Axios request configuration object.
getUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IUser>>
getUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IUser>>
Gets a user by the given ID.
Parameters:
id
IdType The ID of the user.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Get a User
getAppIntegrationAuthenticateURLs(params: IGetAppIntegrationAuthenticateURLsParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationAuthenticateURL[]>>
getAppIntegrationAuthenticateURLs(params: IGetAppIntegrationAuthenticateURLsParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAppIntegrationAuthenticateURL[]>>
Gets app integration authenticate URLs for the given parameters.
Parameters:
params
IGetAppIntegrationAuthenticateURLsParams The parameters for getting authenticate URLs.config?
AxiosRequestConfig Optional Axios request configuration object.
IGetAppIntegrationAuthenticateURLsParams Fields:
callbackURL
string The callback URL. It is the URL that the user will be redirected to after logging in.returnURL
string The return URL. It is the URL that the user will be redirected to after canceling the login.deviceCode?
string The device code. It is the code that the user will be detected as a device.typeResponse?
AuthenticationResponseType The type response. It is the type of the response after the authentication success.
getDevicesFromUser(userId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IDeviceOfUser[]>>
getDevicesFromUser(userId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IDeviceOfUser[]>>
Gets devices associated with a user.
Parameters:
userId
IdType The ID of the user.config?
AxiosRequestConfig Optional Axios request configuration object.
getUsersByListIDs(ids: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<IUser[]>>
getUsersByListIDs(ids: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<IUser[]>>
Gets users by a list of IDs (maximum 100).
Parameters:
ids
IdType[] The list of user IDs.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Get Users by List ID
getUsers(params: IGetUsersParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IUser>>
getUsers(params: IGetUsersParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IUser>>
Gets a list of users in the system, filtered by the provided parameters.
Parameters:
params
IGetUsersParams The parameters for getting users.config?
AxiosRequestConfig Optional Axios request configuration object.
IGetUsersParams Fields:
ids?
string The list id of the user to filter.roleId?
IdType The role id of the user.code?
string The code of the user.username?
string The username of the user.userType?
string The type of the user.isEmailAddressVerified?
boolean Filter with is email address verified.isUserVerified?
boolean Filter with is user verified.testMode?
boolean The email address of the user.status?
UserStatus The status of the user.isSystem?
boolean Filter with is system user.firstName?
string The first name of the user.lastName?
string The last name of the user.nickName?
string The nickname of the user.avatar?
string - uri The avatar of the user.emailAddress?
string The email address of the user.phoneNumber?
string - tel The phone number 1 (deprecated).keywords?
string The keywords to search.packageId?
IdType The package id of the user.languageCode?
string The language code of the user.timeZoneId?
IdType The time zone id of the user.trackingLevel?
number - int32 The tracking level of the user.referralCode?
string The referral code of the user.
See: Get Users
getRolesAssignedToUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IRole[]>>
getRolesAssignedToUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IRole[]>>
Gets the roles assigned to a user.
Parameters:
id
IdType The ID of the user.config?
AxiosRequestConfig Optional Axios request configuration object.
getCurrentUserLoggedIn(config?: AxiosRequestConfig) => Promise<HttpResponse<IUser>>
getCurrentUserLoggedIn(config?: AxiosRequestConfig) => Promise<HttpResponse<IUser>>
Gets the current logged-in user.
Parameters:
config?
AxiosRequestConfig Optional Axios request configuration object.
getRefereeOfUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IBaseUser[]>>
getRefereeOfUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IBaseUser[]>>
Gets the referees of a user.
Parameters:
id
IdType The ID of the user.config?
AxiosRequestConfig Optional Axios request configuration object.
listAllBrandPartnersAuthenticate(userId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IBrandPartnerAuthenticate>>
listAllBrandPartnersAuthenticate(userId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IBrandPartnerAuthenticate>>
Gets the connection authenticate brand status for a user.
Parameters:
userId
IdType The ID of the user.config?
AxiosRequestConfig Optional Axios request configuration object.
lockUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
lockUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Locks a user, setting their status to Locked after sending a notification email.
Parameters:
id
IdType The ID of the user.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Lock a User
registerNewUser(params: IRegisterNewUserParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IUser>>
registerNewUser(params: IRegisterNewUserParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IUser>>
Registers a new user.
Parameters:
params
IRegisterNewUserParams The parameters for registering a new user.config?
AxiosRequestConfig Optional Axios request configuration object.
IRegisterNewUserParams Fields:
username?
string | null The username that the user is registering with.phoneNumber?
string | null - tel The phone number that the user is registering with. The phone number is in the E.164 format.password
string - min: 1 The password that the user is registering with.emailAddress?
string | null - min: 1 The email address that the user is registering with.firstName?
string | null The first name of the user.lastName?
string | null The last name of the user.nickName?
string | null The nickname of the user.referralCode?
string | null The invitation code that the user is using to register.timeZoneId?
string | null The timezone id.
See: Register a New User
removeDeviceFromUser(params: IRemoveDeviceFromUserParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
removeDeviceFromUser(params: IRemoveDeviceFromUserParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Removes a device from a user.
Parameters:
params
IRemoveDeviceFromUserParams The parameters for removing a device from a user.config?
AxiosRequestConfig Optional Axios request configuration object.
IRemoveDeviceFromUserParams Fields:
userId
IdType The id of the user.deviceId
IdType The id of the device.
resetPassword(params: IResetPasswordParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
resetPassword(params: IResetPasswordParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Resets the user's password using the reset password token.
Parameters:
params
IResetPasswordParams The parameters for resetting the password.config?
AxiosRequestConfig Optional Axios request configuration object.
IResetPasswordParams Fields:
emailAddress
string - email - min: 1 This represents the email of the user.token
string - min: 1 This represents the token of the user.newPassword
string - min: 1 This represents the new password of the user.
See: Reset Password
revokeRolesFromUser(id: IdType, roleIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
revokeRolesFromUser(id: IdType, roleIds: IdType[], config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Revokes roles from a user.
Parameters:
id
IdType The ID of the user.roleIds
IdType[] The role IDs to revoke.config?
AxiosRequestConfig Optional Axios request configuration object.
statisticUsers(params: IStatisticsUsersParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IStatisticsUsers[]>>
statisticUsers(params: IStatisticsUsersParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IStatisticsUsers[]>>
Provides statistics for users based on the given filter.
Parameters:
params
IStatisticsUsersParams The parameters for user statistics.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Statistics Users
suspendUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
suspendUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Suspends a user, setting their status to Suspended after sending a notification email.
Parameters:
id
IdType The ID of the user.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Suspend a User
unlockUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
unlockUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Unlocks a user with Locked or Active status blocked from unknown devices, setting them to Active.
Parameters:
id
IdType The ID of the user.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Unlock a User
unsuspendUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
unsuspendUser(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Unsuspends a user, returning them to Active status.
Parameters:
id
IdType The ID of the user.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Unsuspend a User
updateUser(id: IdType, params: IUpdateUserParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IUser>>
updateUser(id: IdType, params: IUpdateUserParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IUser>>
Updates a user by the given ID.
Parameters:
id
IdType The ID of the user.params
IUpdateUserParams The parameters for updating a user.config?
AxiosRequestConfig Optional Axios request configuration object.
IUpdateUserParams Fields:
username
string - min: 1 The username of the user.emailAddress?
string | null - email - min: 1 The email address of the user.nickName?
string | null The nickname of the user.firstName?
string | null The first name of the user.lastName?
string | null The last name of the user.languageCode?
string | null The language code of the user.timeZoneId?
IdType | null The id time zone of the user.phoneNumber?
string | null - tel The primary phone number of the user.phoneNumber1?
string | null - tel The phone number 1 of the user (deprecated).avatar?
string | null - uri The avatar of the user.bio?
string | null The bio is a short description of the user.website?
string | null - uri The website of the user want to update.
See: Update a User
updateUserType(id: IdType, type: UserType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
updateUserType(id: IdType, type: UserType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Updates the user type for a specific user (only Super Admins can perform this).
Parameters:
id
IdType The ID of the user.type
UserType The user type.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Update Type User
Configurations
createNewConfigurationForUser(userId: IdType, params: ICreateConfigurationOfUserParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IConfiguration>>
Creates a new configuration for the user.
Parameters:
userId
IdType The ID of the user.params
ICreateConfigurationOfUserParams The parameters for creating a configuration.config?
AxiosRequestConfig Optional Axios request configuration object.
getConfigurationsOfUser(userId: IdType, params?: IGetConfigurationOfUserParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IConfiguration[]>>
Gets the user's configurations.
Parameters:
userId
IdType The ID of the user.params?
IGetConfigurationOfUserParams The parameters for getting configurations.config?
AxiosRequestConfig Optional Axios request configuration object.
IGetConfigurationOfUserParams Fields:
groupCode?
string Filter by group code.code?
string Filter by code.name?
string Filter by name.description?
string Filter by description.value?
string Filter by value.status?
ConfigurationStatus Filter by status.
See: Get Configurations
deleteConfigurationOfUserByID(userId: IdType, configurationId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Deletes a user's configuration by ID.
Parameters:
userId
IdType The ID of the user.configurationId
IdType The ID of the configuration.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Delete Configuration
Email Address Verification
sendEmailToVerifyEmailAddressOfUser(id: IdType, returnURL: string, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Sends an email to verify the user's email address.
Parameters:
id
IdType The ID of the user.returnURL
string The return URL after verification.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Verify User Email
activeUserEmailAddress(token: string, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Activates the user's email address using the token.
Parameters:
token
string The token to activate the email address.config?
AxiosRequestConfig Optional Axios request configuration object.
Notification
getNotificationRelatedToUser(params: IGetNotificationRelatedToUserParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IUserNotification>>
Gets a notification detail related to a user by user ID and notification ID.
Parameters:
params
IGetNotificationRelatedToUserParams The parameters for getting a notification.config?
AxiosRequestConfig Optional Axios request configuration object.
IGetNotificationRelatedToUserParams Fields:
userId
IdType The id of the user to get.notificationId
IdType The id of the notification.
See: Get a Notification
getNotificationsByUser(params: IGetNotificationsByUserParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IUserNotification, { unreadCount: number }>>
Gets notifications by the user's ID.
Parameters:
params
IGetNotificationsByUserParams The parameters for getting notifications.config?
AxiosRequestConfig Optional Axios request configuration object.
IGetNotificationsByUserParams Fields:
userId
IdType The id of the user to get.status?
UserNotificationStatus | null The status of the notification.
markNotificationAsRead(params: IMarkNotificationAsReadParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Marks a notification as read for the user.
Parameters:
params
IMarkNotificationAsReadParams The parameters for marking a notification as read.config?
AxiosRequestConfig Optional Axios request configuration object.
IMarkNotificationAsReadParams Fields:
userId
IdType The id of the user to get.notificationId
IdType The id of the notification.
See: Mark as Read
markAllNotificationsAsRead(userId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Marks all notifications as read for the user.
Parameters:
userId
IdType The ID of the user.config?
AxiosRequestConfig Optional Axios request configuration object.
Passwordless
authenticationByMagicLink(params: IAuthenticationByMagicLinkParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Authenticates the user by sending a magic link to their email.
Parameters:
params
IAuthenticationByMagicLinkParams The parameters for authentication by magic link.config?
AxiosRequestConfig Optional Axios request configuration object.
IAuthenticationByMagicLinkParams Fields:
emailAddress
string - min: 1 This represents the email address of the user.callbackURL
string - uri - min: 1 This represents the callback url.returnURL?
string | null - uri This represents the return url.
generateEmailOTPForAuthentication(params: IGenerateEmailAddressOTPForAuthenticationParams, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
Generates an email OTP for authentication.
Parameters:
params
IGenerateEmailAddressOTPForAuthenticationParams The parameters for generating an email OTP.config?
AxiosRequestConfig Optional Axios request configuration object.
IGenerateEmailAddressOTPForAuthenticationParams Fields:
emailAddress
string - min: 1 The email address.
verifyEmailAddressOTPToAuthentication(params: IVerifyOTPCodeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAuthenticateResponse>>
Verifies the OTP code sent to the user's email for authentication.
Parameters:
params
IVerifyOTPCodeParams The parameters for verifying the OTP code.config?
AxiosRequestConfig Optional Axios request configuration object.
IVerifyOTPCodeParams Fields:
token
string - min: 1 The token to verify. This is the token that was received from the request to send the OTP.otp
string - min: 1 The OTP to verify.
Phone
generateSMSOTP(params: IGenerateSMSOTPParams, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
Generates an SMS OTP for authentication to the user's phone number.
Parameters:
params
IGenerateSMSOTPParams The parameters for generating SMS OTP.config?
AxiosRequestConfig Optional Axios request configuration object.
IGenerateSMSOTPParams Fields:
phoneNumber
string - min: 1 The phone number. The phone number should be following the E.164 format.
verifyPhoneOTPForAuthentication(params: IVerifyOTPCodeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IAuthenticateResponse>>
Verifies the OTP code sent to the user's phone number.
Parameters:
params
IVerifyOTPCodeParams The parameters for verifying SMS OTP code.config?
AxiosRequestConfig Optional Axios request configuration object.
IVerifyOTPCodeParams Fields:
token
string - min: 1 The token to verify. This is the token that was received from the request to send the OTP.otp
string - min: 1 The OTP to verify.
See: Verify SMS OTP Code
QR Code
generateNewQRCode(params?: IGenerateNewQRCodeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IGenerateNewQRCodeForParingAuthenticationResponse>>
Generates a new QR Code for pairing authentication between two devices.
Parameters:
params?
IGenerateNewQRCodeParams The parameters for generating a new QR code.config?
AxiosRequestConfig Optional Axios request configuration object.
IGenerateNewQRCodeParams Fields:
callbackUrl?
string Optional URL for the QR Code link.
getCurrentStatusOfQRCode(qrCodeId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IGetCodeStatusResponse>>
Gets the current status of a QR Code pairing request (pending, approved, expired, rejected).
Parameters:
qrCodeId
IdType The unique identifier of the QR Code session.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Get QR Code
approveQRCode(qrCodeId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IGetCodeStatusResponse>>
Approves a QR Code pairing request.
Parameters:
qrCodeId
IdType The unique identifier of the QR Code session.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Get QR Code
loginUsingApprovedQRCode(qrCodeId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IAuthenticateResponse>>
Logs in using an approved QR Code pairing request (deprecated, use authWithApprovedQRCode
instead).
Parameters:
qrCodeId
IdType The unique identifier of the approved QR Code session.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Get QR Code
authWithApprovedQRCode(qrCodeId: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<IAuthenticateResponse>>
Authenticates using an approved QR Code pairing request.
Parameters:
qrCodeId
IdType The unique identifier of the approved QR Code session.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Auth with QR Code
OTP Code
generateNewOTPCode(params?: IGenerateNewQRCodeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IGenerateNewOTPForParingAuthenticationResponse>>
Generates a new OTP Code for pairing authentication between two devices.
Parameters:
params?
IGenerateNewQRCodeParams The parameters for generating a new OTP code.config?
AxiosRequestConfig Optional Axios request configuration object.
IGenerateNewQRCodeParams Fields:
callbackUrl?
string Optional URL for the QR Code link.
getCurrentStatusOfOTPCode(otpCode: string, config?: AxiosRequestConfig) => Promise<HttpResponse<IGetCodeStatusResponse>>
Gets the current status of an OTP Code pairing request (pending, approved, expired, rejected).
Parameters:
otpCode
string The OTP code value.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Get OTP Code
approveOTPCode(otpCode: string, config?: AxiosRequestConfig) => Promise<HttpResponse<IGetCodeStatusResponse>>
Approves an OTP Code pairing request.
Parameters:
otpCode
string The OTP code value.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Approve OTP Code
loginUsingApprovedOTPCode(otpCode: string, config?: AxiosRequestConfig) => Promise<HttpResponse<IAuthenticateResponse>>
Logs in using an approved OTP Code pairing request (deprecated, use authWithApprovedOTPCode
instead).
Parameters:
otpCode
string The OTP code value.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Login OTP Code
authWithApprovedOTPCode(otpCode: string, config?: AxiosRequestConfig) => Promise<HttpResponse<IAuthenticateResponse>>
Authenticates using an approved OTP Code pairing request.
Parameters:
otpCode
string The OTP code value.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Auth with OTP Code
Wallet API
The wallet
object provides methods for managing wallets, including adding money, applying redeem codes, and conversions.
addMoneyToWalletWithCheckoutLink(params: IAddMoneyToWalletWithCheckoutLinkParams, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
addMoneyToWalletWithCheckoutLink(params: IAddMoneyToWalletWithCheckoutLinkParams, config?: AxiosRequestConfig) => Promise<HttpResponse<string>>
Generates a checkout link to add money to a wallet.
Parameters:
params
IAddMoneyToWalletWithCheckoutLinkParams The parameters for generating a checkout link.config?
AxiosRequestConfig Optional Axios request configuration object.
IAddMoneyToWalletWithCheckoutLinkParams Fields:
currencyCode
string The currency code. The currency code must be a valid ISO 4217 currency code.amount
number - double The amount to add. The amount must be greater than 0.returnLink
string - uri The return link after the payment is successful.cancelLink
string - uri The cancel link after the payment is canceled.testMode?
boolean The test mode. By default, it is false.
applyRedeemCode(params: IApplyRedeemCodeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<unknown>>
applyRedeemCode(params: IApplyRedeemCodeParams, config?: AxiosRequestConfig) => Promise<HttpResponse<unknown>>
Applies a redeem code to a wallet (valid redeem code and open wallet required).
Parameters:
params
IApplyRedeemCodeParams The parameters for applying a redeem code.config?
AxiosRequestConfig Optional Axios request configuration object.
IApplyRedeemCodeParams Fields:
walletId
IdType The id of the wallet.redeemCode
string The redeem code to apply.
See: Apply Redeem
createWalletDefault(currencyCode: string, testMode: boolean = false, config?: AxiosRequestConfig) => Promise<HttpResponse<IWallet>>
createWalletDefault(currencyCode: string, testMode: boolean = false, config?: AxiosRequestConfig) => Promise<HttpResponse<IWallet>>
Creates a new wallet with the given currency code (default testMode: false).
Parameters:
currencyCode
string The currency code (ISO 4217).testMode
boolean The test mode flag (default: false).config?
AxiosRequestConfig Optional Axios request configuration object.
convertWalletMoney(params: IConvertWalletMoneyParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
convertWalletMoney(params: IConvertWalletMoneyParams, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Converts money in a wallet to another currency.
Parameters:
params
IConvertWalletMoneyParams The parameters for converting wallet money.config?
AxiosRequestConfig Optional Axios request configuration object.
IConvertWalletMoneyParams Fields:
originalWalletId
string - min: 1 The id of the original wallet.targetWalletId
string - min: 1 The id of the target wallet.fee?
number | null - double The fee of the convert.totalAmount
number - double The total amount convert.
See: Convert Wallet Money
closeWallet(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
closeWallet(id: IdType, config?: AxiosRequestConfig) => Promise<HttpResponse<boolean>>
Closes a wallet by the given ID.
Parameters:
id
IdType The ID of the wallet.config?
AxiosRequestConfig Optional Axios request configuration object.
See: Close Wallet
getWallets(params?: IGetWalletsParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IWallet[]>>
getWallets(params?: IGetWalletsParams, config?: AxiosRequestConfig) => Promise<HttpResponse<IWallet[]>>
Gets a list of wallets.
Parameters:
params?
IGetWalletsParams The parameters for getting wallets.config?
AxiosRequestConfig Optional Axios request configuration object.
IGetWalletsParams Fields:
currencyCode?
string The currency code.status?
string The wallet status.testMode?
boolean The test mode. By default, it is false.
See: Get Wallets
getWalletHistory(id: IdType, params: IGetWalletHistoriesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IWalletHistory>>
getWalletHistory(id: IdType, params: IGetWalletHistoriesParams, config?: AxiosRequestConfig) => Promise<HttpResponseList<IWalletHistory>>
Gets the wallet history for a given wallet ID.
Parameters:
id
IdType The ID of the wallet.params
IGetWalletHistoriesParams The parameters for getting wallet histories.config?
AxiosRequestConfig Optional Axios request configuration object.
IGetWalletHistoriesParams Fields:
code?
string The transaction code to filter the transactions.refObject?
string The reference object to filter the transactions.refId?
number - int64 The reference id to filter the transactions.tags?
string The tags to filter the transactions.type?
WalletHistoryType The type of the transaction to filter the transactions.status?
WalletHistoryStatus The status of the transaction to filter the transactions.
Last updated
Was this helpful?