WS014 - Register Users at Comprovei
Objective
This integration aims to allow the registration of one or more users on Comprovei©.
Method description
Método |
uploadUsers |
WSDL principal |
https://soap.comprovei.com.br/importQueue/index.php?wsdl |
WSDL de contingencia |
https://soapcontingencia.comprovei.com.br/importQueue/index.php?wsdl |
XSD |
https://soap.comprovei.com.br/importQueue/schemas/uploadUsers.xsd |
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.
- 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;
Important
The user of this Web Service must store the protocol generated in the response.
Support tickets regarding this integration will require this protocol.
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/importQueue/index.php HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "urn:WebServiceComprovei#uploadUsers"
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 |
|---|---|---|
conteudoArquivo |
string | XML file content encoded in Base64. See section 'Our User XML'. |
nomeArquivo |
string | Name of the sent file, with the extension. Example: users.xml |
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:uploadUsers soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<conteudoArquivo xsi:type="xsd:string">PFVzdWFyaW9zPgogICAgPFVzdWFyaW8+CiAgICAgICAgPEhhYmlsaXRhcj4wPC9IYWJpbGl0YXI+CiAgICAgICAgPExvZ2luPjEyMzQ1Njc4OTAxPC9Mb2dpbj4KICAgICAgICA8U2VuaGE+MTIzNDwvU2VuaGE+CiAgICAgICAgPEVtYWlsPjwvRW1haWw+CiAgICAgICAgPFRpcG9Vc3VhcmlvPjI8L1RpcG9Vc3VhcmlvPgogICAgICAgIDxOb21lQ29tcGxldG8+Tm9tZUNvbXBsZXRvRG9Nb3RvcmlzdGE8L05vbWVDb21wbGV0bz4KICAgICAgICA8VGVsZWZvbmU+MFhYMTIzNDU2Nzg5PC9UZWxlZm9uZT4KICAgICAgICA8TnVtQ05IPk51bWVyb0NOSE1vdG9yaXN0YTwvTnVtQ05IPgogICAgICAgIDxWZW5jdG9DTkg+MjAxOS0wMS0wNzwvVmVuY3RvQ05IPgogICAgICAgIDxSZWdpb2VzPlJlZ2lvZXNTZXBhcmFkYXNQb3JWaXJndWxhPC9SZWdpb2VzPgogICAgICAgIDxUcmFuc3BvcnRhZG9yYXM+Q05QSnNTZXBhcmFkb3NQb3JWaXJndWxhPC9UcmFuc3BvcnRhZG9yYXM+CiAgICAgICAgPEVtYmFyY2Fkb3Jlcz5DTlBKc1NlcGFyYWRvc1BvclZpcmd1bGE8L0VtYmFyY2Fkb3Jlcz4KICAgIDwvVXN1YXJpbz4KPC9Vc3Vhcmlvcz4=</conteudoArquivo>
<nomeArquivo xsi:type="xsd:string">usuarios.xml</nomeArquivo>
</urn:uploadUsers>
</soapenv:Body>
</soapenv: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 import request. |
Protocol
When a file is accepted into our system, a protocol is generated so that the import process can be monitored. This can be done using the WS501 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:uploadUsersResponse>
<status xsi:type="xsd:string">Arquivo adicionado para a fila de importação!</status>
<protocolo xsi:type="xsd:string">2017022258add9af06990</protocolo>
</ns1:uploadUsersResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Our Users XML
Our XML for registering users is composed of the following TAGs:
| TAG | Type | Required | Description |
|---|---|---|---|
Usuarios |
root | Yes | The xml root is composed of one or more User. |
User
| TAG | Type | Required | Description |
|---|---|---|---|
Habilitar |
integer | Yes | Indicates whether the user will be enabled, if there is a license to do so. |
Login |
string | Yes | User login to use in the system. |
Senha |
string | Yes | User password to use in the system. |
Email |
string | No | User email. |
TipoUsuario |
integer | Yes | Type of user to be registered (See table Type of User). |
NomeCompleto |
string | Yes | User's full name. |
Telefone |
string | No | User's telephone number. |
NumCNH |
string | No | User's driver's license number (driver only). |
VenctoCNH |
string | No | Expiration date of the user's driver's license (driver only). Format: YYYY-MM-DD. |
Regioes |
string | No | Region name for automatic filtering in the Console. More than one region can be sent, separated by a comma. |
Transportadoras |
string | * | Carrier CNPJ for filter on the console. More than one CNPJ can be sent, separated by a comma. |
Embarcadores |
string | * | Shipper's CNPJ for filtering in the console. More than one CNPJ can be sent, separated by a comma. |
AutenticacaoDoisFatores |
string | No | Type of authentication to be used at login (Does not apply to drivers) |
CPF |
string | No | User CPF, used for identification and validation (mainly for drivers). |
*
If the user to be registered is of the Transporter or Shipper type, it is necessary to send the CNPJ(s) of the transporter or shipper to which he belongs.
Two-factor authentication
| Code | Description |
|---|---|
Vazio* |
None |
Email |
Receive authentication code by email |
*
Send the tag blank if you do not want two-factor authentication.
User Types
| Code | Description |
|---|---|
2 |
Driver user. |
3 |
Desktop user. |
5 |
Supervisor user. |
11 |
Conveyor user. |
12 |
Shipper user. |
Complete example structure
Click here to see the example
<?xml version="1.0" encoding="utf-8"?>
<Usuarios>
<Usuario>
<Habilitar>1</Habilitar>
<Login>12345678901</Login>
<Senha>1234</Senha>
<Email></Email>
<TipoUsuario>2</TipoUsuario>
<NomeCompleto>NomeCompletoDoMotorista</NomeCompleto>
<Telefone>0XX123456789</Telefone>
<NumCNH>NumeroCNHMotorista</NumCNH>
<VenctoCNH>2019-01-07</VenctoCNH>
<Regioes>RegioesSeparadasPorVirgula</Regioes>
<Transportadoras>CNPJsSeparadosPorVirgula</Transportadoras>
<Embarcadores>CNPJsSeparadosPorVirgula</Embarcadores>
<AutenticacaoDoisFatores></AutenticacaoDoisFatores>
</Usuario>
</Usuarios>