Superfy Platform API Documentation


Get Available Asset Types API

Require Authentication

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


URL

api/manageassets/types

Required parameter (POST)

Optional parameter (GET)

All optional parameters use GET method. So it should be embedded in the URL, e.g: api/manageassets/types?q=tes&o=pinTypeName

Example JSON Payload

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

Possible return HTTP status code

Return message

{
  "status": "success",
  "message": {
    "current_parameter": "?per_page=999999999&offset=0",
    "next_parameter": "",
    "previous_parameter": "",
    "start": 0,
    "total": 14,
    "lists": [
      {
        "pintypeID": 134,
        "pinTypeName": "bb test",
        "iconType": "system",
        "iconID": 2,
        "iconURL": "https://dashboard.superfy.com/assets/images/icons/default/appsize/enclosure.png",
        "pinTypeDescription": "",
        "pinTypeRuleForPinName": "",
        "pinTypeImageOriginalName": "",
        "pinTypeImageURL": "",
        "manufacturerID": 0,
        "manufacturerName": "",
        "pinSize": "120",
        "depthWhenEmpty_cm": 20,
        "distanceSensorToFillLine_cm": 2,
        "pinTypeCreatedDate": 1591353799,
        "pinTypeCreatedByUserID": 90,
        "pinTypeModifiedDate": 1614829214,
        "pinTypeModifiedByUserID": 90,
        "diffFillLevelToCollect": 0,
        "minPrevFillLevelToCollect": 0,
        "total_projectpins": 33
      },
      {
        "pintypeID": 111,
        "pinTypeName": "bin 2",
        "iconType": "system",
        "iconID": 16,
        "iconURL": "https://dashboard.superfy.com/assets/images/icons/bins/appsize/28.png",
        "pinTypeDescription": "",
        "pinTypeRuleForPinName": "",
        "pinTypeImageOriginalName": "",
        "pinTypeImageURL": "",
        "manufacturerID": 0,
        "manufacturerName": "",
        "pinSize": "0",
        "depthWhenEmpty_cm": 0,
        "distanceSensorToFillLine_cm": 0,
        "pinTypeCreatedDate": 1570518391,
        "pinTypeCreatedByUserID": 88,
        "pinTypeModifiedDate": 1591013015,
        "pinTypeModifiedByUserID": 90,
        "diffFillLevelToCollect": 0,
        "minPrevFillLevelToCollect": 0,
        "total_projectpins": 7
      },
      {
        "pintypeID": 133,
        "pinTypeName": "Bin 3",
        "iconType": "system",
        "iconID": 16,
        "iconURL": "https://dashboard.superfy.com/assets/images/icons/bins/appsize/28.png",
        "pinTypeDescription": "",
        "pinTypeRuleForPinName": "",
        "pinTypeImageOriginalName": "",
        "pinTypeImageURL": "",
        "manufacturerID": 0,
        "manufacturerName": "",
        "pinSize": "44",
        "depthWhenEmpty_cm": 22,
        "distanceSensorToFillLine_cm": 2,
        "pinTypeCreatedDate": 1591013046,
        "pinTypeCreatedByUserID": 90,
        "pinTypeModifiedDate": 1591015185,
        "pinTypeModifiedByUserID": 90,
        "diffFillLevelToCollect": 0,
        "minPrevFillLevelToCollect": 0,
        "total_projectpins": 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/manageassets/types"+next_parameter or "api/manageassets/types"+previous_parameter
Since manufacturerID is optional, if manufacturerID is set to 0 and manufacturerName is set to empty string, it indicates that asset type does not have manufacturer assigned.

Note for pinTypeRuleForPinName:
pinTypeRuleForPinName contains pattern that will be used as default pin name. If pin name is not empty, user-defined pin name will overrides this default pattern.
All words that match with predefined pattern below will be replaced with the related data.

However, user can still add his own words outside the predefined key. But keep in mind that Pin Name can only store 255 characters and must not empty. Exceeding characters will be removed.