{
 "openapi": "3.1.0",
 "info": {
  "title": "ZATCA API Log (Accounting)",
  "version": "20261030b",
  "description": "Every request this company sent to ZATCA’s Fatoora platform and what it answered — onboarding, compliance checks, clearance and reporting — with the one-time passwords, the secrets and the authorization header taken out before it was written. Append-only."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "zatca-api-log": {
    "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
     },
     "unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Unit id",
      "readOnly": true
     },
     "invoice_id": {
      "type": "string",
      "format": "uuid",
      "description": "Invoice id",
      "readOnly": true
     },
     "kind": {
      "type": "string",
      "description": "Kind",
      "readOnly": true
     },
     "environment": {
      "type": "string",
      "description": "Environment",
      "readOnly": true
     },
     "method": {
      "type": "string",
      "description": "Method",
      "readOnly": true
     },
     "url": {
      "type": "string",
      "description": "Url",
      "readOnly": true
     },
     "request_headers": {
      "type": "object",
      "description": "Request headers",
      "readOnly": true
     },
     "request_body": {
      "type": "object",
      "description": "Request body",
      "readOnly": true
     },
     "http_status": {
      "type": "integer",
      "description": "Http status",
      "readOnly": true
     },
     "response_body": {
      "type": "object",
      "description": "Response body",
      "readOnly": true
     },
     "outcome": {
      "type": "string",
      "description": "Outcome",
      "readOnly": true
     },
     "error": {
      "type": "string",
      "description": "Error",
      "readOnly": true
     },
     "duration_ms": {
      "type": "integer",
      "description": "Duration ms",
      "readOnly": true
     },
     "idempotency_key": {
      "type": "string",
      "description": "Idempotency key",
      "readOnly": true
     },
     "attempt": {
      "type": "integer",
      "description": "Attempt",
      "readOnly": true
     },
     "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/zatca-api-log": {
   "get": {
    "summary": "list zatca-api-log",
    "operationId": "list_zatca_api_log_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post zatca api log",
    "operationId": "action_zatca_api_log_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/zatca-api-log/{id}": {
   "get": {
    "summary": "get zatca-api-log",
    "operationId": "get_zatca_api_log_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put zatca api log",
    "operationId": "action_zatca_api_log_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete zatca api log",
    "operationId": "action_zatca_api_log_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/zatca-api-log/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_zatca_api_log_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"
     }
    }
   }
  }
 }
}