← HomeFleetPay / API

Amend CIOT

Parameters, data structure and responses from the versioned contract.

POST/fiscal/ciot/{ciot_uuid}/retificacao
retificarOperacaoCiotSandbox Base: https://api.fleetpay.site/v1

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

Amends data on an active Transport Operation with ANTT. At least one field must be provided for amendment: valor_frete, data_fim_viagem, origem_destino or dados_carga.

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

justificativastringOptional

Reason for CIOT amendment.

maxLength500
valor_fretenumber · floatOptional

New total freight value in BRL.

minimum0.01
data_fim_viagemstring · dateOptional

New expected trip end date (YYYY-MM-DD).

origem_destinoarrayOptional

Origin and destination segments of the operation.

minItems1
maxItems20
dados_cargaobjectOptional

Responses

200 HTTP Response

Amendment completed.

application/json

202 HTTP Response

Amendment 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": "Retificar CIOT",
  "operationId": "retificarOperacaoCiot",
  "description": "Retifica dados de uma Operação de Transporte ativa junto à ANTT.\nÉ obrigatório informar ao menos um campo para alteração: `valor_frete`, `data_fim_viagem`,\n`origem_destino` ou `dados_carga`.\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/RetificarCiotInput"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Retificação concluída.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/RespostaCiot"
          }
        }
      }
    },
    "202": {
      "description": "Retificação 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}/retificacao"
}