TrakIT API‎ > ‎Pending API‎ > ‎

Get Asset

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


Request: GET

Signature:
 /api/mobile/GetAssetV2?Token={Login_Token}&AssetID={Asset_Id}



Sample: /api/mobile/GetAssetV2?Token=VomYEMiECFFyAQ3==&AssetID=11

Response: 

{
    "Code": 1,
    "Info": "",
    "RowsAffected": 0,
    "Scalar": null,
    "Identity": 0,
    "RetInfo": [
        {
            "Type": "Field",
            "Name": "Asset Type",
            "Value": "Contract",
            "Active": true,
            "IsEditable": false,
            "Code": "ASSETTYPE",
            "DataType": "Text",
            "Remarks": null,
            "MultiSelect": null,
            "ListValues": null
        },
        {
            "Type": "Field",
            "Name": "Asset Name",
            "Value": "AutoXpress Contract1",
            "Active": true,
            "IsEditable": true,
            "Code": "ASSETNAME",
            "DataType": "Text",
            "Remarks": null,
            "MultiSelect": null,
            "ListValues": null
        },
        {
            "Type": "Field",
            "Name": "Asset Serial",
            "Value": "AUX001",
            "Active": true,
            "IsEditable": true,
            "Code": "ASSETSERIAL",
            "DataType": "Text",
            "Remarks": null,
            "MultiSelect": null,
            "ListValues": null
        },
        {
            "Type": "Field",
            "Name": "Category",
            "Value": "Customer Contracts",
            "Active": true,
            "IsEditable": true,
            "Code": "CATID",
            "DataType": "Text",
            "Remarks": null,
            "MultiSelect": null,
            "ListValues": "Customer Contracts;Supplier Contracts - Trucks"
        },
        {
            "Type": "Field",
            "Name": "Linked To",
            "Value": "[ NOT LINKED ]",
            "Active": true,
            "IsEditable": false,
            "Code": "LINKEDTO",
            "DataType": "Text",
            "Remarks": null,
            "MultiSelect": null,
            "ListValues": null
        },
        {
            "Type": "Field",
            "Name": "Belongs To",
            "Value": "Customer",
            "Active": true,
            "IsEditable": true,
            "Code": "BELONGSTO",
            "DataType": "Text",
            "Remarks": null,
            "MultiSelect": null,
            "ListValues": "Self Owned;Carrier;Customer;Transporter;BA;CA;Bank;Authority;Other Vendor"
        },
        {
            "Type": "Field",
            "Name": "Owned By",
            "Value": "Autoxpress Ltd",
            "Active": true,
            "IsEditable": true,
            "Code": "OWNERID",
            "DataType": "Text",
            "Remarks": null,
            "MultiSelect": null,
            "ListValues": null
        },
        {
            "Type": "Field",
            "Name": "Asset Value",
            "Value": "1000000.00",
            "Active": true,
            "IsEditable": true,
            "Code": "VALUE",
            "DataType": "Number",
            "Remarks": null,
            "MultiSelect": null,
            "ListValues": null
        },
        {
            "Type": "Field",
            "Name": "Responsible",
            "Value": null,
            "Active": true,
            "IsEditable": true,
            "Code": "RESP",
            "DataType": "Text",
            "Remarks": null,
            "MultiSelect": null,
            "ListValues": null
        },
        {
            "Type": "Field",
            "Name": "Remarks",
            "Value": "",
            "Active": true,
            "IsEditable": true,
            "Code": "REMARKS",
            "DataType": "Text",
            "Remarks": null,
            "MultiSelect": null,
            "ListValues": null
        },
        {
            "Type": "Data",
            "Name": "Commencement Date",
            "Value": "TBA",
            "Active": false,
            "IsEditable": true,
            "Code": "COMDATE",
            "DataType": "Date",
            "Remarks": "",
            "MultiSelect": null,
            "ListValues": null
        },
        {
            "Type": "Data",
            "Name": "Expiry Date",
            "Value": "12:29, 03 Apr 2019",
            "Active": true,
            "IsEditable": true,
            "Code": "EXPDATE",
            "DataType": "Date",
            "Remarks": "Abc",
            "MultiSelect": null,
            "ListValues": null
        },
        {
            "Type": "Data",
            "Name": "Location",
            "Value": "Loc1\Loc3\Loc4",
            "Active": "False",
            "IsEditable": true,
            "Code": "LOC",
            "DataType": "Text",
            "Remarks": "",
            "MultiSelect": "4",
            "ListValues": "Loc1;Loc2;Loc3;Loc4;Loc5"
        },
        {
            "Type": "Data",
            "Name": "Pick Up",
            "Value": "Pick Up1",
            "Active": true,
            "IsEditable": true,
            "Code": "PICK",
            "DataType": "Text",
            "Remarks": "",
            "MultiSelect": null,
            "ListValues": "Pick Up1;Pick Up12;Pick Up13;Pick Up14"
        }
    ]
}


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

  • AssetID - You can use Get Asset List API to get  AssetID

  • Possible Values for BelongsTo:
    1. Self Owned
    2. Carrier  
    3. Customer 
    4. Transporter 
    5. BA
    6. CA 
    7. Bank 
    8. Authority 
    9. Other Vendor  

  • Definition of each attribute in RetInfo for Field:

  • Attribute  Description
    Name Name of the field
    Value Current value stored in it
    Active It is a Boolean field. All the fields will be default True
    IsEditable It is a Boolean field. It will be True if the user has access to Update action. It will be by default False for Asset Type
    Code Unique code assigned to the Field
    DataType It will be by Text or Number
    Remarks It will be by default null
    MultiSelect It will be by default null
    ListValues If ListValues has some values, then it is single select list

  • Definition of each attribute in RetInfo for Data:

  • Attribute  Description
    Name Name of the field
    Value Current value stored in it
    Active It is a Boolean field.
    IsEditable It is a Boolean field. It will be True if the user has access to Update Asset Data action.
    Code Unique code assigned to the Data
    DataType Possible values will be Text, Date, Number, Currency and HyperLink
    Remarks Current remarks store in it.
    MultiSelect Possible values are null or greater than 0.

    • When MultiSelect is Null and ListValues is also Null, then it can be a Text or Numeric Field
    • When MultiSelect is Null and ListValues has some list in it, then it is Single Select
    • When MultiSelect is greater than 0 and ListValues has some list in it, then it is Multi Select

    ListValues It will have a list in case of Single Select Or Multi Select


Comments