← HomeFleetPay / API

Reconcile/query CIOT at the ANTT provider

Parameters, data structure and responses from the versioned contract.

POST/fiscal/ciot/{ciot_uuid}/consulta
consultarCiotNoProvedorSandbox Base: https://api.fleetpay.site/v1

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

Triggers an active query to the CIOT provider to reconcile the ANTT operation status with FleetPay's database.

Unlike GET /fiscal/ciot/{ciot_uuid} (which reads the local draft without network calls), this endpoint queries the partner and updates protocol, status, number and verification code.

Authentication

Required Scope
fiscal — Tax & Fiscal
Module
Tax, CT-e, MDF-e & CIOT
Target Profiles
Transport Manager · Dedicated Fleet Contractor · Fleet Carrier
Schemes
OAuth2 client_credentials (POST /oauth/token) or API Key via Authorization: Bearer / X-Api-Key
[
  {
    "oauth2": []
  },
  {
    "chaveApi": []
  }
]
Availability depends on the environment, enabled scopes and provider. This reference does not execute requests or collect credentials.

Parameters

ciot_uuidpath · stringRequired

Transport operation UUID.

Constraints
{
  "type": "string",
  "format": "uuid"
}

Responses

200 HTTP Response

Operation reconciled successfully.

application/json

202 HTTP Response

Query transmitted or processing at the provider.

application/json

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

Resource not found in the authenticated tenant.

application/json

Headers

X-Request-Id

Call correlation identifier.

409 HTTP Response

Action conflicts with the current operation status (acao_conflitante).

application/json

errorobjectOptional
422 HTTP Response

Business rule failure or undeclared CIOT (ciot_nao_declarado, regra_de_negocio).

application/json

errorobjectOptional
503 HTTP Response

CIOT provider unavailable (servico_indisponivel).

application/json

errorobjectOptional
Complete Operation Definition
{
  "tags": [
    "CIOT"
  ],
  "summary": "Reconciliar/consultar CIOT no provedor ANTT",
  "operationId": "consultarCiotNoProvedor",
  "description": "Dispara uma consulta ativa ao provedor de CIOT para reconciliar o estado da operação\nna ANTT com a base da FleetPay.\n\nDiferente de `GET /fiscal/ciot/{ciot_uuid}` (que faz leitura local do rascunho sem bater na rede),\neste endpoint consulta o parceiro e atualiza protocolo, status, número e código verificador.\n",
  "parameters": [
    {
      "name": "ciot_uuid",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid"
      },
      "description": "UUID da operação de transporte."
    }
  ],
  "responses": {
    "200": {
      "description": "Operação reconciliada com sucesso.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/RespostaCiot"
          }
        }
      }
    },
    "202": {
      "description": "Consulta transmitida ou em processamento no provedor.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/RespostaCiot"
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Erro401"
    },
    "403": {
      "$ref": "#/components/responses/Erro403"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    },
    "409": {
      "description": "Ação conflitante com o estado atual da operação (`acao_conflitante`).",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Erro"
          }
        }
      }
    },
    "422": {
      "description": "Regra de negócio ou CIOT não declarado (`ciot_nao_declarado`, `regra_de_negocio`).",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Erro"
          }
        }
      }
    },
    "503": {
      "description": "Provedor de CIOT indisponível (`servico_indisponivel`).",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Erro"
          }
        }
      }
    }
  },
  "x-fleetpay-scope": "fiscal",
  "x-fleetpay-module": "fiscal-ciot",
  "x-fleetpay-profiles": [
    "gestor",
    "agregado_empresarial",
    "transportador_frotista"
  ],
  "method": "POST",
  "path": "/fiscal/ciot/{ciot_uuid}/consulta"
}