WS116 - AWBs notes download service
Click here to see version history
| Update date | Service publication date | Changes |
|---|---|---|
| 02/09/2021 | 02/15/2021 | Creation of the webservice |
| 03/18/2021 | 03/26/2021 | Return service correction |
Objective
This integration aims to export the AWBs imported into Comprovei. Each call will only return AWBs that had not yet been returned in previous calls.
Warning
This is documentation of a beta service that is subject to field and url changes before its final publication.
Method description
Método |
downloadDocumentsAWBs |
Versão |
2 |
WSDL Principal |
https://soap.comprovei.com.br/exportQueue/v2/index.php?wsdl |
WSDL de Contingência |
https://soapcontingencia.comprovei.com.br/exportQueue/v2/index.php?wsdl |
Important
- The connection to our service must be made to our main server, however we strongly suggest that a connection to our contingency server is also made available, as a guarantee of the availability of our services. The contingency server is only turned on in situations where our main server is unavailable. Making the connection url parameterizable is also a good practice;
- 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.
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.
Request
The request for our Web Service is composed as follows:
Header
Within the <Credentials> TAG:
| TAG | Type | Description |
|---|---|---|
Usuario |
string | User for authentication. |
Senha |
string | User password for authentication |
Body
Within the <downloadDocumentsAWBs> TAG:
| TAG | Type | Description |
|---|---|---|
| cnpjEmissorNFe | string | NF-e Issuer's Cnpj - only digits and with leading zeros. |
| qtyAWBs | integer | Maximum number of AWbs that will be consulted. * The maximum number will be 2000. |
Request Example
<Envelope xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<Header>
<Credenciais xmlns="WebServiceComprovei">
<Usuario>usuario</Usuario>
<Senha>senha</Senha>
</Credenciais>
</Header>
<Body>
<urn:downloadDocumentsAWBs soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<cnpjEmissorNFe xsi:type="xsd:string">01234567890123</cnpjEmissorNFe>
<qtdAWBs xsi:type="xsd:integer">1000</qtdAWBs>
</urn:downloadDocumentsAWBs>
</Body>
</Envelope>
Response
Our Web Service responds to you as follows:
| TAG | Type | Description |
|---|---|---|
status |
string | Success or error message for the method call. |
protocolo |
string | Protocol for checking the progress of the export request. |
Protocol
When an export order is created in our system, a protocol is generated so that this process can be monitored. This can be done using the WS502 method.
Response Example
<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:downloadDocumentsAWBs>
<status xsi:type="xsd:string">Exportação adicionada a fila com sucesso. Acompanhe o processamento utilizando o protocolo fornecido!</status>
<protocolo xsi:type="xsd:string">20170823599de095e8249</protocolo>
</ns1:downloadDocumentsAWBs>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
What is generated in this export
Using the protocol generated in method WS502, the user will receive a URL to access the XML file containing all occurrences available in the system at the time of execution, respecting the maximum quantity requested. This XML file is composed as follows:
| TAG | Type | Required | Description |
|---|---|---|---|
| AWBs | root | Yes | Root of the xml and composed of a list of AWBs. |
AWB
| TAG | Type | Description |
|---|---|---|
Number |
string | AWB number. |
CTe |
string | CT-e number |
CTeKey |
string | CT-e key |
NFes |
element | Root element for the list of NF-es that make up the AWB. |
NFe
| TAG | Type | Description |
|---|---|---|
| Key | string | NF-e Key |
Example of the generated XML file
<AWBs>
<AWB>
<Numero>Exemplo AWB</Numero>
<CTe>Exemplo CTe</CTe>
<ChaveCTe>01234567890123456789012345678901234567890123</ChaveCTe>
<NFes>
<NFe>
<Chave>01234567890123456789012345678901234567890123</Chave>
</NFe>
<NFe>
<Chave>01234567890123456789012345678901234567890123</Chave>
</NFe>
</NFes>
</AWB>
<AWB>
<Numero>Exemplo AWB 2</Numero>
<CTe>Exemplo CTe 2</CTe>
<ChaveCTe>01234567890123456789012345678901234567890123</ChaveCTe>
<NFes>
<NFe>
<Chave>01234567890123456789012345678901234567890123</Chave>
</NFe>
<NFe>
<Chave>01234567890123456789012345678901234567890123</Chave>
</NFe>
</NFes>
</AWB>
</AWBs>