WS304 - Update route headers
WS304 - Our service for updating Route headers
This integration aims to update the header data of unfinished Routes
Authentication
- Calls will have transport-level authentication (Basic Authentication);
- Request
user/passwordfrom the account administrator.
Features
-
URL
<https://entregas-api.comprovei.com/v2/ws304> -
Method:
PATCHThis integration returns a protocol for monitoring - WS301
Parameters
Example
{
"routes" : [{
"route_number" : "Exemplo1",
"route_date" : "2019-11-11",
"numberplate" : "IJS1267",
"fields" : {
"vehicle_type_id" : 000,
"numberplate" : "IJV6161",
"route_number" : "Exemplo2",
"driver" : "Comprovei",
"driver_name" : "Motorista Comprovei de Exemplo",
"carrier_code" : "484848484848",
"carrier_name" : "Transportadora Teste"
}
}]
}
| Parameter | Type | Description |
|---|---|---|
| routes | JSON Array | Set of JSON. Must have at least one (1) JSON object with the fields from the Routes table (Required) |
Routes
| Parameter | Type | Description |
|---|---|---|
| route_number | Alphanumeric | Name given to the route in Comprovei (required) |
| route_date | Date | Route date in Comprovei (required) |
| numberplate | Alphanumeric | License plate number at Comprovei (required) |
| fields | JSON | Data that will be updated in the route header (required) |
Fields
| Parameter | Type | Description |
|---|---|---|
| route_number | Alphanumeric | (Optional) Name that will replace the one in Comprovai |
| numberplate | Alphanumeric | (Optional) License plate number that will replace the one on Comprovei |
| vehicle_type_id | Numeric | (Optional) Vehicle Identifier that will be replaced in Comprovei |
| driver | Alphanumeric | (Optional) Driver who will replace the one in Comprovei |
| driver_name | Alphanumeric | (Mandatory if the driver parameter exists) Driver's full name |
| carrier_name | Alphanumeric | (Optional) Name of the carrier that will make the replacement in Comprovei |
| carrier_code | Alphanumeric | (Mandatory if the carrier_name parameter exists) Code of the carrier that will make the replacement in Comprovei |
Important
All optional fields will be validated and in the case of fields there must be at least one value to be used filled in.
-
Success:
- Code: 202
Content:
{ "message" : "OK", "protocol" : "<protocol>" }
- Code: 202
Content:
-
Error:
- Code: 400
Content:
{ "message": "O campo {0} deve conter pelo menos 1 item" }{ "message" : "Houve um erro ao gerar o protocolo. Por favor, tente novamente mais tarde" }{ "message" : "Estado de rota invalido, essa rota já foi finalizada" }{ "message" : "Todas as requisições apresentaram erro" }{ "message" : "Nenhum item de processamento foi encontrado no protocolo '{0}' com ação '{1}' para a requisição '{2}" }{ "message" : "Nenhuma rota '{0}' com data '{1}' e placa '{2}' está disponível para edição de cabeçalho de rota" }{ "message" : "Foram encontradas 0 rotas com código '{1}' na data '{2}' e número de placa '{3}" }{ "message" : "O usuário de motorista não está com cadastro automático ativo" }{ "message" : "Erro ao atualizar" }{ "message" : "Um erro desconhecido aconteceu" }
- Code: 400
Content:
-
Code: 403 Content:
{ "message": "Você não possui permissão para chamar o serviço" }