Skip to content

WS305 - Update route sequence

WS305 - Our service for changing the sequence of documents on the Route

This integration aims to change the sequence of documents in the route.

Authentication

  • Calls will have transport-level authentication (Basic Authentication);
  • Request user / password from the account administrator.

Features

  • URL

    <https://entregas-api.comprovei.com/v2/ws305>

  • Method:

    PATCH

    This integration returns a protocol

Parameters

Example

{
    "routes" : [{      
       "route_number" : "route-1648845123931",    
       "route_date" : "2023-05-06",    
       "numberplate" : "IJS1267",
       "new_stops_sequence" : ["31220347960950011166550020001602861056398510","2022032109422220220321731675590200"]
    }]
}
Parameter Type Description
routes JSON Array Set of JSON. Must have only 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)
new_stops_sequence String array Keys to the route documents in the order they should be (mandatory)
  • Success:

    • Code: 202
      Content:
      {
          "message" : "OK",
          "protocol" : "<protocol>"
      }
      
  • Error:

    • Code: 400
      Content:
      {
          "message": "O campo {0} deve conter 1 item"
      }
      
      {
          "message" : "Houve um erro ao gerar o protocolo. Por favor, tente novamente mais tarde" 
      }
      
      {
          "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 reordenar." 
      }
      
      { 
          "message" : "Foram encontradas {0} rotas com código '{1}' na data '{2}' e placa '{3}'." 
      }
      
      { 
          "message" : "A rota possui mais chaves do que as informadas na nova sequência. Chaves faltantes: '{0}'" 
      }
      
      { 
          "message" : "As chaves '{0}' não pertencem a esta rota." 
      }
      
      { 
          "message" : "A nova sequência enviada é igual à atual da rota." 
      }
      
      { 
          "message" : "Erro ao atualizar" 
      }
      
      { 
          "message" : "Um erro desconhecido aconteceu" 
      }
      
  • Code: 401
    Content:

        "Unauthorized"
    

  • Code: 403
    Content:

    {
        "message": "Você não possui permissão para chamar o serviço"
    }