{
 "openapi": "3.1.0",
 "info": {
  "title": "Approval Rule Catalogue (Platform)",
  "version": "20261030b",
  "description": "Every approval rule in the company in one list: the routes written here and the rules the purchasing, sales, hiring and journal screens keep. The older ones still run exactly as before and are edited where they are kept."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "approval-rule-catalog": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "engine": {
      "type": "string",
      "description": "Engine",
      "readOnly": true
     },
     "doc_type": {
      "type": "string",
      "description": "Doc type",
      "readOnly": true
     },
     "code": {
      "type": "string",
      "description": "Code",
      "readOnly": true
     },
     "name": {
      "type": "string",
      "description": "Rule name",
      "readOnly": true
     },
     "priority": {
      "type": "integer",
      "description": "Priority",
      "readOnly": true
     },
     "amount_threshold": {
      "type": "string",
      "format": "decimal",
      "description": "From amount",
      "readOnly": true
     },
     "approver": {
      "type": "string",
      "description": "Approver",
      "readOnly": true
     },
     "is_active": {
      "type": "boolean",
      "description": "Active",
      "readOnly": true
     },
     "kept_in": {
      "type": "string",
      "description": "Kept in",
      "readOnly": true
     },
     "step_count": {
      "type": "integer",
      "description": "Step count",
      "readOnly": true
     },
     "edit_path": {
      "type": "string",
      "description": "Edit path",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/platform/approval-rule-catalog": {
   "get": {
    "summary": "list approval-rule-catalog",
    "operationId": "list_approval_rule_catalog_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create approval-rule-catalog",
    "operationId": "create_approval_rule_catalog_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/approval-rule-catalog/{id}": {
   "get": {
    "summary": "get approval-rule-catalog",
    "operationId": "get_approval_rule_catalog_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change approval-rule-catalog",
    "operationId": "change_approval_rule_catalog_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete approval-rule-catalog",
    "operationId": "delete_approval_rule_catalog_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/approval-rule-catalog/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_approval_rule_catalog_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"
     }
    }
   }
  }
 }
}