WS106 - Receive Finalized Routes
Objective
Receive all routes that have been completed. Once consulted, these routes will not be made available again in a future query.
Method description
Método |
getCompletedRoutes |
WSDL |
https://soap.comprovei.com.br/exportQueue/index.php?wsdl |
Important
- Our connections are secure using the SSL protocol. For security reasons, our certificates are constantly changed without prior notice. Therefore, it is recommended that you do not develop integrations based on a fixed certificate.
- We constantly (and without prior notice) add new fields and structures to both requests and responses from our web services. Anyone who uses our webservices must implement it in such a way that the programs that consume these webservices do not stop working when the mentioned field changes occur.
Features
- Calls will be made via
SOAPover HTTPS; - The origin of the
Web Servicecall will be the client's system;
Authentication
- Calls will have transport-level authentication (Basic Authentication);
- Request
user/passwordfrom the account administrator.
Example HTTP header with authentication
POST https://soap.comprovei.com.br/exportQueue/index.php HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "urn:WebServiceComprovei#getCompletedRoutes"
Authorization: Basic BASE64(user:password)
Content-Length: {quantidade de bytes enviados}
Host: soap.comprovei.com.br
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Request
The request for our Web Service is composed as follows:
| TAG | Type | Description |
|---|---|---|
QtdRotas |
integer | Maximum number of routes that will be returned by the query. |
Request Example
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:WebServiceComprovei">
<soapenv:Header/>
<soapenv:Body>
<urn:getCompletedRoutes soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<QtdRotas xsi:type="xsd:integer">2</QtdRotas>
</urn:getCompletedRoutes>
</soapenv:Body>
</soapenv:Envelope>
Response
Our Web Service responds to you as follows:
| TAG | Type | Description |
|---|---|---|
CodigoRetorno |
integer | Return message code (see table of Return codes). |
MensagemRetorno |
string | Return message (see table of Return codes). |
Rotas |
element | Contains the set of finalized routes and is composed of Route elements. |
Route
Contains all route information, if any is found.
| TAG | Type | Description |
|---|---|---|
Data |
string | Route date in the format: YYYY-MM-DD. |
Nome |
string | Route name. |
Numero |
string | Route number. |
CodigoMotorista |
string | Driver code associated with the route. |
Placa |
string | License plate associated with the route. |
CodigoStatus |
integer | iInteger code that represents the status of the route. |
Status |
string | Route status name. |
DistanciaPercorrida |
string | Distance traveled by the driver in meters. |
DistanciaPrevista |
string | Expected distance for the route in meters. |
SomaPesosDocumentos |
decimal | Total weight of route documents. |
Localizacao |
element | Contains the driver's last captured latitude and longitude. See Location. |
DataHoraInicio |
string | Route start date and time. Format: YYYY-MM-DD HH:MM:SS. |
DataHoraFim |
string | Route completion date and time. Format: YYYY-MM-DD HH:MM:SS. |
Location
Contains the driver's last captured latitude and longitude.
| TAG | Type | Description |
|---|---|---|
Latitude |
Decimal | Latitude position in decimal format. |
Longitude |
Decimal | Longitude position in decimal format. |
Return codes
Contains the list of all possible method return codes and messages.
| Code | Description |
|---|---|
0 |
No routes to return. |
1 |
N route(s) completed. |
998 |
Input parameter was not filled. |
999 |
Unauthenticated user. |
Response Examples
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:WebServiceComprovei" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:getCompletedRoutesResponse>
<CodigoRetorno xsi:type="xsd:integer">999</CodigoRetorno>
<MensagemRetorno xsi:type="xsd:string">Usuário não autenticado!</MensagemRetorno>
<Rotas xsi:nil="true" xsi:type="Rotas"/>
</ns1:getCompletedRoutesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:WebServiceComprovei" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:getCompletedRoutesResponse>
<CodigoRetorno xsi:type="xsd:integer">1</CodigoRetorno>
<MensagemRetorno xsi:type="xsd:string">2 rota(s) finalizadas(s).</MensagemRetorno>
<Rotas xsi:type="Rotas">
<Rota xsi:type="Rota">
<Data xsi:type="xsd:string">2017-08-04</Data>
<Nome xsi:type="xsd:string">LI:SP-Limeira-Campinas</Nome>
<Numero xsi:type="xsd:string">0002399459</Numero>
<CodigoMotorista xsi:type="xsd:string">12622266782</CodigoMotorista>
<Placa xsi:type="xsd:string">NKX4738</Placa>
<CodigoStatus xsi:type="xsd:int">6</CodigoStatus>
<Status xsi:type="xsd:string">Base</Status>
<DistanciaPercorrida xsi:type="xsd:string">5023</DistanciaPercorrida>
<DistanciaPrevista></DistanciaPrevista>
<SomaPesosDocumentos></SomaPesosDocumentos>
<Localizacao xsi:type="Localizacao">
<Latitude xsi:type="xsd:string">-22.4219137</Latitude>
<Longitude xsi:type="xsd:string">-45.4597297</Longitude>
</Localizacao>
<DataHoraInicio xsi:type="xsd:string">2017-08-24 15:22:40</DataHoraInicio>
<DataHoraFim xsi:type="xsd:string">2017-08-24 15:24:08</DataHoraFim>
</Rota>
<Rota xsi:type="Rota">
<Data xsi:type="xsd:string">2017-08-04</Data>
<Nome xsi:nil="true"/>
<Numero xsi:type="xsd:string">12/1/9999</Numero>
<CodigoMotorista xsi:type="xsd:string">0017</CodigoMotorista>
<Placa xsi:type="xsd:string">EIJ9079</Placa>
<CodigoStatus xsi:type="xsd:int">6</CodigoStatus>
<Status xsi:type="xsd:string">Base</Status>
<DistanciaPercorrida xsi:type="xsd:string">2301</DistanciaPercorrida>
<Localizacao xsi:type="Localizacao">
<Latitude xsi:type="xsd:string">-22.4219504</Latitude>
<Longitude xsi:type="xsd:string">-45.4597297</Longitude>
</Localizacao>
<DataHoraInicio xsi:type="xsd:string">2017-08-07 15:27:03</DataHoraInicio>
<DataHoraFim xsi:type="xsd:string">2017-08-07 15:32:40</DataHoraFim>
</Rota>
</Rotas>
</ns1:getCompletedRoutesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>