← HomeFleetPay / API

Close CIOT

Parameters, data structure and responses from the versioned contract.

POST/fiscal/ciot/{ciot_uuid}/encerramento
encerrarOperacaoCiotSandbox Base: https://api.fleetpay.site/v1

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

Closes the Transport Operation at ANTT after trip completion. Requires the transported cargo weight (peso_carga). For Aggregated TAC operations, completed trips may be detailed in origem_destino.

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"
}

Request Body

Required

application/json

peso_carganumber · floatRequired

Actual weight transported.

minimum0.01
origem_destinoarrayOptional

Breakdown of traveled segments (mandatory for Aggregated TAC).

minItems1
maxItems20

Responses

200 HTTP Response

Closure completed.

application/json

202 HTTP Response

Closure processing.

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

Conflicting action (acao_conflitante).

application/json

errorobjectOptional
422 HTTP Response

Validation failure or rejection by the provider (operacao_recusada).

application/json

errorobjectOptional
503 HTTP Response

Provider unavailable (servico_indisponivel).

application/json

errorobjectOptional
Complete Operation Definition
{
  "tags": [
    "CIOT"
  ],
  "summary": "Encerrar CIOT",
  "operationId": "encerrarOperacaoCiot",
  "description": "Encerra a Operação de Transporte na ANTT após a conclusão da viagem.\nExige o peso da carga transportada (`peso_carga`). Para operações de TAC Agregado,\npode detalhar as viagens realizadas em `origem_destino`.\n",
  "parameters": [
    {
      "name": "ciot_uuid",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid"
      },
      "description": "UUID da operação de transporte."
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/EncerrarCiotInput"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Encerramento concluído.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/RespostaCiot"
          }
        }
      }
    },
    "202": {
      "description": "Encerramento em processamento.",
      "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 (`acao_conflitante`).",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Erro"
          }
        }
      }
    },
    "422": {
      "description": "Falha de validação ou recusa pelo provedor (`operacao_recusada`).",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Erro"
          }
        }
      }
    },
    "503": {
      "description": "Provedor 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}/encerramento"
}