Fetch Members Based On Role

this api Get user details for a specific role.


GRAPHQL


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base_url}/ms/graphql/org-admin-serviceM
GRAPHQLstringQUERYM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMadmin 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

{
  
}