Skip to main content
Omnitracs Knowledge Base

Rename Vehicle

 

renameVehicle

Rename an existing vehicle given identifier of the existing vehicle and an identifier to which the vehicle will be renamed. Also accepts a boolean indicating whether to migrate position history data to the new identifier.

void renameVehicle(AssetIdentifier vehicle, AssetIdentifier newVehicle, boolean bHistory) throws WSException

  • vehicle: A QTWebServices AssetIdentifier containing attributes that uniquely identify the vehicle to be renamed:
  • newVehicle: A QTWebServices AssetIdentifier containing attributes that define the new vehicle identifier.
  • bHistory: A boolean indicating whether to migrate the history records for this vehicle to the new vehicle identifier. Setting this value to false will cause the history records to be disconnected from the vehicle. They will remain in the database under the old vehicle identifier. Setting this value to true will cause the history records to be transferred to the new vehicle identifier.
    (warning) NOTICE: as of the April 2013 release, bHistory will be ignored and historical data (positions and messages) will always remain attached to the newly renamed vehicle.

 

Authorization Requirements

 

The credentials supplied with this method call (as specified in the accompanying WS-Security header) must be authorized to the following application(s) and their associated role-based permissions.

Required Application Licenses
- Remote Integration

Required User Permissions
- Can use QTRACS
- Can set up vehicles
- Can see data for all assets OR the vehicle must be in the user's coverage or global group

Customer integrators are authorized to their own company's data only. 

 

Sample XML Request

 

Only the SOAP body is shown. To see a sample SOAP Envelope and Header, click here.

<soap:Body>

    <renameVehicle>

        <vehicle>

            <id>EON01</id>

            <scac></scac>

        </vehicle>

        <newVehicle>

            <id>AMW0001</id>

            <scac></scac>

        </newVehicle>

        <bHistory>true</bHistory>

    </renameVehicle>

</soap:Body>

 

Sample XML Response

 

An empty response conveys success. If there was an error, an exception would have been thrown.

<soapenv:Body>

    <renameVehicleResponse/>

</soapenv:Body>

 

Exceptions

 

002 Required field not specified.
003 Company not authorized for access through integration.
004 User is not authorized.
005 SCAC is required.
006 SCAC is invalid.
007 Vehicle ID is required.
008 Vehicle ID is invalid.
009 First character in Vehicle ID cannot be an asterisk.
010 Vehicle ID cannot be the ID of the NMC.
011 Vehicle identifier is already in use.
012 Vehicle identifier is already in use as a user identifier.
013 Vehicle identifier is already in use as an address list identifier.
014 Vehicle identifier is already in use as an external application identifier.
015 Vehicle identifier is already in use as a message group identifier.
016 Vehicle identifier is already in use as an auxiliary account identifier.
017 Vehicle identifier is already in use as an auxiliary vehicle identifier.
018 Vehicle identifier is already in use as a driver identifier.
019 Vehicle not found.
020 Invalid value in convert vehicle history flag.
021 Rename failed, existing vehicle not found.
022 Rename failed, vehicle ID already in use.
023 Rename failed, existing and new vehicle IDs are the same.
024 RESERVED FOR FUTURE USE
025 RESERVED FOR FUTURE USE
026 Program error on rename.

  • Was this article helpful?