Trocar motorista da rota

Reatribui um motorista a uma rota existente. A rota precisa estar com status `CREATED` e o motorista já precisa estar associado à conta.

Conceito relacionado

Entenda o conceito no guia: Rota.

PATCH
/v1/routes/{route_id}/change-driver

Authorization

sellerGroupKey
x-abbiamo-seller-group-key<token>

In: header

Path Parameters

route_id*string

Identificador único da rota onde o motorista será atribuído. Obrigatório.

Header Parameters

x-abbiamo-seller-group-key*string

Chave de autenticação que identifica e autoriza a conta. Obrigatória em todas as requisições.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

document_number?string

Documento do motorista a ser atribuído à rota. O motorista precisa estar vinculado à conta. Obrigatório.

Response Body

application/json

application/json

curl -X PATCH "https://example.com/v1/routes/string/change-driver" \  -H "x-abbiamo-seller-group-key: string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "driver_id": "b3d2f1a0-4c5e-4f6d-8e9b-1a2b3c4d5e6f",
  "document_number": "12345678901",
  "name": "João Silva Santos",
  "route_id": "c4e5f6a7-8b9c-4d5e-6f7a-8b9c0d1e2f3a"
}

{
  "code": "INVALID_PARAMS",
  "message": "document_number should not be empty"
}