CATCH LOC Developers

Login

[Group Management] API access for modifying group information

Description

API access to modifying location object's group information

API

api_code : api.common.group.set.modify

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 to certify GROUP
group_name : Group Name, URL ENCODE

Response

result : RESULT
message : result code

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.set.modify&
            api_key=xxxxx&
            timestamp=1513319595&
            cert_key=xxxxx&
            group_key=xxxxxx&
            group_name=%ED%85%8C%EC%8A%A4%ED%8A%B8+%EA%B7%B8%EB%A3%B9%EC%9D%B4%EB%A6%84



            ===== Response =====

            - Success
            {
              "result":"OK",
              "message":"GROUP_MODIFY"
            }

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

            ===== Request =====

            String group_key = "HASH KEY to certify GROUP";
            String group_name = "New Group Name";

            CatchLoc catchloc = new CatchLoc();

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

            JSONObject result = catchloc.editGroupName(group_key, group_name);



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

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

            CatchLocAPI.shared.editGroupName(groupKey: GROUP_KEY, groupName: GROUP_NAME)
            { result in
                
                let jsonData = result.response

                or

                let jsonString = result.description()
                
            }

            ===== Response =====

            {
                "response" : API Response Body
            }
        

            ===== Request =====

            $group_key = 'HASH KEY to certify GROUP';
            $group_name = 'New Group Name';

            $catchloc = new CatchLoc();

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

            $result = $catchloc->editGroupName($group_key, $group_name);


            ===== 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 =
            {
                group_key: 'HASH KEY to certify GROUP',
                group_name: 'New Group Name',
            };

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

            CatchLoc.editGroupName(params, callback);



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

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