{
 "openapi": "3.1.0",
 "info": {
  "title": "Tax Transactions (Accounting)",
  "version": "20261030b",
  "description": "Every tax amount on every document, with the TAXABLE BASE the ledger never held. A return cannot be produced without it."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "tax-transactions": {
    "type": "object",
    "required": [],
    "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
     },
     "txn_date": {
      "type": "string",
      "format": "date",
      "description": "Txn date",
      "readOnly": true
     },
     "tax_point_date": {
      "type": "string",
      "format": "date",
      "description": "Tax point date",
      "readOnly": true
     },
     "period_code": {
      "type": "string",
      "description": "Period code",
      "readOnly": true
     },
     "document_type": {
      "type": "string",
      "description": "Document type",
      "readOnly": true
     },
     "document_id": {
      "type": "string",
      "format": "uuid",
      "description": "Document id",
      "readOnly": true
     },
     "document_no": {
      "type": "string",
      "description": "Document no",
      "readOnly": true
     },
     "line_no": {
      "type": "integer",
      "description": "Line no",
      "readOnly": true
     },
     "direction": {
      "type": "string",
      "description": "Direction",
      "readOnly": true
     },
     "tax_code_id": {
      "type": "string",
      "format": "uuid",
      "description": "Tax code id",
      "readOnly": true
     },
     "tax_code": {
      "type": "string",
      "description": "Tax code",
      "readOnly": true
     },
     "jurisdiction_id": {
      "type": "string",
      "format": "uuid",
      "description": "Jurisdiction id",
      "readOnly": true
     },
     "classification_id": {
      "type": "string",
      "format": "uuid",
      "description": "Classification id",
      "readOnly": true
     },
     "account_id": {
      "type": "string",
      "format": "uuid",
      "description": "Account id",
      "readOnly": true
     },
     "supplier_id": {
      "type": "string",
      "format": "uuid",
      "description": "Supplier id",
      "readOnly": true
     },
     "partner_registration": {
      "type": "string",
      "description": "Partner registration",
      "readOnly": true
     },
     "partner_country": {
      "type": "string",
      "description": "Partner country",
      "readOnly": true
     },
     "currency": {
      "type": "string",
      "description": "Currency",
      "readOnly": true
     },
     "exchange_rate": {
      "type": "string",
      "format": "decimal",
      "description": "Exchange rate",
      "readOnly": true
     },
     "taxable_base": {
      "type": "string",
      "format": "decimal",
      "description": "Taxable base",
      "readOnly": true
     },
     "tax_amount": {
      "type": "string",
      "format": "decimal",
      "description": "Tax amount",
      "readOnly": true
     },
     "non_taxable_amount": {
      "type": "string",
      "format": "decimal",
      "description": "Non taxable amount",
      "readOnly": true
     },
     "rate_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Rate pct",
      "readOnly": true
     },
     "recoverable_amount": {
      "type": "string",
      "format": "decimal",
      "description": "Recoverable amount",
      "readOnly": true
     },
     "irrecoverable_amount": {
      "type": "string",
      "format": "decimal",
      "description": "Irrecoverable amount",
      "readOnly": true
     },
     "is_reverse_charge": {
      "type": "boolean",
      "description": "Is reverse charge",
      "readOnly": true
     },
     "exemption_id": {
      "type": "string",
      "format": "uuid",
      "description": "Exemption id",
      "readOnly": true
     },
     "journal_id": {
      "type": "string",
      "format": "uuid",
      "description": "Journal id",
      "readOnly": true
     },
     "return_id": {
      "type": "string",
      "format": "uuid",
      "description": "Return id",
      "readOnly": true
     },
     "is_reported": {
      "type": "boolean",
      "description": "Is reported",
      "readOnly": true
     },
     "corrects_id": {
      "type": "string",
      "format": "uuid",
      "description": "Corrects id",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "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
     },
     "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
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/accounting/tax-transactions": {
   "get": {
    "summary": "list tax-transactions",
    "operationId": "list_tax_transactions_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create tax-transactions",
    "operationId": "create_tax_transactions_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/tax-transactions/{id}": {
   "get": {
    "summary": "get tax-transactions",
    "operationId": "get_tax_transactions_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change tax-transactions",
    "operationId": "change_tax_transactions_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete tax-transactions",
    "operationId": "delete_tax_transactions_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/tax-transactions/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_tax_transactions_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"
     }
    }
   }
  }
 }
}