TrakIT API‎ > ‎Asset‎ > ‎

Update Asset

The below API is used to update an asset header and data fields in Asset Management.


Request: POST 

Signature: trakit.XXX.com/api/mobile/UpdateAssetData?Token={Login_Token}


Body:

{
"Serial":" ASSET_SERIAL", 
"Field":
[
 { 
  "Code":"ASSET_HEADER_CODE", 
  "Value":"ASSET_HEADER_VALUE"
 },
 { 
  "Code":"ASSET_HEADER_CODE", 
  "Value":"ASSET_HEADER_VALUE"
 },
]
"Data":
[
   
 {
  "Code":"FIELD_CODE_DATE",
  "Value":"DD MMM YYYY",
  "Remarks":"FIELD_CODE_DATE_REMARKS"
 },
 {    
  "Code":"FIELD_CODE_LIST",
  "Value":"ITEM1;ITEM2;ITEM3",
  "Remarks":"FIELD_CODE_LIST_REMARKS
 },
 {
  "Code":"FIELD_CODE_TEXT",
  "Value":"FIELD_CODE_TEXT VALUE",
  "Remarks":"FIELD_CODE_TEXT_REMARKS
 },
 {
  "Code":"FIELD_CODE_NUMERIC",
  "Value":FIELD_CODE_NUMERIC VALUE,
  "Remarks":"FIELD_CODE_NUMERIC_REMARKS
 }
]
}


Sample: xyz.trakit.com/api/mobile/UpdateAssetData?Token=MuP0L002ISMDco= 


Body:


"Serial":" TRK001", 
"Field":
[
 { 
   "Code":"ASSETSERIAL", 
   "Value":"TRK002"
 },
 { 
   "Code":"VALUE", 
   "Value":"23"
 },
]
"Data": 

 
    "Code":"EXDATE", 
    "Value":" 17 Oct 2018", 
    "Remarks":"Asset expired on this date" 
 }, 
 {    
    "Code":"COMM", 
    "Value":"Coffee;Tea", 
    "Remarks":"Multiple commodities" 
 }, 
 { 
    "Code":"ACCMAN", 
    "Value":"Tom", 
    "Remarks":"Current Account Manager Name" 
 }, 
 { 
    "Code":"TRLNUM", 
    "Value":10, 
    "Remarks":"Number of Trailers linked" 
 } 

} 

Response: 

{
"Code": 1,
"Info": "Asset data updated successfully",
"RowsAffected": 1,
"Scalar": null,
"Identity": 0,
"RetInfo": null
}


Things to know about this API:
  1. These fields are mandatory while sending request body:

    • Serial 
    • Asset Header Fields -> Code. It can be ASSETNAME, ASSETSERIAL, CATID, OWNERID, VALUE, RESP and REMARKS.
    • Asset Data Fields -> Code : Field Code 
    • Asset Data Fields -> Value: Data Type Validated 

  2. Data value for Item list must be separated with semi colon (;)

  3. Default value for OWNERID is Self-Owned.

  4. Possible Values for BelongsTo:

    • Carrier 
    • Customer 
    • Transporter 
    • BA
    • CA 
    • Bank 
    • Authority 
    • Other Vendor

Comments