Superfy Platform API Documentation


Get Available Zones API

Require Authentication

This API is used to get available projects for the company based on combination of deviceID and token.


URL

api/projects/list

Required parameter (POST)

Optional parameter (GET)

All optional parameters use GET method. So it should be embedded in the URL, e.g: api/projects/list?q=project&o=projectName

Example JSON Payload

{
	"deviceID": "ABCD-EFGH-IJKL-MNOP",
	"token": "bb602ab13b8090268cd6e3bb9dfa39e2"
}

Possible return HTTP status code

Return message

{
  "status": "success",
  "message": {
    "current_parameter": "?o=projectName&q=project&offset=0",
    "next_parameter": "",
    "previous_parameter": "",
    "start": 0,
    "total": 2,
    "lists": [{
      "projectID": 5,
      "projectName": "test zone API",
      "projectDescription": "description zone API",
      "projectIconURL": "http:\/\/localhost\/mapmybins\/assets\/uploads\/customicons\/1\/appsize\/6a7c58395eeff2be6569867317cf0e3f.png",
      "projectAddress1": "Anggrek Cakra 12",
      "projectAddress2": "Kemanggisan",
      "projectCity": "Jakarta Barat",
      "projectState": "Jakarta",
      "projectCountry": "Indonesia",
      "projectZipCode": "11530",
      "projectLatitude": -6.20242357254,
      "projectLongitude": 106.77906036377,
      "projectCreatedDate": 1449582720,
      "projectModifiedDate": 1449582720,
      "projectCreatorUserID": 3,
      "projectModifiedByUserID": 3,
      "total_projectpins": 0,
      "total_projectgroup": 0
    }, {
      "projectID": 7,
      "projectName": "test zone API",
      "projectDescription": "description zone API",
      "projectIconURL": "",
      "projectAddress1": "Anggrek Cakra 12",
      "projectAddress2": "Kemanggisan",
      "projectCity": "Jakarta Barat",
      "projectState": "Jakarta",
      "projectCountry": "Indonesia",
      "projectZipCode": "11530",
      "projectLatitude": -6.20242357254,
      "projectLongitude": 106.77906036377,
      "projectCreatedDate": 1449582720,
      "projectModifiedDate": 1449582720,
      "projectCreatorUserID": 3,
      "projectModifiedByUserID": 3,
      "total_projectpins": 0,
      "total_projectgroup": 0
    }]
  }
}

Note: use "next_parameter" and "previous_parameter" to go to next or previous result page. Just combine it with the API URL, e.g: "api/projects/list"+next_parameter or "api/projects/list"+previous_parameter