Superfy Platform API Documentation


Update Current User Profile API

Require Authentication

This API is used to update current user profile based on combination of deviceID and token.


URL

api/users/update

Required parameter

Optional parameter

Example JSON Payload

{
	"deviceID": "ABCD-EFGH-IJKL-MNOP",
	"token": "bb602ab13b8090268cd6e3bb9dfa39e2",
	"firstName": "Indra",
	"lastName": "Winata",
	"phone": "123456789",
	"mobile": "123456789",
	"timezoneOffset": 420,
	"timezoneName": "Asia/Jakarta",
	"profilePicture_extension": "jpg",
	"profilePicture": "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAQDAwQDAwQEAwQFBAQFBgoHBgYGBg0JCggKDw0QEA8NDw4RExgUERIXEg4PFRwVFxkZGxsbEBQdHx0aHxgaGxr/2wBDAQQFBQYFBgwHBwwaEQ8RGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhr/wAARCADIAMgDASIAAhEBAxEB/8QAHAABAAIDAQEBAAAAAAAAAAAAAAUGAQIHBAMI/8QAKRABAQABAwQCAQMFAQAAAAAAAAIDBAUSBiIyUgFiQhMjNBZyk6LS4v/EABQBAQAAAAAAAAAAAAAAAAAAAAD/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwD9mAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAApu89ZXh1GTBtsRU4641lvu5V9QXIUra+tsv68490iKxVXHnE8aj7faV2mpqeU+IMAAAAAACpb51d86PUXptviMlRXHJd908vV4du621E5ZncMUZMFV3VE8an7fYF7GIqcmObx1ymp5TU/lLIAAAAAAAAAAAANLmqxX8Y/njVTXGvs47c/OO6jJ8camuNTXs7KgN46T0m5ZazY7rT568qmeU19gc4dc26bx7dpMWbtucOOa5e3GULtvRuk0Oec2oyVqsk1ymanjM17LIAAAAAADkGqx3j1WWM3nOSprl7cnwdJ3fpfSbtf63OtPnryuZ5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message, contain newest data

{
  "status": "success",
  "message": {
    "profile": {
      "userID": 90,
      "username": "support@superfy.com",
      "firstName": "Support",
      "lastName": "Support",
      "phone": "123456789",
      "mobile": "123456789",
      "profilePicture": "https://wasteinsights-public-files.s3.ap-southeast-2.amazonaws.com/images/icon_placeholder_logo_individu.jpg",
      "createdDate": 1521442184,
      "active": "Y",
      "timezoneOffset": 420,
      "timezoneName": "Asia/Jakarta",
      "isEmailVerified": "Y",
      "welcomepopup": "N",
      "isDemo": "N",
      "acceptEula": "Y",
      "acceptEulaDate": "1681211255",
      "acceptEulaVer": "2",
      "OSVersion": "iOS 9.2.0",
      "appVersion": "SmartSensor 1.0.0",
      "notificationCenterType": "apple",
      "buildVersion": "DEV",
      "udl_timezoneOffset": "420",
      "udl_timezoneName": "Asia/Jakarta",
      "departmentID": 46,
      "departmentName": "Administrator",
      "changeImage": true
    },
    "company": {
      "companyID": 16,
      "companyName": "Smartsensor Live Testing",
      "companyLogoURL": "https://wasteinsights-public-files.s3.ap-southeast-2.amazonaws.com/images/icon_placeholder_logo_company.jpg",
      "companyAddress1": "3/441 Nudgee Road",
      "companyAddress2": "",
      "companyCity": "Hendra",
      "companyState": "QLD",
      "companyCountry": "AU",
      "companyZipCode": "4011",
      "companyLatitude": -27.415924072266,
      "companyLongitude": 153.07464599609,
      "companyPhone": "",
      "companyFax": "",
      "companyWebsite": "",
      "expiredDate": 0,
      "default_currencyCode": "AUD",
      "default_paymentPeriod": "monthly",
      "licenseTypeID": 1,
      "licenseTypeName": "Town Plan"
    },
    "deviceID": "ABCD-EFGH-IJKL-MNOP",
    "token": "579aa72a3a496f84c7aa4ffc325981ac"
  }
}

Note:
"timezoneOffset" contains user time differences to UTC in minutes. For example, if it is 420, it means that it is UTC +7 hour (420 minutes / 60 minutes × 1 hour = 7 hour)
"timezoneName" contains user timezone name as mentioned in http://php.net/manual/en/timezones.php