{
 "openapi": "3.1.0",
 "info": {
  "title": "Certifications (Accounting)",
  "version": "20261030b",
  "description": "A controller signs that the entity’s numbers are right. A certification WITH exceptions is worth far more than one without — the ones without are the ones people sign without reading."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "certifications": {
    "type": "object",
    "required": [
     "period_code"
    ],
    "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
     },
     "certification_no": {
      "type": "string",
      "description": "Certification no",
      "readOnly": true
     },
     "close_run_id": {
      "type": "string",
      "format": "uuid",
      "description": "Close"
     },
     "period_code": {
      "type": "string",
      "description": "Period"
     },
     "scope": {
      "type": "string",
      "description": "Scope",
      "enum": [
       "entity",
       "group",
       "process",
       "account",
       "control",
       "disclosure"
      ]
     },
     "scope_ref": {
      "type": "string",
      "description": "Scope reference"
     },
     "certification_type": {
      "type": "string",
      "description": "Type",
      "enum": [
       "management",
       "sub_certification",
       "control_owner",
       "disclosure",
       "internal_audit",
       "ceo_cfo"
      ]
     },
     "statement": {
      "type": "string",
      "description": "Statement"
     },
     "certifier_id": {
      "type": "string",
      "format": "uuid",
      "description": "Certifier"
     },
     "certifier_title": {
      "type": "string",
      "description": "Certifier title"
     },
     "has_exceptions": {
      "type": "boolean",
      "description": "Has exceptions",
      "readOnly": true
     },
     "exceptions_noted": {
      "type": "string",
      "description": "Exceptions noted",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "signed_at": {
      "type": "string",
      "format": "date-time",
      "description": "Signed at",
      "readOnly": true
     },
     "signature_hash": {
      "type": "string",
      "description": "Signature hash",
      "readOnly": true
     },
     "signed_ip": {
      "type": "string",
      "description": "Signed ip",
      "readOnly": true
     },
     "due_date": {
      "type": "string",
      "format": "date",
      "description": "Due"
     },
     "notes": {
      "type": "string",
      "description": "Notes"
     },
     "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/certifications": {
   "get": {
    "summary": "list certifications",
    "operationId": "list_certifications_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create certifications",
    "operationId": "create_certifications_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/certifications/{id}": {
   "get": {
    "summary": "get certifications",
    "operationId": "get_certifications_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change certifications",
    "operationId": "change_certifications_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete certifications",
    "operationId": "delete_certifications_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/certifications/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_certifications_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"
     }
    }
   }
  },
  "/api/accounting/certifications/{id}/sign": {
   "post": {
    "summary": "Sign",
    "operationId": "action_certifications_0_6",
    "description": "Body keys: ip, statement, exceptions, title",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}