12. TrakIT API‎ > ‎Asset‎ > ‎Get Asset Type‎ > ‎

Get Asset Types

The below API is used to get asset types in Asset Management.


Request: GET

Signature:
 /api/mobile/GetAssetTypes?Token={Login_Token}


Sample: /api/mobile/GetAssetTypes?Token=VomYEMiECFFyAQ3==

Response: 

{
    "Code": 1,
    "Info": "",
    "RowsAffected": 4,
    "Scalar": null,
    "Identity": 0,
    "RetInfo": [
        {
            "TYPEID": 1,
            "TYPENAME": "Contract",
            "CODE": "CONT",
            "CREATEDBY": "ADMIN",
            "CREATED": "2019-01-29T10:27:31.627",
            "DISABLED": false,
            "HASGPS": false,
            "USERNAME": "Tom Admin"
        },
        {
            "TYPEID": 2,
            "TYPENAME": "Driver",
            "CODE": "DRV",
            "CREATEDBY": "SUPPORT",
            "CREATED": "2019-01-29T10:27:02.5",
            "DISABLED": false,
            "HASGPS": false,
            "USERNAME": "Tom Admin"
        },
        {
            "TYPEID": 3,
            "TYPENAME": "Trailer",
            "CODE": "TRL",
            "CREATEDBY": "SUPPORT",
            "CREATED": "2019-01-25T10:03:32.003",
            "DISABLED": false,
            "HASGPS": false,
            "USERNAME": "L1 Support"
        },
        {
            "TYPEID": 4,
            "TYPENAME": "Truck",
            "CODE": "TRK",
            "CREATEDBY": "ADMIN",
            "CREATED": "2019-03-05T14:34:28.163",
            "DISABLED": false,
            "HASGPS": true,
            "USERNAME": "Tom Admin"
        }
    ]
}

Things to know about this API:

  1. Token - You can use Login API to get token displayed under Info

  2. RowsAffected - Displays the total number of Asset Types

  3. Definition of each attribute for RetInfo:

  4. Attribute  Description
    TypeID It is a Numeric unique ID which is auto assigned while creating new Asset Type
    TypeName It is Asset Type Name
    Code It is unique Asset Type Code
    CreatedBy It displays the UserID of the user who has created the Asset Type
    Created  It displays the time stamp when the Asset Type was created
    Disabled It is a Boolean field. True: if the asset type is inactive and False: if the Asset Type is active
    HasGPS It is a Boolean field. True: if the asset has GPS device attached to it and False: if the asset has no GPS attached.
    UserName It displays the Full Name of the User who has created the Asset Type
Comments