URL: api/admin/department-members/{id}

Method: GET

Description : Get  department members by passing department id

Parameters:

Parameter Type Optional/Required Description
id integer Required Department id to fetch it’s department members.
search_query string Optional String that is required to be searched.
limit integer Optional No.  of records to be fetched.
sort_order string Optional Records to be ordered in asc or desc.
sort_field string Optional Department members attribute based on which sorting will be done.
page integer Optional Page number

Success Response :

{

  "success":true,

 "data":{

     "current_page":1,

"members": [
     {
               "id": 1,
                  "email": "mr.dmartin1984@gmail.com",
                  "active": 1,
                  "email_verify": 1,
                  "mobile_otp_verify": 1,
                  "ban": 0,
                  "is_delete": 0,
                  "created_at": "2017-03-29 10:53:28",
                  "updated_at": "2018-08-09 11:42:41",
                  "name": "Demo Admin"
             },
             {
                  "id": 3,
                  "email": "ashley@faveo.com",
                  "active": 1,
                  "email_verify": 1,
                  "mobile_otp_verify": 1,
                  "ban": 0,
                  "is_delete": 0,
                  "created_at": "2017-03-29 11:14:51",
                  "updated_at": "2018-11-19 05:59:07",
                  "name": "Ashley Knite"
            }

          ]

        "first_page_url":"http:\/\/faveo\/api\/departments-members?page=1",

        "from":1,

        "last_page":1,

        "last_page_url":"http:\/\/faveo\/api\/department-members?page=1",

        "next_page_url":null,

        "path":"http:\/\/faveo\/api\/departments-list",

        "per_page":10,

        "prev_page_url":null,

        "to":1,

        "total":1

  }

}



OR

{

  "success":true,

"data":{

   "current_page":1,

         "members": []

         "first_page_url":"http:\/\/faveo\/api\/departments-members?page=1",

         "from":1,

         "last_page":1,

         "last_page_url":"http:\/\/faveo\/api\/departments-list?page=1",

         "next_page_url":null,

         "path":"http:\/\/faveo\/api\/departments-list",

         "per_page":10,

         "prev_page_url":null,

         "to":1,

         "total":1

 }

}

Error Response :

{

"success":false,

"Message":"Not found"

}

 

Leave a Reply

Your email address will not be published. Required fields are marked *