CATCH LOC Developers

Login

Checking Section definition Location Data API

Description

API for checking targeted section of location for specified time of an object.

API

http://cms.catchloc.com/api.get.member.location.list.php

Parameters

api_key : Partner API_KEY
member_key : MEMBER_KEY for applied target
timestamp : Current time Unix timestamp
cert_key : Hash key for API attestation use
from_date : time for “Start collecting location” (Unix timestamp)
to_date : time for” End collecting location” (Unix timestamp)

Response

protocol : JSON Array
number : Number
latitude : Latitude
longitude : Longitude
accuracy : Location accuracy(m)
in_date : Check in time(Unix timestamp)
out_date : Check out time(Unix timestamp)
reg_date : Registered time(Unix timestamp)
poi_info : Location Information
distance : Distance
speed : Speed

Example

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

            ===== Request =====

            http://cms.catchloc.com/api.get.member.location.list.php?
            api_key= abcdefghijklmnopqrstuvwxyz1234567890&
            member_key=abcdefghijklmnopqrstuvwxyz1234567890&
            timestamp=1446624149000&
            cert_key=abcdefghijklmnopqrstuvwxyz1234567890&
            from_date=1459843188&
            to_date=1459929588



            ===== Response =====

            - Success
            [
                {
                    "number":1,"latitude":"37.3983257","longitude":"126.9637085","accuracy":14.137,
                    "in_date":1459929149,"out_date":1459929149,"reg_date":1459929149,
                    "poi_info":"\ub124\ud2b8\uc6cc\ud06c","distance":34.6406400004,"speed":0
                },
                {
                    "number":2,"latitude":"37.3980153","longitude":"126.9634767","accuracy":47.597,
                    "in_date":1459928548,"out_date":1459929149,"reg_date":1459928548,
                    "poi_info":"\ub124\ud2b8\uc6cc\ud06c","distance":42.95484,"speed":0.257300206323
                },
                {
                    "number":3,"latitude":"37.3984002","longitude":"126.9632804","accuracy":44.343,
                    "in_date":1459927833,"out_date":1459928548,"reg_date":1459927833,
                    "poi_info":"\ub124\ud2b8\uc6cc\ud06c",
                    "distance":4.07340000002,"speed":0.0205094265735
                },......
            ]

            - Fail
            {
                "result":"FAIL",
                "message":"Reason"
            }
        

            ===== Request =====

            String member_key = "HASH KEY to certify device";
            String from_date = "time for “Start collecting location” (Unix timestamp)";
            String to_date = "time for “End collecting location” (Unix timestamp)";

            CatchLoc catchloc = new CatchLoc();

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

            JSONObject result = catchloc.getDataBetween24Hours(member_key);



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

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

        

            ===== Request =====

            import CatchLocSDKForAPI (common)

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

            -MEMBER_KEY : MEMBER_KEY to be applied
            -START_UNIX_TIME : Start time for searching location(Unix timestamp)
            -END_UNIX_TIME : End time for searching location(Unix timestamp)

            CatchLocAPI.shared.getDataBetween24Hours(memberKey: MEMBER_KEY, startUnixTime: START_UNIX_TIME, endUnixTime: END_UNIX_TIME)
            { result in
                
                let jsonData = result.response

                or

                let jsonString = result.description()                
            }


            ===== Response =====

            {
                "response" : API Response Body
            }
        

            ===== Request =====
            
            $member_key = 'HASH KEY to certify device';
            $from_date = 'time for “Start collecting location” (Unix timestamp)';
            $to_date = 'time for “End collecting location” (Unix timestamp)';

            $result = $catchloc->getDataBetween24Hours($member_key, $from_date, $to_date);


            ===== 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 =
            {
                member_key: 'HASH KEY to certify device',
                from_date: 'time for “Start collecting location” (Unix timestamp)',
                to_date: 'time for “End collecting location” (Unix timestamp)',
            };

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

            CatchLoc.getDataBetween24Hours(params, callback);



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

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