TrakIT API‎ > ‎Asset‎ > ‎

Get Asset Categories

The below API is used to get Asset Categories.


Request: GET

Signature:
 /api/mobile/GetAssetCategories?Token={Login_Token}&TypeID={Asset_TypeID}



Sample: /api/mobile/GetAssetCategories?Token=VomYEMiECFFyAQ3==&TypeID=2

Response: 

{
    "Code": 1,
    "Info": "",
    "RowsAffected": 4,
    "Scalar": null,
    "Identity": 0,
    "RetInfo": 
    [
        {
            "CATID": 3,
            "CATNAME": "Class 1 - Heavy Trucks"
        },
        {
            "CATID": 2,
            "CATNAME": "Class 3 - Medium Trucks"
        },
        {
            "CATID": 6,
            "CATNAME": "Class 7 - Heavy Trucks"
        },
        {
            "CATID": 7,
            "CATNAME": "Class 9 - Special Duty Truck"
        }

    ]
}

Things to know about this API:
  1. Login Token - You can use Login API to get token under Info

  2. Asset_TypeID (You can get the TypeID using GetAssetType API)

  3. RowsAffected is 4 which means that 4 categories is returned for this TypeID.

  4. Definition of each attribute for RetInfo:

  5. Attribute  Description
    CatID It is a Numeric unique ID which is auto assigned while creating new Asset Category
    CatName It is the Category Name
Comments