> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cadanapay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a filing

> **Beta** — contact Cadana to enable access for your business.

Returns full filing details including amounts, status history,
blocked reasons, and linked payroll runs.




## OpenAPI

````yaml /openapi/statutory-compliance.yaml get /v1/statutory/filings/{filing_id}
openapi: 3.0.0
info:
  title: Statutory Compliance API
  version: 0.1.0
  description: Statutory filing, government remittance, and compliance tracking API
  termsOfService: https://cadanapay.com/terms-and-conditions
  contact:
    email: api@cadanapay.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.cadanapay.com
    description: Prod Server
  - url: https://dev-api.cadanapay.com
    description: Dev Server
security:
  - Authorization: []
tags:
  - name: Jurisdictions
    description: Discover supported countries, required fields, and filing types
  - name: Filings
    description: >-
      Create, submit, and track statutory returns — from upcoming obligations
      through acceptance
  - name: Remittances
    description: Government payments linked to filings
  - name: Requirements
    description: Prerequisites that must be satisfied before filing
  - name: Events
    description: Immutable audit trail
  - name: Statutory Fields
    description: Submit and read entity-level statutory filing data
paths:
  /v1/statutory/filings/{filing_id}:
    get:
      tags:
        - Filings
      summary: Get a filing
      description: |
        **Beta** — contact Cadana to enable access for your business.

        Returns full filing details including amounts, status history,
        blocked reasons, and linked payroll runs.
      operationId: getFiling
      parameters:
        - $ref: '#/components/parameters/XMultiTenantKey'
        - $ref: '#/components/parameters/FilingId'
      responses:
        '200':
          description: Filing details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Filing'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    XMultiTenantKey:
      name: X-MultiTenantKey
      in: header
      required: false
      schema:
        type: string
      description: >-
        Required when using a Platform API token. The tenant key identifying
        which business to operate on.
    FilingId:
      name: filing_id
      in: path
      required: true
      schema:
        type: string
      description: Filing identifier
      example: fil_01HQ3K4N7XYZABC
  schemas:
    Filing:
      type: object
      description: |
        Full filing detail returned by `GET /v1/statutory/filings/{id}`.
        Includes amounts, status history, and linked payroll runs.
      properties:
        id:
          type: string
          example: fil_01HQ3K4N7XYZABC
        businessId:
          type: string
          example: biz_01HQ3K4N7XYZABC
        countryCode:
          type: string
          example: MX
        source:
          type: string
          enum:
            - cadana
            - external
          description: >
            How the filing data was sourced.


            - `cadana` — Cadana prepared and submitted the return to the
            authority.
              The filing runs the full lifecycle (`pending → in_review → approved →
              submitted → accepted`).
            - `external` — You filed the return with the authority yourself and
              submitted the resulting totals + `filingReference` to Cadana so a
              remittance can be created against it. External filings are created
              directly in `accepted` and do not run the submission lifecycle.
          example: cadana
        filingTypeId:
          type: string
          description: Filing type identifier (from jurisdiction filing types)
          example: ft_mx_isr_monthly
        filingTypeName:
          type: string
          description: Human-readable filing type name
          example: ISR Withholding
        authorityId:
          type: string
          description: Government authority identifier
          example: auth_mx_sat
        authorityName:
          type: string
          description: Government authority name
          example: SAT
        filingReference:
          type: string
          nullable: true
          description: >
            Government-issued reference for this filing. The exact term varies
            by

            country: **Línea de Captura** in Mexico, **acuse de recibo** for
            some

            SAT receipts, **challan number** in India, **BRN** in Nigeria,

            **NPC** in some others.


            For `source: external` filings this is required at creation time —

            it's what the receiving bank or authority uses to attribute the

            remittance payment to the filing. For `source: cadana` filings

            Cadana populates this once the authority confirms receipt.
          example: 0123456ABCD7890EF
        status:
          type: string
          enum:
            - pending
            - blocked
            - in_review
            - approved
            - submitted
            - accepted
            - rejected
            - cancelled
          description: >
            Filing lifecycle for `source: cadana`: pending → in_review →
            approved → submitted → accepted. Filings can become blocked at
            pending or in_review if data is missing, and return to pending once
            resolved. Rejected filings return to pending for correction. Any
            pre-submit state can be cancelled.


            For `source: external` filings, the filing is created directly in
            `accepted` and stays there — there is no submission step for Cadana
            to run because you already filed with the authority.
        period:
          type: object
          properties:
            start:
              type: string
              format: date
              example: '2026-01-01'
            end:
              type: string
              format: date
              example: '2026-01-31'
            label:
              type: string
              example: January 2026
        dueAt:
          type: string
          description: Deadline for submission to the authority
          example: '2026-02-10'
        amounts:
          $ref: '#/components/schemas/FilingAmounts'
        workerCount:
          type: integer
          description: |
            Number of distinct workers in the filing's `breakdown` (counted via
            `personId` or `externalEmployeeId`). Zero for purely business-level
            filings.
          example: 15
        payrollRunIds:
          type: array
          items:
            type: string
          description: >-
            Linked Cadana payroll runs (when populated via a payroll-run
            shortcut)
        breakdown:
          type: array
          description: |
            Per-employee contribution lines that roll up into the filing total.
            For `source: cadana` filings Cadana populates this from payroll;
            for `source: external` you provide it at creation time.
          items:
            $ref: '#/components/schemas/FilingBreakdownEntry'
        blockedReasons:
          type: array
          items:
            type: string
          description: |
            Human-readable reasons why this filing is blocked. Present when
            status is `blocked`. Reasons auto-clear when the underlying data
            is submitted.
          example:
            - Missing worker RFC for per_01ABC
            - Business IMSS registration not found
        statusHistory:
          type: array
          items:
            $ref: '#/components/schemas/StatusHistoryEntry'
        amendedBy:
          type: string
          description: >-
            ID of the amendment filing that supersedes this one. Present only
            after the filing has been amended; the filing itself stays
            `accepted`.
        amendsFilingId:
          type: string
          description: >-
            ID of the original filing this amendment corrects. Present only on
            amendment filings created via the amend endpoint.
        createdAt:
          type: number
          format: epoch
          description: Unix epoch timestamp
          example: 1709280000
        updatedAt:
          type: number
          format: epoch
          description: Unix epoch timestamp
          example: 1709280000
    FilingAmounts:
      type: object
      description: |
        Derived totals for the filing. **Read-only on responses** — Cadana
        computes these values from the `breakdown` lines. You do not pass
        `amounts` when creating a filing; provide the `breakdown` array and
        the total falls out automatically.
      properties:
        currency:
          type: string
          description: ISO 4217 currency code. Set on the filing at creation time.
          example: MXN
        total:
          type: number
          format: decimal
          description: Sum of `amount` across every line in the filing's breakdown.
          example: 82345
    FilingBreakdownEntry:
      type: object
      description: |
        One contribution line that rolls up into a filing's total. The breakdown
        array as a whole is the canonical description of the filing — its sum is
        the filing total.

        **Identifying the worker:**
        - For `source: cadana` filings, each line must reference a `personId`
          (Cadana needs the worker record to populate filing fields).
        - For `source: external` filings, lines may use `personId` (when the
          worker is onboarded), `externalEmployeeId` (when not), or neither
          (for business-level taxes computed on aggregate payroll, like
          Mexico's ISN, where there's no per-worker allocation).
      required:
        - amount
      properties:
        personId:
          type: string
          description: |
            Cadana person ID. Required on `source: cadana` filings.
          example: per_01HQ3K4N7XYZABC
        externalEmployeeId:
          type: string
          description: |
            Your own employee identifier. Use on `source: external` filings when
            the worker is not onboarded into Cadana.
          example: EMP-00142
        employeeName:
          type: string
          description: Human-readable name for audit trail and reconciliation.
          example: María García López
        amount:
          type: number
          format: decimal
          description: Contribution amount for this line in the filing currency.
          example: 4250
    StatusHistoryEntry:
      type: object
      description: Records a single status transition on a filing or remittance.
      properties:
        from:
          type: string
          description: Previous status
          example: pending
        to:
          type: string
          description: New status
          example: in_review
        timestamp:
          type: number
          format: epoch
          description: Unix epoch timestamp of the transition
          example: 1709654400
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
              example: countryCode is required
            details:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
  responses:
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      bearerFormat: API_SECRET_KEY

````