← HomeFleetPay / API

Download the archived XML

Parameters, data structure and responses from the versioned contract.

GET/fiscal/cte-subcontratacao/{access_key}/xml
getInboundCteXmlSandbox Base: https://api.fleetpay.site/v1

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

The XML exactly as received, byte for byte. FleetPay does not reserialize it: rewriting the document would invalidate its match with the issuer's signature.

Authentication

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

Parameters

access_keypath · stringRequired

Access key of the received CT-e, 44 digits.

Constraints
{
  "type": "string",
  "pattern": "^\\d{44}$"
}

Responses

200 HTTP Response

Received CT-e XML.

application/xml

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.

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 de subcontratação"
  ],
  "summary": "Baixar o XML arquivado",
  "description": "O XML exatamente como chegou, byte a byte. Não é reserializado pela FleetPay: um\ndocumento reescrito por nós deixaria de bater com a assinatura de quem o emitiu.\n",
  "operationId": "getInboundCteXml",
  "parameters": [
    {
      "$ref": "#/components/parameters/InboundCteAccessKey"
    }
  ],
  "responses": {
    "200": {
      "description": "XML do CT-e recebido.",
      "headers": {
        "X-Request-Id": {
          "$ref": "#/components/headers/RequestId"
        }
      },
      "content": {
        "application/xml": {
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    },
    "500": {
      "$ref": "#/components/responses/InternalError"
    }
  },
  "method": "GET",
  "path": "/fiscal/cte-subcontratacao/{access_key}/xml"
}