TrakIT API‎ > ‎Asset‎ > ‎

Add Asset

The below API is used to add an asset in Asset Management.


Request: POST 

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

Body: 

{
"Name":"ASSET_NAME",
"Serial":"ASSET_SERIAL",
"Category":"ASSET_CATEGORY",
"Value":ASSET_VALUE,
"BelongsTo":"ENTITY_TYPE",
"OwnerName":"ENTITY_NAME",,
"Responsible":"ASSET_RESPONSIBLE_PERSON", 
"Remarks":"ASSET_REMARKS"
}


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

Body: 


"Name":"Truck001", 
"Serial":"001X", 
"Category":"Class 1 - Heavy Trucks", 
"Value":999, 
"BelongsTo":"Transporter", 
"OwnerName":"Ailx Transporters Ltd.",
"Responsible":"Tom",
"Remarks":"Added on 20th Nov 2018" 

Response: 

{
"Code": 1,
"Info": "Asset created successfully",
"RowsAffected": 1,
"Scalar": null,
"Identity": 001,
"RetInfo": null
}


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

  2. Category - You can get the category using Get Asset Categories API

  3. These fields are mandatory while sending request body: 

    • Name 
    • Serial 
    • Category 

  4. BelongsTo You can use Get Entity Types API to get the list of entity types under Value

  5. OwnerName - You can use Get Entity List API to get the list of entities under EntName

  6. Identity in Response is newly created AssetID.
Comments