Skip to main content
POST
/
v1
/
statutory
/
filings
/
batch
Create all filings for a period
curl --request POST \
  --url https://api.cadanapay.com/v1/statutory/filings/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "businessId": "<string>",
  "periodStart": "2026-02-01",
  "periodEnd": "2026-02-28",
  "payrollRunIds": [
    "<string>"
  ],
  "filings": [
    {
      "filingTypeId": "ft_mx_isr_monthly",
      "amounts": {
        "currency": "MXN",
        "totalTax": 45000,
        "employerContributions": 20000,
        "employeeDeductions": 25000,
        "lineItems": [
          {
            "description": "ISR - Withholding per Artículo 96 table",
            "amount": 12500
          }
        ]
      },
      "personIds": [
        "<string>"
      ]
    }
  ],
  "countryCode": "<string>",
  "filingTypeIds": [
    "<string>"
  ]
}
'
{
  "data": [
    {
      "id": "fil_01HQ3K4N7XYZABC"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Batch create filings. Two modes:

Mode 1 — Cadana payroll: Provide payrollRunIds and Cadana auto-determines filing types and amounts from the tax engine.

Mode 2 — External payroll: Provide filings array with explicit amounts per filing type. Use this when the client runs payroll outside Cadana and provides the data directly.

One of payrollRunIds or filings must be provided.

businessId
string
required
periodStart
string<date>
required
Example:

"2026-02-01"

periodEnd
string<date>
required
Example:

"2026-02-28"

payrollRunIds
string[]

Link to Cadana payroll runs. Cadana auto-determines filing types and populates amounts from the tax engine. Mutually exclusive with filings.

filings
object[]

Explicit filing data for external payroll. Each entry specifies the filing type, amounts, and workers. Use this when payroll was run outside Cadana. Mutually exclusive with payrollRunIds.

countryCode
string

Limit to a specific jurisdiction. If omitted, creates filings for all jurisdictions where the business has active workers.

filingTypeIds
string[]

Limit to specific filing types (only applies when using payrollRunIds mode). If omitted, creates all applicable filing types based on worker flags.

Response

Filings created

data
object[]