# Get latest reporting status for a document

Returns the most recent reporting status for the specified document ID.

Endpoint: POST /rest/v1/documents/getLatestReportingStatus
Version: v2026.12.01
Security: PublicApiKey

## Security:

  - `PublicApiKey` (unknown)
    apiKey in header Authorization

## Request fields (application/json):

  - `documentId` (string, required)
    The unique identifier of the document
    Example: 64a1b2c3d4e5f6789012345a

  - `internalRequestId` (string)
    Optional filter by internal request ID
    Example: id-abc123-xyz789

## Response 200:

  - `200` (unknown)
    Latest reporting status retrieved successfully.

## Response 200 fields (application/json):

  - `successful` (boolean)
    Whether the reporting was successful
    Example: true

  - `errorMessage` (string)
    Error message if reporting failed
    Example: Invalid reporting format

  - `errorCode` (string)
    Error code if reporting failed
    Example: FORMAT_ERROR

  - `shouldRetry` (boolean)
    Whether the reporting should be retried
    Example: false

  - `timestamp` (string)
    Timestamp when the reporting was attempted
    Example: 2024-01-15T10:30:00Z

  - `reportingRequestId` (string)
    Unique identifier for the reporting attempt
    Example: RPT-2024-001234

  - `reportingResponseId` (string)
    Reference number from the reporting system
    Example: REF-12345678-2024

  - `fiscalizationType` (string)
    Type of fiscalization process
    Enum: "FISCALIZATION", "FISCALIZATION_REJECTION_REPORT", "FISCALIZATION_PAYMENT_REPORT", "FISCALIZATION_NOT_DELIVERED_REPORT"

  - `internalRequestId` (string)
    Internal request identifier associated with this reporting attempt
    Example: id-abc123-xyz789

## Response 401:

  - `401` (unknown)
    Unauthorized access due to invalid or missing API key.

## Response 404:

  - `404` (unknown)
    Document not found or no reporting status available.

## Response 500:

  - `500` (unknown)
    Internal server error during status retrieval.

