online-help.platform.features.premier_subscription.connectors.inbound-rest-api.endpoints.asset.title
Add Asset
Overview
Creates an Asset in MobiWork
URL Format
https://{domain}.mobiwork.com/api/rest/{clientId}/{versionNumber}/asset/add.html?token=XXXXXXXX&userId={userId}
Arguments
clientId
required
MobiWork assigned unique ID of the company
versionNumber
required
Version number of MobiWork API SDK release. Current version is: 10.0.78
token
required
Part of URL as a request parameter and is required in every call to verify access to API calls
userId
optional
If provided in URL, this User ID will be taken as a logged in user
Return
Returns an Asset Object if asset creation is successful or errors will be returned
Request Body XSD
Response Body XSD
Curl Example
HTTP Method: POST
Request: curl -k -X POST -H "https://www.mobiwork.com/api/rest/12014/10.0.78/asset/add.html?token=COJL8X2FKSLMMRTYCH2B" -data '<request>
<asset>
<externalId>API11122</externalId>
<name>FORD FLEET TRUCK2</name>
<description>FORD FLEET TRUCK2</description>
<modelNumber></modelNumber>
<serialNumber>1FDE5C1206F422322</serialNumber>
<warrantStartDate></warrantStartDate>
<warrantEndDate></warrantEndDate>
<status>Active</status>
<typeName>Vehicle</typeName>
<categoryName>Vehicle</categoryName>
<subCategoryName>FORD FLEET TRUCK</subCategoryName>
<customFields>
<customField>
<apiName>valueofassets</apiName>
<value>40000</value>
<index>0</index>
</customField>
<customField>
<apiName>LicenseTag</apiName>
<value>18011TF</value>
<index>0</index>
</customField>
<customField>
<apiName>ServicedBy</apiName>
<value>Royal Palm Auto Spa</value>
<index>0</index>
</customField>
<customField>
<apiName>OilFilterNumber</apiName>
<value>8111</value>
<index>0</index>
</customField>
</customFields>
</asset>
</request>'
Response: <?xml encoding="UTF-8" ?>
<response version="10.0.78" statusCode="1">
<asset>
<mobiworkAssetId>56944</mobiworkAssetId>
<externalId>API11122</externalId>
<name>FORD FLEET TRUCK2</name>
<description>FORD FLEET TRUCK22</description>
<modelNumber></modelNumber>
<serialNumber>1FDE5C1206F422322</serialNumber>
<customFieldList>
<customField>
<apiName>LicenseTag</apiName>
<fieldType>1</fieldType>
<value></value>
<name>License Tag</name>
</customField>
<customField>
<apiName>ServicedBy</apiName>
<fieldType>6</fieldType>
<value></value>
<name>Serviced By</name>
</customField>
<customField>
<apiName>OilFilterNumber</apiName>
<fieldType>1</fieldType>
<value></value>
<name>Oil Filter Number</name>
</customField>
<customField>
<apiName>valueofassets</apiName>
<fieldType>1</fieldType>
<value></value>
<name>Value of asset</name>
</customField>
<customField>
<apiName>images</apiName>
<fieldType>25</fieldType>
<value></value>
<name>Additional Images</name>
</customField>
</customFieldList>
</asset>
</response>