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.last.php?
            api_key= abcdefghijklmnopqrstuvwxyz1234567890&
            member_key=abcdefghijklmnopqrstuvwxyz1234567890&
            timestamp=1446624149000&
            cert_key=abcdefghijklmnopqrstuvwxyz1234567890



            ===== Response =====

            - Success
            {
                "member_key":"developer@catchloc.com",
                "name":"developer@catchloc.com",
                "latitude":"37.3984002",
                "longitude":"126.9632804",
                "accuracy":44.343,
                "speed":64.5,
                "odometer":735976,
                "location_date":1459927833000
            }

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

            ===== Request =====

            String member_key = "HASH KEY to certify device";

            CatchLoc catchloc = new CatchLoc();

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

            JSONObject result = catchloc.getLastData(member_key);



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

            {
                "result"  : "ok",
                "type"    : "jsonobject"
                "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

            CatchLocAPI.shared.getLastData(memberkey: MEMBER_KEY)
            { result in
                let jsonData = result.response

                or

                let jsonStr = result.description()
            }


            ===== Response =====

            {
                "response" : API Response Body
            }
        

            ===== Request =====
            
            $member_key = 'HASH KEY to certify device';

            $catchloc = new CatchLoc();

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

            $result = $catchloc->getLastData($member_key);


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

            "{
                "result"  : "ok",
                "type"    : "map"
                "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',
            };

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

            CatchLoc.getLastData(params, callback);



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

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