Update Asset Data
The below API is used to update an asset header and data fields in Asset Management.
Request: POST
Signature: /api/mobile/UpdateAssetData?Token={Login_Token}
Body:
{
"Serial":" ASSET_SERIAL",
"Field":
[
{
"Code":"ASSET_HEADER_CODE",
"Value":"ASSET_HEADER_VALUE"
}
]
"Data":
[
{
"Code":"FIELD_CODE_DATE",
"Value":"FIELD_VALUE",
"Remarks":"FIELD_REMARKS"
}
]
}
Sample: /api/mobile/UpdateAssetData?Token=VomYEMiECFFyAQ3==
Body:
{
"Serial":" TRK001",
"Field":
[
{
"Code":"ASSETSERIAL",
"Value":"TRK002"
},
{
"Code":"OWNERID",
"Value":"Transporter|RSX Transporter Pvt. Ltd."
},
]
"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:
- Token - You can use Login API to get token displayed under Info
- These fields are mandatory while sending request body:
- Asset Serial
- Code
- Value
- Below are the Asset Header Fields and their Code:
- Things to note when updating OWNERID:
- Format is EntityType|EntityName (You can use Get Entity Types API to get the list of entity types under Value)
- Default value is Self-Owned
- Data value for Item list must be separated with semi colon (;)