← HomeFleetPay / Schema

ContraCteGeradoResumo

Structure preserved from the versioned API contract.

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

Summary of a counter-CT-e generated by the platform with its current status at SEFAZ.

idstring · uuidRequired

Counter-CT-e UUID (accepted in GET /fiscal/cte/{cte_uuid} and /dacte).

source_cte_keystring | nullOptional

Access key (44 characters) of the contractor's CT-e that originated the document.

leg_refstring | nullOptional

Label of the leg provided in the batch, when applicable.

tp_cteintegerRequired

SEFAZ purpose (ide/tpCTe): 0 Normal, 1 Value complement.

0 · 1
tp_cte_rotulostringRequired

Normal or Complemento de valores.

chave_cte_complementadostring | nullOptional

44-digit access key of the complemented counter-CT-e (<infCteComp><chCTe>) when tp_cte = 1.

tipo_servicointegerRequired

ide/tpServ recorded in the document (1 subcontracting, 2 redispatch, 3 intermediate redispatch).

0 · 1 · 2 · 3
tipo_servico_rotulostringRequired
access_keystring | nullOptional

44-digit SEFAZ access key of the counter-CT-e.

numberinteger | nullOptional
seriesstring | nullOptional
freight_valuenumber | nullOptional

Total service value (vTPrest) declared on the counter-CT-e.

protocolstring | nullOptional
cstatstring | nullOptional
reasonstring | nullOptional
batch_idstring | null · uuidOptional

Batch UUID (POST /fiscal/cte-subcontratacao/lote) that generated this counter-CT-e, when issued in batch.

authorized_atstring | null · date-timeOptional
created_atstring | null · date-timeOptional
Original JSON Definition (Portuguese Descriptions)
{
  "type": "object",
  "required": [
    "id",
    "tp_cte",
    "tp_cte_rotulo",
    "tipo_servico",
    "tipo_servico_rotulo",
    "status"
  ],
  "description": "Resumo de um contra-CT-e gerado pela plataforma com seu estado atual perante a SEFAZ.",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "UUID do contra-CT-e (aceito em `GET /fiscal/cte/{cte_uuid}` e `/dacte`)."
    },
    "source_cte_key": {
      "type": [
        "string",
        "null"
      ],
      "description": "Chave de acesso (44 caracteres) do CT-e da contratante que deu origem ao documento."
    },
    "leg_ref": {
      "type": [
        "string",
        "null"
      ],
      "description": "Rótulo da perna informada no lote, quando aplicável."
    },
    "tp_cte": {
      "type": "integer",
      "enum": [
        0,
        1
      ],
      "description": "Finalidade SEFAZ (`ide/tpCTe`): `0` Normal, `1` Complemento de valores."
    },
    "tp_cte_rotulo": {
      "type": "string",
      "description": "`Normal` ou `Complemento de valores`."
    },
    "chave_cte_complementado": {
      "type": [
        "string",
        "null"
      ],
      "description": "Chave de 44 dígitos do contra-CT-e complementado (`<infCteComp><chCTe>`) quando `tp_cte = 1`."
    },
    "tipo_servico": {
      "type": "integer",
      "enum": [
        0,
        1,
        2,
        3
      ],
      "description": "`ide/tpServ` gravado no documento (`1` subcontratação, `2` redespacho, `3` redespacho intermediário)."
    },
    "tipo_servico_rotulo": {
      "type": "string"
    },
    "status": {
      "$ref": "#/components/schemas/CteSituation"
    },
    "access_key": {
      "type": [
        "string",
        "null"
      ],
      "description": "Chave de acesso de 44 dígitos do contra-CT-e na SEFAZ."
    },
    "number": {
      "type": [
        "integer",
        "null"
      ]
    },
    "series": {
      "type": [
        "string",
        "null"
      ]
    },
    "freight_value": {
      "type": [
        "number",
        "null"
      ],
      "description": "Valor total da prestação (`vTPrest`) declarado no contra-CT-e."
    },
    "protocol": {
      "type": [
        "string",
        "null"
      ]
    },
    "cstat": {
      "type": [
        "string",
        "null"
      ]
    },
    "reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "batch_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "UUID do lote (`POST /fiscal/cte-subcontratacao/lote`) que gerou este contra-CT-e, quando emitido em lote."
    },
    "authorized_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}