{
 "openapi": "3.1.0",
 "info": {
  "title": "XBRL Filings (Accounting)",
  "version": "20261030b",
  "description": "The balance sheet, income statement and cash flow of a period, tagged for a regulator as an XBRL instance and an Inline XBRL document, and checked: contexts, units, decimals, duplicates, totals. The ESEF report package and validation against the published taxonomies (Arelle) are done outside."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "xbrl-filings": {
    "type": "object",
    "required": [
     "taxonomy_id",
     "period_from",
     "period_to",
     "entity_identifier"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "filing_no": {
      "type": "string",
      "description": "Filing no",
      "readOnly": true
     },
     "taxonomy_id": {
      "type": "string",
      "format": "uuid",
      "description": "Taxonomy"
     },
     "period_from": {
      "type": "string",
      "format": "date",
      "description": "Period from"
     },
     "period_to": {
      "type": "string",
      "format": "date",
      "description": "Period to"
     },
     "entity_name": {
      "type": "string",
      "description": "Entity name"
     },
     "entity_identifier": {
      "type": "string",
      "description": "Entity identifier"
     },
     "identifier_scheme": {
      "type": "string",
      "description": "Identifier scheme"
     },
     "currency": {
      "type": "string",
      "description": "Currency"
     },
     "decimals": {
      "type": "integer",
      "description": "Decimals"
     },
     "display_scale": {
      "type": "integer",
      "description": "Display scale",
      "enum": [
       "0",
       "3",
       "6"
      ]
     },
     "shares_outstanding": {
      "type": "string",
      "format": "decimal",
      "description": "Shares outstanding"
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "fact_count": {
      "type": "integer",
      "description": "Fact count",
      "readOnly": true
     },
     "error_count": {
      "type": "integer",
      "description": "Error count",
      "readOnly": true
     },
     "warning_count": {
      "type": "integer",
      "description": "Warning count",
      "readOnly": true
     },
     "validation": {
      "type": "object",
      "description": "Validation",
      "readOnly": true
     },
     "instance_xml": {
      "type": "string",
      "description": "Instance xml",
      "readOnly": true
     },
     "ixbrl_html": {
      "type": "string",
      "description": "Ixbrl html",
      "readOnly": true
     },
     "generated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Generated at",
      "readOnly": true
     },
     "generated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Generated by",
      "readOnly": true
     },
     "filed_at": {
      "type": "string",
      "format": "date-time",
      "description": "Filed at",
      "readOnly": true
     },
     "notes": {
      "type": "string",
      "description": "Notes"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/accounting/xbrl-filings": {
   "get": {
    "summary": "list xbrl-filings",
    "operationId": "list_xbrl_filings_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create xbrl-filings",
    "operationId": "create_xbrl_filings_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/xbrl-filings/{id}": {
   "get": {
    "summary": "get xbrl-filings",
    "operationId": "get_xbrl_filings_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change xbrl-filings",
    "operationId": "change_xbrl_filings_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete xbrl-filings",
    "operationId": "delete_xbrl_filings_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/xbrl-filings/{id}/generate": {
   "post": {
    "summary": "Generate",
    "operationId": "action_xbrl_filings_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/xbrl-filings/{id}/facts": {
   "get": {
    "summary": "Facts",
    "operationId": "action_xbrl_filings_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/xbrl-filings/{id}/validation": {
   "get": {
    "summary": "Validation",
    "operationId": "action_xbrl_filings_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/xbrl-filings/{id}/download": {
   "get": {
    "summary": "Download",
    "operationId": "action_xbrl_filings_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/xbrl-filings/{id}/mark-filed": {
   "post": {
    "summary": "Mark filed",
    "operationId": "action_xbrl_filings_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/xbrl-filings/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_xbrl_filings_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}