Get Specific Member

Get Specific Member

Purpose

To get the specific member of your organization.

Request URL

https://live.membroz.com/api/member/[memberid]

Request Method

GET
Note
  • Send authkey in https header
  • Enterprise customer can replace domain name with their hosting Url. for example https://app.xyz.com/api/members
  • API return matching member data or return error message.

Request JSON

Attribute Data Type Mandatory Description
MEMBERID String Yes The record ID of the member you want to update. it is pass in request
/api/members/[memberid]

Sample Request

curl --location --request GET 'https://live.membroz.com/api/members/[memberid]' \
--header 'authkey:  XXXXXXXXXXX' \
--header 'Content-Type: application/json' \
--data-raw '{ 
    "search": [
        { "searchfield": "status", "searchvalue": "active", "criteria": "eq", "datatype": "text" }
    ]
}'
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://live.membroz.com/api/members/[memberid]")
  .method("GET", null)
  .addHeader("authkey", " XXXXXXXXXXX")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
 "https://live.membroz.com/api/members/[memberid]",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS =>"{ \r\n    \"search\": [\r\n        { \"searchfield\": \"status\", \"searchvalue\": \"active\", \"criteria\": \"eq\", \"datatype\": \"text\" }\r\n    ]\r\n}",
  CURLOPT_HTTPHEADER => array(
    "authkey:  XXXXXXXXXXX",
    "Content-Type: application/json"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://live.membroz.com/api/members/[memberid]"

payload = "{ \r\n    \"search\": [\r\n        { \"searchfield\": \"status\", \"searchvalue\": \"active\", \"criteria\": \"eq\", \"datatype\": \"text\" }\r\n    ]\r\n}"
headers = {
  'authkey': ' XXXXXXXXXXX',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data = payload)

print(response.text.encode('utf8'))
require "uri"
require "net/http"

url = URI("https://live.membroz.com/api/members/[memberid]")

https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["authkey"] = " XXXXXXXXXXX"
request["Content-Type"] = "application/json"
request.body = "{ \r\n    \"search\": [\r\n        { \"searchfield\": \"status\", \"searchvalue\": \"active\", \"criteria\": \"eq\", \"datatype\": \"text\" }\r\n    ]\r\n}"

response = https.request(request)
puts response.read_body
var client = new RestClient("https://live.membroz.com/api/members/[memberid]");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("authkey", " XXXXXXXXXXX");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{ \r\n    \"search\": [\r\n        { \"searchfield\": \"status\", \"searchvalue\": \"active\", \"criteria\": \"eq\", \"datatype\": \"text\" }\r\n    ]\r\n}",  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Possible Errors

HTTP Status Error Code Message Reason
permission denied 403 You do not have permission

Sample Response

{
    "firsttimelogin": false,
    "paymentterms":  "5f4897e9393792d03c70948d",
    "status": "active",
    "_id": "5f5b85b7e1012425ecacba75",
    "membernumber": "SAMPL10112",
    "anroiddevices": [],
    "iosdevices": [],
    "addedby": {
        "isfirstlogin": false,
        "status": "active",
        "_id": "5e954c7b9df11624f81e785b",
        "username": "membrozgym@gmail.com",
        "password": "$2a$10$xE/CIr/hKCKvBaaJwUlZHuV7MFi2Ao.9jwh0RAYpAEfgr3dCfNABq",
        "role": "5dd37f876c98a22df08b9509",
        "anroiddevices": [
            {
                "_id": "5ebd0831a6f1722dbd1a604c",
                "deviceid": "2599db9b1c4af598"
            }
        ],
        "iosdevices": [],
        "designationid": "5ed0b4ad1b4f7c7b2677f62f",
        "branchid": "5e954c7b9df11624f81e7859",
        "property": {
            "fullname": "Membroz Gym",
            "mobile_number": null,
            "email": "membrozgym@gmail.com",
            "country": "United States",
            "membrozid": "5e954c7b9df11624f81e7859",
            "isadmin": false
        },
        "createdAt": "2020-04-14T05:39:07.850Z",
        "updatedAt": "2020-08-24T12:40:01.713Z",
        "fullname": "Membroz Gym ",
        "namenumber": "Membroz Gym ",
        "salarycomponent": []
    },
  
    "username": "SAMPL10112",
    "password": "$2a$10$SnHtB.Py7TFBvwfJE.Absu4smUNu/b3qmIOPmr2iVDgELr9lkw0uu",
    "role": "59c1fb52b985482b2c610cee",
    "addons": [],
    "property": {
        "fullname": "Carlos",
        "date_of_birth": "1989-09-12T18:30:00.000Z",
        "tg": "M",
        "mobile_number": "08758363925",
        "whatsapp_number": null,
        "email": "cmgouveia@outlook.com.br",
        "marital_status": "Married",
        "city": "Surat",
        "address": "B1/402, Silver residency, Hanuman Sheri",
        "agreement": [],
        "aadhar": [],
        "pan": [],
        "country": "Brazil"
    },
    "createdAt": "2020-09-11T14:12:07.248Z",
    "updatedAt": "2020-09-15T17:52:27.591Z",
    "fullname": "Carlos ",
    "membernumbername": "SAMPL10112 | Carlos  | 08758363925",
    "age": 31,
    "updatedby": "5e954c7b9df11624f81e785b",
    "membershipend": "2020-09-29T18:30:00.000Z",
    "membershipid": "5e9598377fb65a4204aab60c",
    "membershipstart": "2020-08-31T18:30:00.000Z"
}