CATCH LOC Developers

Login

[Group Management] API access for creating group

Description

API access for location object's group designation and creation.

API

api_code : api.common.group.set.add

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_name : Group name, URL ENCODE

Response

result : RESULT
group_key : Created group's key
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.add&api_key=xxxxx&
            timestamp=1513319595&
            cert_key=xxxxx&
            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",
              "group_key" : "*******************",
              "message":"SUCCESS : GROUP_CREATE"
            }

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

            ===== Request =====

            String group_name = "Group Name";

            CatchLoc catchloc = new CatchLoc();

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

            JSONObject result = catchloc.createGroup(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_NAME : URL Encoded String

            CatchLocAPI.shared.createGroup(groupName: GROUP_NAME)
            { result in
                
                let jsonData = result.response

                or

                let jsonString = result.description()
            }

            ===== Response =====

            {
                "response" : API Response Body
            }
        

            ===== Request =====

            $group_name = 'Group Name';

            $catchloc = new CatchLoc();

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

            $result = $catchloc->createGroup($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_name: 'Group Name',
            };

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

            CatchLoc.createGroup(params, callback);



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

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