CATCH LOC Developers

Login

[Group Management] API access for Group's device list

Description

API access for location object group's device list.

API

API CODE : api.common.group.get.group.object.list

HOST : http://cms.catchloc.com/api.partner.common.php

Method : GET

Protocol : JSON

Parameters

api : api_code
api_key : Client's partner key
timestamp : Unix timestamp
cert_key : Certification Key
group_key : HASH KEY for Group certification

Response

member_pin : Device pin number, Gper number
member_key : MEMBER HASH KEY
member_name : Device name
member_status : Device status(C: normal, X: terminated)
battery : Device battery level(%)
last_location_date : last location and date(UNIX timestamp)
last_latitude : last location's latitude
last_longitude : last location's longitude
last_check_date : last packet date (UNIX timestamp)
valid_date : device expiration date (UNIX timestamp)
dept : vehicle operation log - department
manager : vehicle operation log - user
obejct_use : vehicle operation log - usage code(001: business use, 002:personal use, 003: other reasons)
object_type : vehicle operation log - vehicle model
object_no : vehicle operation log - vehicle number
reg_date : registered date

Example

Rest API
Android SDK
Swift(iOS) SDK
PHP SDK
Javascript SDK

            ===== Request =====

            http://cms.catchloc.com/api.partner.common.php?
            api=api.common.group.get.group.object.list&
            api_key=xxxxx&
            timestamp=1513319595&
            cert_key=xxxxxx&
            group_key=xxx



            ===== Response =====

            - Success
            [
                {
                    "member_pin" : "00000",
                    "member_key" : "******************",
                    "member_name" : "******************",
                    "member_status" : "C",
                    "battery" : "50",
                    "last_location_date" : 0,
                    "last_latitude" : 0,
                    "last_longitude" : 0,
                    "last_check_date" : 1504147576,
                    "valid_date" : 1506178799,
                    "dept" : "******************",
                    "manager" : "******************",
                    "obejct_use" : "0003",
                    "object_type" : "***************",
                    "object_no" : "**************",
                    "reg_date":1475815151
                },
                ......
            ]

            - Fail
            {
                "result":"FAIL",
                "message":"에러 사유"
            }
        

            ===== Request =====

            String group_key = "HASH KEY for Group certification";

            CatchLoc catchloc = new CatchLoc();

            catchloc.setApiKey("API KEY");
            catchloc.setServerKey("SERVER KEY");

            JSONObject result = catchloc.getGroupMembers(group_key);



            ===== Response (JSONObject) =====

            {
                "result"  : "ok",
                "type"    : "jsonarray"
                "message" : API Response Body
            }

        

            ===== Request =====

            import CatchLocSDKForAPI (common)

            CatchLocAPI.shared.setApiKey(API_KEY)
            CatchLocAPI.shared.setserverKey(SERVER_KEY)

            -GROUP_KEY : HASH KEY for GROUP authentication

            CatchLocAPI.shared.getGroupMembers(groupKey: GROUP_KEY)
            { result in
                
                let jsonData = result.response

                or

                let jsonString = result.description()
                
            }

            ===== Response =====

            {
                "response" : API Response Body
            }
        

            ===== Request =====

            $group_key = 'HASH KEY for Group certification';

            $catchloc = new CatchLoc();

            $catchloc->setApiKey("API KEY");
            $catchloc->setServerKey("SERVER KEY")

            $result = $catchloc->getGroupMembers($group_key);


            ===== Response (JSON String) =====

            "{
                "result"  : "ok",
                "type"    : "array"
                "message" : API Response Body
            }"
        

            ===== Request =====

            var callback = function(json)
            {
                code... (handle for api response)
                (e.g. : create marker on map or print list)
            };

            var params =
            {
                group_key: 'HASH KEY for Group certification',
            };

            CatchLoc.setApiKey("API KEY");
            CatchLoc.setServerKey("SERVER KEY");

            CatchLoc.getGroupsMembers(params, callback);



            ===== Response (JSON, using parameter in callback function) =====

            {
                "result"  : "ok",
                "type"    : "array"
                "message" : API Response Body
            }