Fetch Members Based On Role
this api Get user details for a specific role.
GRAPHQL
Headers
Fields | Type | Description | Example | O/M | Data Management |
---|---|---|---|---|---|
URL | string | {base_url}/ms/graphql/org-admin-service | M | ||
GRAPHQL | string | QUERY | M | ||
content-type | string | JSON | application/json | M | |
x-access-token | string | Session token with validity | token | M | admin token |
Request
query{
get_members(company: "5e69deba5cef29842defb0ee", role: "merchant") {
members {
company
_id
user {
name,
username,
roles
}
}
}
}
Success
"members": [
{
"company": "5e69deba5cef29842defb0ee",
"_id": "5ecc8f9d8bb4b311eb86be7d",
"user": {
"name": "M002 Sports",
"username": "uiazaoxol@pk-loop.loop",
"roles": [
"employee",
"merchant"
]
}
},
{
"company": "5e69deba5cef29842defb0ee",
"_id": "5e85a1b45cef2944aaefb3c5",
"user": {
"name": "merchant6 .",
"username": "collegemerchant86@paysack.com",
"roles": [
"employee",
"merchant"
]
}
}
]
Error
{
}