13. Expired Assets Report

Use this request to create a report of assets with expirys that have or are about to expire.
Note: This action was added to protocol version 1.01.

14.1 Request Data

Important: This action has changed in version 2. When requesting a specific asset using either the tag or fleet request types the asset type must also be specified. Version 1.x requests will assume a type of Standard (0) in these situations.

Required Information
Name Description
action showexpire
operation asset
format xml
rpttype The type of report to create.
Acceptable values:
  • date Return assets with time based expirys that will expire within the specified day threshold. If no threshold is specified, a threshold of 0 will be assumed.
  • valueReturn assets with value (mileage) based expirys that will expire within the specified value threshold. If no threshold is specified, a threshold of 0 will be assumed.
  • assetdate Return a list of time based expirys for the specified asset. A target asset must be specified. Threshold is ignored.
  • assetvalue Return a list of value (mileage) based expirys for the specified asset. A target asset must be specified. Threshold is ignored.
Optional Information
location Location to filter with. Text. If provided only assets assigned to that location will be returned. If location is not supplied or an empty location is specified, assets from all locations will be returned. Must be a valid location name.
threshold If a date or value rpttype is specified this may be provided. Integer, represents either either the remaining days for a time based expire or the remaining value units for value based expires.
When using threshold with rpttype value assets with expiry value equal to or below the threshold will be returned.
target Must be supplied if a rpttype of assetdate or assetvalue is specified. Represents the specific asset to report on.
reqtype Flag to identify the key being used to query. Acceptable values:
  • tag Key is a Zonar RFID tag number. In version 2 a type must also be specified.
  • exsid Key is the external system id.
  • vin Key is the Vehicle Identification Number (VIN).
  • dbid Key is the internal id number. This is the most reliable key to use.
  • fleet Key is the asset fleet number. In version 2 a type must also be specified.
type When using reqtype of tag or fleet this must also be specified in version 2. In version 1.x type Standard (0) is assumed.
expdatetype Create a report only for a specific expiry type. Must be a valid expiry type.
Note:This parameter is only used in conjunction with rpttype=value or rpttype=date

Data Returned

Returned information:
A list of assets with expiry information. DTD:
<!ELEMENT assetexpirelist (assetexpire*)>
<!ATTLIST assetexpirelist ver CDATA #REQUIRED>
<!ELEMENT assetexpire (name, vin, fleet,location, expire)>
<!ATTLIST assetexpire dbid CDATA #REQUIRED>
<!ELEMENT name (#PCDATA)>
<!ELEMENT vin (#PCDATA)>
<!ELEMENT fleet (#PCDATA)>
<!ELEMENT location (#PCDATA)>
<!ELEMENT tag (#PCDATA)>
<!ELEMENT expire (label, exp, remaining, currval*)>
<!ATTLIST expire exptype (date|value) #REQUIRED>
<!ELEMENT label (#PCDATA)>
<!ELEMENT exp (#PCDATA)>
<!ELEMENT remaining (#PCDATA)>
<!ELEMENT currval (#PCDATA)>

The dbid attribute is the database id number of the asset. In protocol version 1.07 the tag element was added to provide the assets's Zonar RFID tag number.
Time based expirys will not have a currval element as the current value is the time the request was made. Value based expirys will include this element as the currently reported value for the asset in question.

Example Request:
Return all assets with time based expirys that will occur within 10 days.
http://development.zonarsystems.net/interface.php?action=showexpire&operation=asset&format=xml&rpttype=date&threshold=10

Example Success Reply

Example Request:
Return all assets with value based expirys that will occur within 300 units.
http://development.zonarsystems.net/interface.php?action=showexpire&operation=asset&format=xml&rpttype=value&threshold=300


Example Success Reply