Skip to main content

Simulate F24 forms massive download

In the sandbox environment the F24 forms massive download does not reach the "Cassetto Fiscale": you can simulate it with POST /simulate/jobs/f24-download, which takes the same payload as POST /jobs/f24-download.

The simulation runs straight away, inside the request:

  • it stores one F24 form per month of the requested period, paid on the monthly deadline: the 16th, or the following Monday when the 16th falls on a weekend;
  • it creates a job that you can read with GET /jobs, already in status completed;
  • it sends the usual job webhook to your configured endpoints.

The "Cassetto Fiscale" credentials and the download subscription are not needed.

Example:

curl -X POST
https://api-sandbox.acubeapi.com/simulate/jobs/f24-download
-H 'Authorization: Bearer <Your Bearer token here>'
-H 'Content-Type: application/json'
-d '{
"from_date": "2026-01-01",
"to_date": "2026-06-30",
"fiscal_id": "12345678901"
}'

The API returns a 201 Created response with the job and the stored F24 forms, six in this example (the 16th of May 2026 is a Saturday, so that payment is dated the 18th):

{
"job": "0199f3a2-7c1e-7a4b-9d2e-3f5a6b7c8d9e",
"f24_forms": [
"0199f3a2-7c20-7e11-8a3b-1c2d3e4f5a6b",
"..."
]
}

A period that contains no deadline completes the job with an empty f24_forms list.

The simulated F24 forms​

The forms are available through GET /f24-forms like any downloaded form:

{
"uuid": "0199f3a2-7c20-7e11-8a3b-1c2d3e4f5a6b",
"fiscal_id": "12345678901",
"reference_year": 2026,
"protocol_number": "B9999900001160326/0482913",
"status": "ready",
"payment_date": "2026-03-16",
"amount": "7078.41",
"receipt_available": false
}
  • HTML: GET /f24-forms/{uuid} with Accept: text/html returns the payment detail in the same format as the "Cassetto Fiscale": the monthly VAT of the previous month (tax code 6001–6012) and, for some forms, the withholding taxes (tax code 1001).
  • PDF: the same API with Accept: application/pdf returns the blank F24 form marked as "FAC SIMILE".
  • Receipt: simulated forms have no receipt, so receipt_available is always false.

The protocol number has the shape of the real ones, with bank codes that do not exist (ABI 99999, CAB 00001), and it only depends on the company and the month: running the simulation again over the same period finds the same forms instead of creating new ones, as the real download does.

Validation​

The payload is validated as in POST /jobs/f24-download:

  • from_date cannot be earlier than the 1st of January of the previous year, and to_date cannot be later than today;
  • scheduled_at is optional and cannot be in the past. It is saved on the job, but the simulation runs immediately anyway;
  • fiscal_id must belong to a Business Registry Configuration of your account;
  • from_date, to_date and fiscal_id are required, and to_date cannot be earlier than from_date.

An invalid payload returns a 400 Bad Request response listing the offending fields in violations.

Simulate a failed download​

POST /simulate/jobs/f24-download/error takes the same payload, stores no F24 form and creates the job in status error. Your endpoints receive the job-error webhook. The response contains only the job:

{
"job": "0199f3a2-7c1e-7a4b-9d2e-3f5a6b7c8d9e"
}