List team members
curl --request GET \
--url https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/{tenantId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/{tenantId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/{tenantId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/{tenantId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/{tenantId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/{tenantId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/{tenantId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"team_members": {
"current_page": 123,
"data": [
{
"id": 123,
"name": "<string>",
"email": "jsmith@example.com",
"role": "ADMIN",
"is_active": 123,
"last_active_at": "2023-11-07T05:31:56Z"
}
],
"per_page": 123,
"total": 123
}
}Team Members
List Team Members
GET
/
api
/
v2
/
admin
/
team-members
/
{tenantId}
List team members
curl --request GET \
--url https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/{tenantId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/{tenantId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/{tenantId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/{tenantId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/{tenantId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/{tenantId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/{tenantId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"team_members": {
"current_page": 123,
"data": [
{
"id": 123,
"name": "<string>",
"email": "jsmith@example.com",
"role": "ADMIN",
"is_active": 123,
"last_active_at": "2023-11-07T05:31:56Z"
}
],
"per_page": 123,
"total": 123
}
}Overview
Retrieve all team members for a specific tenant (organization). This endpoint returns paginated results with member details including their role and activity status.Authorization
- User must be authenticated with a valid Bearer token
- User must be a member of the specified tenant
Security
Users from different tenants will receive empty results (not a 403 error). This ensures tenant isolation while maintaining a consistent API experience.Response Details
The response includes:- User basic information (id, name, email)
- Role within the tenant (ADMIN or MEMBER)
- Activity status (is_active)
- Last activity timestamp
Performance
This endpoint uses an optimized single JOIN query instead of N+1 queries for better performance with large teams.Example Usage
curl -X GET \
https://faisalshop.mvp-apps.ae/api/v2/admin/team-members/1 \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await axios.get(
`/api/v2/admin/team-members/${tenantId}`,
{
headers: { Authorization: `Bearer ${token}` }
}
);