Superfy Platform API Documentation


Update Specific Zone API

Require Authentication

This API is used to update specific zone for the company based on combination of deviceID and token.

URL

api/projects/update/:projectID

Required parameter (in URL)

Required parameter (POST)

Optional parameter (POST)

Example JSON Payload

{
	"deviceID": "ABCD-EFGH-IJKL-MNOP",
	"token": "bb602ab13b8090268cd6e3bb9dfa39e2",
	"projectName": "test zone API edit",
	"projectDescription": "description zone API",
	"projectAddress1": "Anggrek Cakra 12",
	"projectAddress2": "Kemanggisan",
	"projectCity": "Jakarta Barat",
	"projectState": "Jakarta",
	"projectCountry": "Indonesia",
	"projectZipCode": "11530"
}

Possible return HTTP status code

Return message

{
  "status": "success",
  "message": {
    "projectID": 5,
    "projectName": "test zone API edit",
    "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": 1449603290,
    "projectCreatorUserID": 3,
    "projectModifiedByUserID": 3,
    "total_projectpins": 0,
    "total_projectgroup": 0
  }
}

Note:
If zone address (projectAddress1, projectAddress2, projectCity, projectState, projectCountry, projectZipCode) is changed but projectLatitude or projectLongitude is not changed, system will automatically change projectLatitude and projectLongitude value based on geographical coordinate of the new address.
If "projectLatitude" or "projectLongitude" is empty, both of them will be filled with company coordinates.
Still empty? It will be filled with default coordinates.