Skip to main content
Omnitracs Knowledge Base

Vehicle->UpdateVehicle

UpdateVehicle (Vehicle Function)

This function updates a single existing vehicle record within the HOS database. It is similar to the Update method but it also allows setting the PlateNumber field.

XML Request

The original vehicle information is provided in the <ov> block while the new vehicle information is provided in the <vd> block. The Update function takes the following request parameters:

Parameter Type Description Notes
MCT Integer The MCT number assigned to the tractor.  
Alias String String representing a name for the tractor. If the tag is omitted, no change. If the tag is specified but is empty, the previous value will be removed *
DepotId Short Depot of the tractor.  
TractorId String Unique identifier for this tractor. Though not strictly required, this needs to be populated to prevent ambiguity if a tractorID has been edited
VIN String Vehicle Identification Number (must be 17 characters), optional field If the tag is omitted, no change. If the tag is specified but is empty, the previous value will be removed *
VehicleGroup String Group the tractor belongs to; if more than one, provide each string on a new line within the <VehicleGroup> tag. If the tag is omitted, no change. If the tag is specified but is empty, the previous value will be removed *
message String String used in XML request to uniquely identify XML response (HOS Web Services United States only).  
PlateNumber String Vehicle plate number that may include authority. If the tag is omitted, no change. If the tag is specified but is empty, the previous value will be removed *
ELDMode Enum Desired operating mode of the mobile device on the vehicle; Possible Values: "ELD_Mode", "AOBRD_Mode", or null
A null value will leave this setting unchanged.
 

Required fields are

  
<ov>  
    <MCT>int</MCT>  
    <Alias>string</Alias>  
</ov>  
<vd>  
    <MCT>int</MCT>  
</vd>  
  • If only a required field is specified
    • DepotId is defaulted to MCT
    • Alias is set to NULL
  
<?xml version="1.0" encoding="utf-8"?>  
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">  
  <soap:Body>  
    <UpdateVehicle xmlns="http://www.qualcomm.com">  
      <ov>  
        <MCT>int</MCT>  
        <Alias>string</Alias>  
        <DepotId>short</DepotId>  
        <TractorId>string</TractorId>  
        <VIN>string</VIN>  
        <VehicleGroup>  
          <string>string</string>  
          <string>string</string>  
        </VehicleGroup>  
        <PlateNumber>string</PlateNumber>  
        <ELDMode>AOBRD_Mode or ELD_Mode</ELDMode>  
      </ov>  
      <vd>  
        <MCT>int</MCT>  
        <Alias>string</Alias>  
        <DepotId>short</DepotId>  
        <TractorId>string</TractorId>  
        <VIN>string</VIN>  
        <VehicleGroup>  
          <string>string</string>  
          <string>string</string>  
        </VehicleGroup>  
        <PlateNumber>string</PlateNumber>  
        <ELDMode>AOBRD_Mode or ELD_Mode</ELDMode>  
      </vd>  
    </UpdateVehicle>  
  </soap:Body>  
</soap:Envelope>  

XML Response

The return result indicates success or failure via SOAP exceptions.

  
<?xml version="1.0" encoding="utf-8"?>  
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">  
  <soap:Body>  
    <UpdateVehicleResponse xmlns="http://www.qualcomm.com" />  
  </soap:Body>  
</soap:Envelope>  
  • Was this article helpful?