← HomeFleetPay / API

Get a contracted driver by tax identifier

Parameters, data structure and responses from the versioned contract.

GET/agregados/{documento}
consultarAgregadoSandbox Base: https://api.fleetpay.site/v1

Technical descriptions are translated from the versioned contract. Original identifiers and JSON are preserved; data examples are omitted.

The same content as the list endpoint, for a single document — useful when you already know whom you are checking and want to verify their state before initiating an operation.

A document that does not belong to one of your contracted carriers returns 404, not 403. This is intentional: a 403 would confirm that the CPF/CNPJ exists in FleetPay and turn the endpoint into a lookup for other companies' records. Here, a 404 means "not one of your contracted carriers" — it does not necessarily mean the person does not exist.

Authentication

[
  {
    "oauth2": []
  },
  {
    "chaveApi": []
  }
]
Availability depends on the environment, enabled scopes and provider. This reference does not execute requests or collect credentials.

Parameters

documentopath · stringRequired

CPF (11 digits) or CNPJ (14 digits). Accepts punctuation or no punctuation.

Constraints
{
  "type": "string"
}

Responses

200 HTTP Response

The contractor

application/json

400 HTTP Response

Invalid request

application/json

errorobjectOptional
401 HTTP Response

Unauthenticated (autenticacao): missing, invalid or expired credentials, including an API key used in the wrong environment. A sandbox key is not valid in production, nor a production key in the sandbox; the error message indicates the expected environment.

application/json

errorobjectOptional
403 HTTP Response

Scope not enabled for these credentials

application/json

errorobjectOptional
404 HTTP Response

No contractor with this tax identifier is linked to your company.

application/json

errorobjectOptional
429 HTTP Response

Request limit exceeded (limite_requisicoes). Wait for the interval specified in the Retry-After header before retrying. This may be a limit forwarded from the provider or FleetPay's own anti-abuse limit, counted per authenticated company and route group, with a short window for bursts and a long window for slower automated traffic. Limits are intentionally generous: genuine integrations, including large batches processed at once, should remain well below them. If yours reaches a limit, contact FleetPay.

application/json

errorobjectOptional
500 HTTP Response

Internal error (erro_interno)

application/json

errorobjectOptional
Complete Operation Definition
{
  "tags": [
    "Agregados"
  ],
  "summary": "Consultar um agregado pelo CPF/CNPJ",
  "operationId": "consultarAgregado",
  "description": "O mesmo conteúdo da listagem, para um documento só — para quando você já sabe de quem\nestá falando e quer checar antes de disparar uma operação.\n\n**Documento que não é seu agregado responde `404`, não `403`.** É deliberado: um `403`\nconfirmaria que aquele CPF/CNPJ existe na FleetPay, e transformaria este endpoint num\nconsultor de base alheia. Um `404` aqui significa \"não é seu agregado\" — não significa,\nnecessariamente, que a pessoa não existe.\n",
  "parameters": [
    {
      "name": "documento",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      },
      "description": "CPF (11 dígitos) ou CNPJ (14 dígitos). Aceita com ou sem pontuação."
    }
  ],
  "responses": {
    "200": {
      "description": "O agregado",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/RespostaAgregado"
          }
        }
      }
    },
    "400": {
      "$ref": "#/components/responses/Erro400"
    },
    "401": {
      "$ref": "#/components/responses/Erro401"
    },
    "403": {
      "$ref": "#/components/responses/Erro403"
    },
    "404": {
      "description": "Nenhum agregado com este documento está vinculado à sua empresa.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Erro"
          }
        }
      }
    },
    "429": {
      "$ref": "#/components/responses/Erro429"
    },
    "500": {
      "$ref": "#/components/responses/Erro500"
    }
  },
  "method": "GET",
  "path": "/agregados/{documento}"
}