Skip to main content
Omnitracs Knowledge Base

Modify Delivery

modifyDelivery

Modifies an existing delivery. The validation rules and workflow is similar to creation of a new delivery request.
The client is required to send the delivery Id and all other elements required for creating a new Delivery except for the filename.

If a user chooses to modify the delivery, they can add or remove vehicles, add or remove groups, change the delivery meta-data and delivery options.
The delivery's file cannot changed, and it is an error to provide a filename to this method.
When the call is made, the delivery is modified and the changes are pushed out to the vehicles.

sendImmediate is ignored for modifyDelivery. If an unsent delivery is modified, the client must call sendDelivery to initiate the delivery.

 

ModifyDeliveryResponse modifyDelivery(ModifyDeliveryRequest request)

Elements of ModifyDeliveryRequest:

  • deliveryId: The delivery Id to modify. Returned from createDelivery.
  • vehicleIds: Zero or more vehicles to send the file to. At least one vehicleId or groupName is required.
  • groupNames: Zero or more groups to send the file to. At least one vehicleId or groupName is required.
  • sender: who is sending the file. Required.
  • subject: The subject of the delivery. Required.
  • deliveryOption: One of WIFI, TERR or SCHEDULE
    • WIFI: Delivery will only be delivered when WiFi is available
    • TERR: Delivery will be delivered by any means possible.
    • SCHEDULE: Delivery will be delivered according to a schedule. Try Wifi for some interval, then deliver via any means possible.
  • deliverySchedule: The period of time to wait before trying to deliver via terrestrial. Required when deliveryOption = SCHEDULE
    • interval: The number of units to wait.
    • units: Which units to specify the interval. One of: MINUTES, HOURS, DAYS
  • expireDateTime: If specified, when the file should be removed from the vehicles.
  • availableDateTime: If specified, when the file should be visible to the end user. The file is still sent immediately, it will not be visible until the specified time. If not specified, the file will be available as soon as it is delivered.
  • description: An optional description of the delivery.

 

Sample XML Request

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


<SOAP-ENV:Body>
  <ns2:modifyDeliveryRequest xmlns:ns2="http://www.qualcomm.com/mms">
    <ns2:id>2001</ns2:id>
    <ns2:vehicleIds>FakeMCP200001</ns2:vehicleIds>
    <ns2:vehicleIds>FakeMCP200002</ns2:vehicleIds>
    <ns2:sender>test sender2</ns2:sender>
    <ns2:subject>test banner2</ns2:subject>
    <ns2:deliveryOption>WIFI</ns2:deliveryOption>
    <ns2:expireDateTime>2011-10-01T18:17:46.474Z</ns2:expireDateTime>
    <ns2:availableDateTime>2011-09-30T18:17:46.469Z</ns2:availableDateTime>
    <ns2:description>test descr</ns2:description>
    <ns2:sendImmediately>false</ns2:sendImmediately>
    <ns2:groupNames>WEBTEST GROUP</ns2:groupNames>
    <ns2:groupNames>WEBTEST GROUP2</ns2:groupNames>
  </ns2:modifyDeliveryRequest>
</SOAP-ENV:Body>

 

Sample XML Response

The response will contain information about the delivery.

Success Response

<SOAP-ENV:Body>
  <ns2:modifyDeliveryResponse xmlns:ns2="http://www.qualcomm.com/mms">
    <ns2:deliveryId>2001</ns2:deliveryId>
    <ns2:deliveryStatuses>
      <ns2:statusType>SUCCESS</ns2:statusType>
      <ns2:code>mms.ws.modifydelivery.success</ns2:code>
      <ns2:reason/></ns2:deliveryStatuses>
    </ns2:modifyDeliveryResponse>
</SOAP-ENV:Body>

 

Sample Failed Response

<SOAP-ENV:Body>
  <ns2:modifyDeliveryResponse xmlns:ns2="http://www.qualcomm.com/mms">
    <ns2:deliveryId>-1</ns2:deliveryId>
    <ns2:deliveryStatuses>
      <ns2:statusType>ERROR</ns2:statusType>
      <ns2:code>error.reason.request.description.length</ns2:code>
      <ns2:reason>Description exceeds allowed characters limit of 255</ns2:reason>
    </ns2:deliveryStatuses>
    <ns2:deliveryStatuses>
      <ns2:statusType>ERROR</ns2:statusType>
      <ns2:code>error.reason.request.sender.length</ns2:code>
      <ns2:reason>Sender allowed characters limit of 80</ns2:reason>
    </ns2:deliveryStatuses>
    <ns2:deliveryStatuses>
      <ns2:statusType>ERROR</ns2:statusType>
      <ns2:code>error.reason.request.banner.length</ns2:code>
      <ns2:reason>Subject exceeds allowed characters limit of 10</ns2:reason>
    </ns2:deliveryStatuses>
  </ns2:modifyDeliveryResponse>
</SOAP-ENV:Body>

 

Sample Exception Response

<SOAP-ENV:Body>
  <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server</faultcode>
    <faultstring xml:lang="en">error.result.request - Unable to locate delivery</faultstring>
  </SOAP-ENV:Fault>
</SOAP-ENV:Body>

 

 

Error and Warning Messages :  

The following one or more error/warning messages will be sent in "DeliveryStatuses" element in the response body.
These are in additions to the common error messages described in main page.

Error Code

Description

Remarks

error.reason.request.in.progress

Delivery is in process.

Delivery is still being processed. Please try again later.

error.reason.request.description.length

Description exceeds allowed characters limit of 255

 

error.reason.request.sender.null

Sender is required.

 

error.reason.request.sender.length

Sender exceeds allowed characters limit of 80

 

error.reason.request.banner.null

Subject cannot be null

 

error.reason.request.banner.length

Subject exceeds allowed characters limit of 64

 

error.reason.request.vehicles.groups.bothempty

When both vehicleIds and group names are empty

You must provide at least one vehicle or group.

error.reason.request.filename.notallowed

Filename is not allowed when modifying delivery

 

error.reason.request.expiration.time.inpast

Expiration Time cannot be in the past.

 

error.reason.request.expiration.time.error

Expiration Time cannot be before Available Time.

 

warning.reason.groupnames.nomatchfound

These group names were not found: <comma delimited un-matched group names>

Success with warning: The groups that were found are associated in delivery.

warning.reason.devices.nomatchfound

These vehicles were not found: <comma delimited missing vehicle ids.>

Success with warning: The vehicles that were found are associated in delivery.

error.reason.novaliddevicesorgroupsfound

No matching groups or devices found.

Must have at least on valid group or vehicle. A valid group must exist and have at least one vehicle in it.

error.reason.request.deliveryoption.noschedule

No schedule provided for 'SCHEDULE' Delivery Option.

Client to provide Schedule ( interval and Unit) for this delivery option.

error.reason.request.unit.interval

Missing or invalid units or interval. Both unit and interval values are required for 'SCHEDULE' type Delivery Option.

 

error.reason.request.unit.invalid

Invalid delivery Unit option. Should be MINUTES, HOURS or DAYS.

 

error.reason.request.deliveryinterval.invalid

Delivery Interval cannot be less than 15 minutes.

 

error.reason.request.deliveryoption.invalid

Invalid or Missing Delivery option. Valid options are WIFI, TERR or SCHEDULE

 

 

 

  • Was this article helpful?