Skip to main content
Omnitracs Knowledge Base

Scanning Messages Count Details

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

  • In-Cab Scanning
  • Remote Integration

The user must also have been granted the In-Cab Scanning capability 'Can dequeue scanned documents' on the Customer portal.

Calling Interface

 

GetMessagesCountResponse getMessagesCount (GetMessagesCountRequest messages) throws WSException
 

  • messages: The GetMessagesCountRequest encapsulates the information required to get a count of Scanning generated scan data.
     
  • returns GetMessagesCountResponse;

 

 

 

 

 

 

GetMessagesCountRequest

 

Element

 

 

Type 

 

 

Description

 

 

Required

 

ReadState

OutgoingReadStatesType (string)

Needed to tell what Message state to use: Unread, Read, Failed for this lookup. If it is not provided, will return messages of any state.

No

Routing

RoutingType

Contains the information about how the message was routed.

Yes

FromKey

string

Provide a way to return messages received after this message

No

StartDate

dateTime

Optional beginning time boundary  

No

EndDate

dateTime

Optional ending time boundary (inclusive)

No

 

Sample XML Requests

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

This sample asks for count of how many Unread messages for MyTruck123.

<soap:Body>

<ns:GetMessagesCountRequest>

  <ReadState>Unread</ReadState>

  <Routing>

    <Source>

      <Type>Vehicle</Type>

      <CustomerAssignedId>MyTruck123</CustomerAssignedId>

    </Source>

    <Service>

      <Primary>

        <Id>SCAN</Id>

      </Primary>

    </Service>

  </Routing>

</ns:GetMessagesCountRequest>

</soap:Body>

 

This sample asks how many Failed messages there are from a given dateTime

    <soapenv:Body>

      <ns:GetMessagesCountRequest>

         <ReadState>Failed</ReadState>

         <Routing>

            <Service>

               <Primary>

                  <Id>SCAN</Id>

               </Primary>

            </Service>

         </Routing>

         <StartDate>2013-05-20T21:37:57.711Z</StartDate>

      </ns:GetMessagesCountRequest>

   </soapenv:Body>

 GetMessagesCountResponseType

 

Element

 

 

Type 

 

 

Description

 

 

Required

 

MessageCount

int

A count of how many messages satisfy the request criteria

Yes


 

Sample XML Response

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

   <SOAP-ENV:Body>

      <msgEip:GetMessagesCountResponse xsi:schemaLocation="http://msg.data.eip.omnitracs.com/1.0 C:/views/integration/vordel-routing/latest/vordel-helper/vordel-external-api/src/main/resources/EIPMessage1.0.xsd" xmlns:msgEip="http://msg.data.eip.omnitracs.com/1.0" xmlns:baseEip="http://base.data.eip.omnitracs.com/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

         <MessageCount>0</MessageCount>

      </msgEip:GetMessagesCountResponse>

   </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Exceptions

0000 - There was a problem with the request, either the XML was invalid, or no soap operation was found.

0001 - Too many web service calls too quickly. Make the request later.

0002 - An Internal Error Occurred when trying to process the request. Please try again later.

0003 - Authentication Failed. Check the user credentials

0004 - Not Authorized (No Authorized Apps found)

0005 - WSSE Header Block missing or invalid

0006 - WSSE Header Username token is missing or invalid

1000 - No Data Found. Was not able to locate a required resource

1001 - Invalid Input, Something missing or incorrect in the request. Exception will indicate what the problem was.

1002 - Internal Error, some unknown error occurred. Retry later or call customer service.

1003 - Not authorized. Not authorized to use this service. Check the User Roles on the customer portal

  • Was this article helpful?