Getting Started with Tenant API
Msaaq Tenant API Reference#
The Tenant API is used serve the Tenantfront actions and operations, including Tenant User authentication, making payments, retrieving courses, digital products, consulting sessions, bundles, and everything else related to a tenant. There are no roles in the Tenant API, all requests are made on behalf of the visitors or the Tenant Users.TL;DR: Whatever visitors or Tenant Users see or do on the Tenantfront is powered by the Tenant API.API Base URL#
When making requests to the Tenant API, make sure that you're adding the /tenant
path to the base URL https://api.msaaq.com/v1
, like so: https://api.msaaq.com/v1/tenant
.Accept-Language#
Including a two letter language code (ISO 639-1 e.g., en
, ar
) in the Accept-Language
header will return the response in the specified language. If the specified language is not available, the response will be in English.This Header is optional and the default language is English.X-Tenant#
All requests to the Tenant API should include the header X-Tenant
with the value of the Tenant's default domain (e.g., tenant_slug.msaaq.net
) or custom domain (e.g., custom-domain.com
). This header is used to identify the Tenant that the request is being made on behalf of.If the X-Tenant
header is not provided, you will receive the following 400 Bad Request
response in all requests:{
"status": "failed",
"code": "TENANT_HEADER_NOT_PROVIDED",
"message": {
"body": "No Tenant header was provided"
}
}
If the X-Tenant
header is provided but with an invalid value, you will receive the following 400 Bad Request
response:{
"status": "failed",
"code": "TENANT_NOT_FOUND",
"message": {
"body": "Tenant not found"
}
}
Request#
Response#
TENANT_HEADER_NOT_PROVIDED 400
Modified at 2024-12-30 07:14:45