Skip to main content
POST
/
v1
/
statutory
/
filings
/
{filing_id}
/
cancel
Cancel a filing
curl --request POST \
  --url https://api.cadanapay.com/v1/statutory/filings/{filing_id}/cancel \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "reason": "<string>"
}
'
{
  "id": "fil_01HQ3K4N7XYZABC",
  "businessId": "biz_01HQ3K4N7XYZABC",
  "countryCode": "MX",
  "filingType": {
    "id": "ft_mx_isr_monthly",
    "name": "ISR Withholding",
    "description": "ISR income tax withholding return filed monthly with SAT",
    "governmentFormName": "Declaración Provisional ISR",
    "authority": {
      "id": "auth_mx_sat",
      "name": "Servicio de Administración Tributaria",
      "abbreviation": "SAT",
      "countryCode": "MX",
      "electronicSystem": "Portal del SAT"
    },
    "frequency": "MONTHLY",
    "dueDay": 10,
    "includesRemittance": true,
    "legislativeReference": "Ley del Impuesto Sobre la Renta (LISR), Artículo 96"
  },
  "status": "upcoming",
  "period": {
    "start": "2026-01-01",
    "end": "2026-01-31",
    "label": "January 2026"
  },
  "dueAt": "2026-02-10T23:59:59Z",
  "filedAt": "2023-11-07T05:31:56Z",
  "amounts": {
    "currency": "MXN",
    "totalTax": 45000,
    "employerContributions": 20000,
    "employeeDeductions": 25000,
    "penalties": 0,
    "lineItems": [
      {
        "description": "ISR - Withholding per Artículo 96 table",
        "amount": 12500,
        "legislativeReference": "LISR, Artículo 96, Tabla mensual"
      }
    ]
  },
  "blockedReasons": [
    {
      "code": "missing_tax_id",
      "message": "SAT RFC (Registro Federal de Contribuyentes) is required for the business",
      "requirementId": "req_01HQ3K4N7XYZABC",
      "resourceType": "business",
      "resourceId": "<string>",
      "affectedField": "taxId"
    }
  ],
  "personIds": [
    "per_01ABC",
    "per_02DEF",
    "per_03GHI"
  ],
  "remittanceId": "<string>",
  "amends": "<string>",
  "amendedBy": "<string>",
  "document": {
    "url": "<string>",
    "generatedAt": "2023-11-07T05:31:56Z"
  },
  "statusHistory": [
    {
      "status": "<string>",
      "changedAt": "2023-11-07T05:31:56Z",
      "actor": "<string>",
      "blockedReasons": [
        {
          "code": "missing_tax_id",
          "message": "SAT RFC (Registro Federal de Contribuyentes) is required for the business",
          "requirementId": "req_01HQ3K4N7XYZABC",
          "resourceType": "business",
          "resourceId": "<string>",
          "affectedField": "taxId"
        }
      ]
    }
  ],
  "workerCount": 15,
  "estimatedAmount": {
    "currency": "<string>",
    "amount": 123
  },
  "legislativeReferences": [
    "Ley del Impuesto Sobre la Renta (LISR), Artículo 96",
    "Resolución Miscelánea Fiscal, Regla 2.7.5.2"
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

filing_id
string
required

Filing identifier

Body

application/json
reason
string
required

Reason for cancellation

Response

Filing cancelled

id
string
Example:

"fil_01HQ3K4N7XYZABC"

businessId
string
Example:

"biz_01HQ3K4N7XYZABC"

countryCode
string
Example:

"MX"

filingType
object

A type of statutory return that must be filed in a jurisdiction. Filing types vary by country — use GET /jurisdictions/{countryCode}/filing-types to retrieve them.

status
enum<string>

Filing lifecycle:

upcoming ──→ pending ──→ in_review ──→ approved ──→ submitted ──→ accepted
│ │ │ │
▼ ▼ ▼ ▼
blocked blocked rejected amended
│ │ │
▼ ▼ ▼
pending pending pending (retry)

Any pre-submit state ──→ cancelled
  • upcoming — Filing obligation exists (based on workers/jurisdiction) but payroll hasn't run yet. Unbundled clients skip this state entirely.
  • pending — Filing created with amounts, being validated.
  • blocked — Missing data or requirements prevent submission.
  • in_review — Validated, ready for approval.
  • approved — Approved, queued for submission to authority.
  • submitted — Sent to the government authority.
  • accepted — Authority acknowledged receipt.
  • rejected — Authority rejected the filing.
  • amended — Superseded by a correction filing.
  • cancelled — Cancelled before submission.
Available options:
upcoming,
pending,
blocked,
in_review,
approved,
submitted,
accepted,
rejected,
amended,
cancelled
period
object
dueAt
string<date-time>

Deadline for submission to the authority

Example:

"2026-02-10T23:59:59Z"

filedAt
string<date-time> | null

When the authority acknowledged receipt

amounts
object

Financial breakdown of the filing

blockedReasons
object[] | null

Present when status is blocked

personIds
string[]

Person IDs (from the Persons Service) included in this filing. These reference workers whose tax deductions are reported in this return. Person data (taxId, nationalId, compensation, etc.) is read from the Persons Service at filing preparation time — not duplicated here.

Example:
["per_01ABC", "per_02DEF", "per_03GHI"]
remittanceId
string | null

Linked remittance (when payment has been initiated)

amends
string | null

ID of the original filing this amends

amendedBy
string | null

ID of the filing that supersedes this one

document
object

The filing document, available after submission

statusHistory
object[]
workerCount
integer

Number of workers included in this filing. For upcoming filings, this is the count of eligible persons in the jurisdiction.

Example:

15

estimatedAmount
object

Estimated filing amount. Present on upcoming filings before exact amounts are calculated. Null once amounts is populated.

legislativeReferences
string[]

Legal citations for this filing

Example:
[
"Ley del Impuesto Sobre la Renta (LISR), Artículo 96",
"Resolución Miscelánea Fiscal, Regla 2.7.5.2"
]
createdAt
string<date-time>
updatedAt
string<date-time>