← HomeFleetPay / API

Issue a CT-e

Parameters, data structure and responses from the versioned contract.

POST/fiscal/cte/{cte_uuid}/emissao
issueCteSandbox Base: https://api.fleetpay.site/v1

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

Starts issuance in the sandbox environment. A 202 response requires polling at /cte/{cte_uuid}/consulta; do not repeat this issuance while the outcome is unknown.

Authentication

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

Parameters

cte_uuidpath · stringRequired

Public CT-e UUID.

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

Responses

202 HTTP Response

Issuance accepted or outcome still inconclusive.

application/json

Headers

X-Request-Id

Call correlation identifier.

401 HTTP Response

FleetPay API key missing or invalid.

application/json

Headers

X-Request-Id

Call correlation identifier.

403 HTTP Response

Fiscal scope disabled for the key, or no active carrier associated with the key.

application/json

Headers

X-Request-Id

Call correlation identifier.

404 HTTP Response

Resource not found in the authenticated tenant.

application/json

Headers

X-Request-Id

Call correlation identifier.

422 HTTP Response

Invalid payload, outstanding requirement or business rule.

application/json

Headers

X-Request-Id

Call correlation identifier.

429 HTTP Response

Per-carrier limit exceeded.

application/json

Headers

X-Request-Id

Call correlation identifier.

Retry-After

Seconds until another attempt.

500 HTTP Response

Internal failure without operational integration details.

application/json

Headers

X-Request-Id

Call correlation identifier.

Complete Operation Definition
{
  "tags": [
    "CT-e"
  ],
  "summary": "Emitir CT-e",
  "description": "Inicia a emissão em homologação. Uma resposta 202 exige polling em\n`/cte/{cte_uuid}/consulta`; não repita esta emissão enquanto o resultado for desconhecido.\n",
  "operationId": "issueCte",
  "responses": {
    "202": {
      "description": "Emissão aceita ou com resultado ainda não conclusivo.",
      "headers": {
        "X-Request-Id": {
          "$ref": "#/components/headers/RequestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/CteIssueEnvelope"
          }
        }
      },
      "links": {
        "ConsultarAutorizacaoCte": {
          "operationId": "queryCte",
          "parameters": {
            "cte_uuid": "$request.path.cte_uuid"
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    },
    "422": {
      "$ref": "#/components/responses/ValidationOrBusinessRuleFailed"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    },
    "500": {
      "$ref": "#/components/responses/InternalError"
    }
  },
  "method": "POST",
  "path": "/fiscal/cte/{cte_uuid}/emissao",
  "parameters": [
    {
      "$ref": "#/components/parameters/CteUuid"
    }
  ]
}