CoPilot Messages Details
Allows a client to retrieve CoPilot messages. At most 50 messages may be read at a time.
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
- CoPilot
- Remote Integration
The user must also have been granted the CoPilot capability 'Can dequeue CoPilot messages' on the Customer portal.
Calling Interface
GetMessagesResponse getMessages (GetMessagesRequest messages) throws WSException
- messages: The GetMessagesRequest encapsulates the information required to lookup CoPilot generated messages. Please note that only a maximum of 50 messages can be returned for a request.
- returns GetMessagesResponse
- Messages are returned with higher priority message first, unless FromKey is used, in which case they are returned oldest message first.
GetMessagesRequest
Element
|
XSD Type
|
Description
|
Required
|
---|---|---|---|
ReadState |
OutgoingReadStatesType (string) |
Needed to tell what Message state to use: Unread or Read for this lookup. If it is not provided, will return messages of any state. This can be used along with FromKey to traverse through all Unread messages sequentially. |
No |
Routing |
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 |
AutoAck |
boolean |
If all the messages return should be marked as acknowledged at the time they are read. |
Yes |
MaxMessages |
int |
Maximum number of messages to return (if none specified will return all). For CoPilot set this to a value of 50 or less. |
Yes |
MessageAck |
Tells the platform to ack/nack a previously read platform message. Allows the customer to add specific information if needed (see above) |
No |
Sample XML Requests
Only the SOAP body is shown. To see a sample SOAP Envelope and Header, click here.
This sample asks for a maximum of 50 Unread messages for MyTruck123 and it also tells the system to automatically mark all return messages as Read.
|
This sample asks for a maximum of 50 Read messages, between two dates. AutoAck is set to false, since messages have already been Read.
|
Asks for 25 messages starting for a specific Key it also tells the system to automatically mark all return messages as Read.
|
GetMessageResponseType
Element
|
Type
|
Description
|
Required
|
---|---|---|---|
Message |
MessageType |
List of Messages. Empty if none are found. |
Yes |
MessageType
Element
|
Type
|
Description
|
Required
|
---|---|---|---|
Id |
Contains the unique keys for this message for both customer and platform |
Yes |
|
Routing |
Contains the information about how the message was routed |
Yes |
|
Payload |
Container for actual payload in the message |
Yes |
|
AuditHistory |
Any additional information about the creation and changes to the message |
Yes |
|
Created |
dateTime |
Message creation time |
No |
Routing (RoutingType)
Element
|
Type
|
Description
|
Required
|
---|---|---|---|
Priority |
PriorityType |
Denotes the level of priority (Emergency = 6, High = 5, Medium = 3, Low = 0) used in the delivery of the message |
No |
Destination |
Reference for the recipient of the message (typically this would be Vehicle) |
No |
|
Service |
Qualifies what service (typically an application) handled this message in the platform |
Yes |
Sample XML Response
Audit History shows the various ways the message was delivered and the state changes it went through.
|
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