POST
Refresh a draft filing (organization)
Organization space Accounting module For: Accountant · Permission: statement_filings.create, journal_entries.viewreports, statement_note_inputs.list Conditions
  • The accounting module must be part of the organization’s plan.
  • In the organization space, the caller must have access to the book.
  • The book must have accounting set up (at least one journal).
  • Only a draft can be regenerated; a filed or superseded filing is refused.
  • The fiscal year of the filing must still be closed.
  • supersedes_filing_id, when sent, must be a filed filing of the same book, fiscal year and form as the draft. A link can be set here but never cleared: omitting the field keeps the current link.
  • The form of the filing must be computable from the books (normal and prix_de_transfert; pays_par_pays cannot be).
  • Computing the statements also needs the permissions journal_entries.viewreports and statement_note_inputs.list; for prix_de_transfert it needs journal_entries.viewreports, related_parties.list and transfer_pricing_narratives.list instead of the note permission.
  • On the normal form, an account with activity that no line of the statement layout claims refuses the call with a business-rule error naming the account.
What else happens
  • Recomputes the draft in place on its own form: the payload, the closing date and the digest of its inputs (the notes, or the related parties and written answers for prix_de_transfert), and the generated_at and generating actor are replaced. The filing keeps its identifier.
  • Sets supersedes_filing_id when one is sent.
Part of File annual statements.

Authorizations

Authorization
string
header
required

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

Path Parameters

statementFiling
string
required

Identifier of the accounting book (the {book} segment of the organization space, a 27-character KSUID string); the OpenAPI generator names it after the controller argument.

statement_filing
string
required

Identifier of the filing (27-character KSUID string).

Query Parameters

response
enum<string>
default:none

Response mode. Default none; none answers 204 No Content.

Available options:
none,
resource
fields
string

Comma-separated JSON keys of the root resource (id is always rendered). Available: id, owner_type, fiscal_year_id, system, status, generated_at, generated_by, generated_by_type, filed_at, filed_by, filed_by_type, supersedes_filing_id, created_at, updated_at, payload.

include
string

Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: fiscalYear.

Body

application/json

Recomputes a draft. A draft created before its fiscal year was filed has no supersedes link, and the year holds one draft per form, so the link can be set here; omitting it keeps the current one.

supersedes_filing_id
string | null

Optional. Identifier of a filed filing of the same book, fiscal year and form as the draft, which the draft will replace when it is filed. Sets or changes the link; omitting it keeps the current link, and it cannot be cleared.

Response

Resource (only with response=resource).

id

Identifier of the filing (27-character KSUID string).

owner_type

Kind of owner of the book the filing belongs to (for example organization or client account); set by the server from the selected book.

fiscal_year_id

Identifier of the closed fiscal year the filing covers (27-character KSUID string).

fiscal_year
object

The fiscal year, present only when requested with ?include=fiscalYear and the caller has the permission fiscal_years.retrieve; omitted otherwise.

system

DGI form the filing is made on: normal (Systeme Normal), prix_de_transfert (the transfer-pricing declaration, CGI art. 470) or pays_par_pays. Only normal and prix_de_transfert can be generated.

status

State of the filing: draft (editable by regenerate), filed (declared), superseded (replaced by a later filed correction).

payload
object

Frozen content computed when the draft was created or regenerated. For the normal form: system, balance_sheet, income_statement, cash_flow and notes. For prix_de_transfert: the declaration that the transfer-pricing preview returns (obligation, operations, loans and narrative). Omitted from lists.

generated_at

When the figures were last computed, ISO 8601; replaced by each regenerate.

generated_by

Identifier of the member or agent account that created or last regenerated the draft; null when the actor could not be validated.

generated_by_type

Kind of actor in generated_by; null when generated_by is null.

filed_at

When the filing was filed, ISO 8601; null while it is a draft.

filed_by

Identifier of the actor that filed it; null until filed.

filed_by_type

Kind of actor in filed_by; null until filed.

supersedes_filing_id

Identifier of the filed filing this one replaces once it is filed; null for a first filing.

created_at

Date and time the record was created (ISO 8601, UTC).

updated_at

Date and time the record was last changed (ISO 8601, UTC).