Superfy Platform API Documentation


Update Company Information API

Require Authentication

This API is used to update company information based on combination of deviceID and token.

Only users that have module "edit_company_information" in their role/department (currently only Administrator) can edit company information


URL

api/companies/update

Required parameter (POST)

Optional parameter (POST)

Example JSON Payload

{
	"deviceID": "ABCD-EFGH-IJKL-MNOP",
	"token": "bb602ab13b8090268cd6e3bb9dfa39e2",
	"companyAddress1": "Anggrek Cakra 12",
	"companyCity": "Jakarta",
	"companyState": "Jakarta Barat",
	"companyCountry": "Indonesia",
	"companyPhone": "123456789",
	"companyFax": "123456789",
	"companyWebsite": "http://www.google.com",
	"companyLogoURL_extension": "jpg",
	"companyLogoURL": "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAQDAwQDAwQEAwQFBAQFBgoHBgYGBg0JCggKDw0QEA8NDw4RExgUERIXEg4PFRwVFxkZGxsbEBQdHx0aHxgaGxr/2wBDAQQFBQYFBgwHBwwaEQ8RGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhr/wAARCADIAMgDASIAAhEBAxEB/8QAHAABAAIDAQEBAAAAAAAAAAAAAAUGAQIHBAMI/8QAKRABAQABAwQCAQMFAQAAAAAAAAIDBAUSBiIyUgFiQhMjNBZyk6LS4v/EABQBAQAAAAAAAAAAAAAAAAAAAAD/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwD9mAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAApu89ZXh1GTBtsRU4641lvu5V9QXIUra+tsv68490iKxVXHnE8aj7faV2mpqeU+IMAAAAAACpb51d86PUXptviMlRXHJd908vV4du621E5ZncMUZMFV3VE8an7fYF7GIqcmObx1ymp5TU/lLIAAAAAAAAAAAANLmqxX8Y/njVTXGvs47c/OO6jJ8camuNTXs7KgN46T0m5ZazY7rT568qmeU19gc4dc26bx7dpMWbtucO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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH//Z"
}

Possible return HTTP status code

Return message, contain newest data

{
	"status": "success",
	"message": {
		"company": {
			"companyID": 16,
			"companyName": "Smartsensor Live Testing",
			"companyLogoURL": "https://wasteinsights-files.s3.ap-southeast-2.amazonaws.com/uploads/companylogo/16/f9d89f802cd5479c958e17944b5c2d4d.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=1234567890AbcDeFghIj%2F20230817%2Fap-southeast-2%2Fs3%2Faws4_request&X-Amz-Date=20230817T075931Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=123456789009876543214c286c6e40b37a46e04525cb28368990e206d741f216",
			"companyAddress1": "Tanah Abang",
			"companyAddress2": "",
			"companyCity": "Jakarta",
			"companyState": "Jakarta Pusat",
			"companyCountry": "Indonesia",
			"companyZipCode": "4011",
			"companyLatitude": -6.20397233963,
			"companyLongitude": 106.80513763428,
			"companyPhone": "1234567890",
			"companyFax": "1234567890",
			"companyWebsite": "http://www.google.com",
			"expiredDate": 0,
			"default_currencyCode": "AUD",
			"default_paymentPeriod": "monthly",
			"fillLevelSource": "laseravg",
			"collectionCalculationConfig": "standard",
			"bulkCollectionRadius": "2000",
			"licenseTypeID": 1,
			"licenseTypeName": "Town Plan"
		}
	}
}

Note:
If company address (companyAddress1, companyAddress2, companyCity, companyState, companyCountry, companyZipCode) is changed but companyLatitude or companyLongitude is not changed, system will automatically change companyLatitude and companyLongitude value based on geographical coordinate of the new address.
if companyLatitude and companyLongitude