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:
- Token - You can use Login API to get token displayed under Info
- Category - You can get the category using Get Asset Categories API
- These fields are mandatory while sending request body:
- Name
- Serial
- Category
- BelongsTo - You can use Get Entity Types API to get the list of entity types under Value
- OwnerName - You can use Get Entity List API to get the list of entities under EntName
- Responsible - You can use Get User List API to get the list of users under UserID
- Identity in Response is newly created AssetID.