Use this function rather than the deprecated extaddasset function to add assets.
This function is used to add asset objects to the system.
| Required Information | |
|---|---|
| Name | Description |
| action | adminassets |
| operation | add |
| format | xml |
| fleet | Cust assigned ident Any text, 20 char max. Must be unique. |
| exsid | Unique identifier used by the external maint system. Any text, 40 Char max. Must be unique. |
| location | Location name this asset is assigned to. Must be a valid location name. |
| type | Asset type label. Note: clients may request version 1 protocol, in which case the type will default to Standard. |
| Optional Information | |
| name | License tag number. Any text, 20 character max. |
| logvers | logvers can be used to change the output, acceptable values are:
logvers=1 is assumed.
|
| vin | VIN number Any text, 40 char max Must be unique. |
| inservice | The asset inservice date. Unix epoch timestamp. (UTC) |
| tagid | Zonar RFID tag number. Integer, the tagid type combination must be unique if supplied. |
| mfg | Asset manufacturer. |
| mileoffset | Offset to be applied to mileage readings obtained from RFID equipped hubometers in inspections for this asset. |
| engine_hour_offset | The asset engine_hour_offest is derived by taking the difference between the asset's chronometer and the GPS unit's chronometer. Most often, the GPS unit's chronometer will be 0, but this needs to be verified. The gps zones reported in the engine hour are restricted to the last know location of the asset before or at power-off. |
| radioaddress | Address used by wireless data link for hand held download stations. |
| subtype | Label of the subtype for the new asset. |
| status | This gives the option to set an asset to active 1 or inactive 2. If no type is set then the default is active. |
| homeloi | Name of the home LOI* for this asset. Must be a valid LOI name. |
Returned information:
A success or error message.
Example Request:
http://development.zonarsystems.net/interface.php?action=adminassets&operation=add&format=xml&name=POE3134&vin=12345678989&fleet=FLT1234&exsid=7654&location=Portland&type=Standard
logvers=2 DTD
<!ELEMENT success (action, asset_id)>
<!ATTLIST success ver CDATA #REQUIRED>
<!ELEMENT action (#PCDATA) #REQUIRED>
<!ELEMENT asset_id (#PDCDATA) #REQUIRED>
Example Success Reply,
Example Error Reply
*LOI means Location of Interest; called "Zone" in GPS tools and reports in Ground Traffic Control web application.